Henri Verbeet : wined3d: Set the query.c GLINFO_LOCATION to *gl_info.
Alexandre Julliard
julliard at winehq.org
Wed Jan 20 14:29:44 CST 2010
Module: wine
Branch: master
Commit: d967973d8c4b18c3ca537aa54b0fcc0d126dd0b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d967973d8c4b18c3ca537aa54b0fcc0d126dd0b5
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Jan 19 23:52:26 2010 +0100
wined3d: Set the query.c GLINFO_LOCATION to *gl_info.
---
dlls/wined3d/query.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c
index 753ed13..92e09e4 100644
--- a/dlls/wined3d/query.c
+++ b/dlls/wined3d/query.c
@@ -31,7 +31,7 @@
*/
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION This->device->adapter->gl_info
+#define GLINFO_LOCATION (*gl_info)
/* *******************************************
IWineD3DQuery IUnknown parts follow
@@ -179,6 +179,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface,
static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
struct wined3d_event_query *query = This->extendedData;
+ const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
BOOL *data = pData;
@@ -204,15 +205,16 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void
}
context = context_acquire(This->device, query->context->current_rt, CTXUSAGE_RESOURCELOAD);
+ gl_info = context->gl_info;
ENTER_GL();
- if (context->gl_info->supported[APPLE_FENCE])
+ if (gl_info->supported[APPLE_FENCE])
{
*data = GL_EXTCALL(glTestFenceAPPLE(query->id));
checkGLcall("glTestFenceAPPLE");
}
- else if (context->gl_info->supported[NV_FENCE])
+ else if (gl_info->supported[NV_FENCE])
{
*data = GL_EXTCALL(glTestFenceNV(query->id));
checkGLcall("glTestFenceNV");
@@ -255,6 +257,7 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD
if (dwIssueFlags & WINED3DISSUE_END)
{
struct wined3d_event_query *query = This->extendedData;
+ const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
if (query->context)
@@ -276,14 +279,16 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD
context_alloc_event_query(context, query);
}
+ gl_info = context->gl_info;
+
ENTER_GL();
- if (context->gl_info->supported[APPLE_FENCE])
+ if (gl_info->supported[APPLE_FENCE])
{
GL_EXTCALL(glSetFenceAPPLE(query->id));
checkGLcall("glSetFenceAPPLE");
}
- else if (context->gl_info->supported[NV_FENCE])
+ else if (gl_info->supported[NV_FENCE])
{
GL_EXTCALL(glSetFenceNV(query->id, GL_ALL_COMPLETED_NV));
checkGLcall("glSetFenceNV");
More information about the wine-cvs
mailing list