Commit 4811a839 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Add support for GL_ARB_timer_query extension.

parent cdedb06a
......@@ -139,6 +139,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"GL_ARB_texture_non_power_of_two", ARB_TEXTURE_NON_POWER_OF_TWO },
{"GL_ARB_texture_rectangle", ARB_TEXTURE_RECTANGLE },
{"GL_ARB_texture_rg", ARB_TEXTURE_RG },
{"GL_ARB_timer_query", ARB_TIMER_QUERY },
{"GL_ARB_vertex_array_bgra", ARB_VERTEX_ARRAY_BGRA },
{"GL_ARB_vertex_blend", ARB_VERTEX_BLEND },
{"GL_ARB_vertex_buffer_object", ARB_VERTEX_BUFFER_OBJECT },
......@@ -2968,6 +2969,15 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
if (!counter_bits)
gl_info->supported[ARB_OCCLUSION_QUERY] = FALSE;
}
if (gl_info->supported[ARB_TIMER_QUERY])
{
GLint counter_bits;
GL_EXTCALL(glGetQueryivARB(GL_TIMESTAMP, GL_QUERY_COUNTER_BITS_ARB, &counter_bits));
TRACE("Timestamp query counter has %d bits.\n", counter_bits);
if (!counter_bits)
gl_info->supported[ARB_TIMER_QUERY] = FALSE;
}
if (!gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] && gl_info->supported[EXT_TEXTURE_MIRROR_CLAMP])
{
TRACE(" IMPLIED: ATI_texture_mirror_once support (by EXT_texture_mirror_clamp).\n");
......
......@@ -89,6 +89,7 @@ enum wined3d_gl_extension
ARB_TEXTURE_NON_POWER_OF_TWO,
ARB_TEXTURE_RECTANGLE,
ARB_TEXTURE_RG,
ARB_TIMER_QUERY,
ARB_VERTEX_ARRAY_BGRA,
ARB_VERTEX_BLEND,
ARB_VERTEX_BUFFER_OBJECT,
......@@ -321,6 +322,9 @@ enum wined3d_gl_extension
USE_GL_FUNC(glCompressedTexSubImage2DARB) \
USE_GL_FUNC(glCompressedTexSubImage3DARB) \
USE_GL_FUNC(glGetCompressedTexImageARB) \
/* GL_ARB_timer_query */ \
USE_GL_FUNC(glQueryCounter) \
USE_GL_FUNC(glGetQueryObjectui64v) \
/* GL_ARB_vertex_blend */ \
USE_GL_FUNC(glVertexBlendARB) \
USE_GL_FUNC(glWeightPointerARB) \
......
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