wined3d: Use glGetQueryObjectui64v() for occlusion queries when available.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-11-21 15:15:55 +01:00 committed by Alexandre Julliard
parent d3c58df455
commit 6fbb93a3a1
1 changed files with 14 additions and 4 deletions

View File

@ -386,10 +386,20 @@ static BOOL wined3d_occlusion_query_ops_poll(struct wined3d_query *query)
if (available)
{
GLuint result;
GL_EXTCALL(glGetQueryObjectuiv(oq->id, GL_QUERY_RESULT, &result));
checkGLcall("glGetQueryObjectuiv(GL_QUERY_RESULT)");
oq->samples = result;
if (gl_info->supported[ARB_TIMER_QUERY])
{
GLuint64 result;
GL_EXTCALL(glGetQueryObjectui64v(oq->id, GL_QUERY_RESULT, &result));
checkGLcall("glGetQueryObjectui64v(GL_QUERY_RESULT)");
oq->samples = result;
}
else
{
GLuint result;
GL_EXTCALL(glGetQueryObjectuiv(oq->id, GL_QUERY_RESULT, &result));
checkGLcall("glGetQueryObjectuiv(GL_QUERY_RESULT)");
oq->samples = result;
}
TRACE("Returning 0x%s samples.\n", wine_dbgstr_longlong(oq->samples));
}