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

This commit is contained in:
Henri Verbeet 2013-04-23 13:21:31 +02:00 committed by Alexandre Julliard
parent 5206e512e2
commit 6fe9e0f033
2 changed files with 11 additions and 0 deletions

View File

@ -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);

View File

@ -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) \