mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
mesa/main: fix validation of GL_TIME_ELAPSED
ctx->Extensions.EXT_timer_query is set based on the driver- capabilities, not based on the context type. We need to check against _mesa_has_EXT_timer_query(ctx) instead to figure out if the extension is really supported. We also need to check for EXT_disjoint_timer_query, which enables the same functionality for ES. This turns usage of GL_TIME_ELAPSED into an error on ES 3, as is required by the spec. Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
059928e114
commit
b551fe5fa7
1 changed files with 2 additions and 1 deletions
|
|
@ -197,7 +197,8 @@ get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index)
|
|||
else
|
||||
return NULL;
|
||||
case GL_TIME_ELAPSED:
|
||||
if (ctx->Extensions.EXT_timer_query)
|
||||
if (_mesa_has_EXT_timer_query(ctx) ||
|
||||
_mesa_has_EXT_disjoint_timer_query(ctx))
|
||||
return &ctx->Query.CurrentTimerObject;
|
||||
else
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue