Commit 6fe9e0f0 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Disable occlusion query support if the implementation has 0 counter bits.

parent 5206e512
......@@ -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);
......
......@@ -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) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment