diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 68016e07fe..392c7eba79 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2809,6 +2809,15 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) * we never render to sRGB surfaces). */ gl_info->supported[ARB_FRAMEBUFFER_SRGB] = FALSE; } + if (gl_info->supported[ARB_OCCLUSION_QUERY]) + { + GLint counter_bits; + + GL_EXTCALL(glGetQueryivARB(GL_SAMPLES_PASSED_ARB, GL_QUERY_COUNTER_BITS_ARB, &counter_bits)); + TRACE("Occlusion query counter has %d bits.\n", counter_bits); + if (!counter_bits) + gl_info->supported[ARB_OCCLUSION_QUERY] = FALSE; + } wined3d_adapter_init_limits(gl_info); diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index f68fdc723b..9c4af05e56 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -251,8 +251,10 @@ enum wined3d_gl_extension USE_GL_FUNC(glDeleteQueriesARB) \ USE_GL_FUNC(glEndQueryARB) \ USE_GL_FUNC(glGenQueriesARB) \ + USE_GL_FUNC(glGetQueryivARB) \ USE_GL_FUNC(glGetQueryObjectivARB) \ USE_GL_FUNC(glGetQueryObjectuivARB) \ + USE_GL_FUNC(glIsQueryARB) \ /* GL_ARB_point_parameters */ \ USE_GL_FUNC(glPointParameterfARB) \ USE_GL_FUNC(glPointParameterfvARB) \