summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-11-07 16:00:59 +0100
committerErik Faye-Lund <[email protected]>2018-11-23 10:48:36 +0100
commitf09d94fbd113f6fd0e9583b6c21826281c39ea97 (patch)
tree46018cecc5c40ecff37bec052ce0e422c5d5335d /src/mesa
parentb551fe5fa7e032ea93565a8a9a8bee9a344822cd (diff)
mesa/main: fix validation of transform-feedback queries
ctx->Extensions.EXT_transform_feedback is set based on the driver- capabilities, not based on the context type. We need to check against _mesa_has_EXT_transform_feedback(ctx) instead to figure out if the extension is really supported. We also need to check for OES_geometry_shader. This turns usage of GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN into an error on ES 2, as well as usage of GL_PRIMITIVES_GENERATED on ES 3, both as required by the spec. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/queryobj.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 9b3671f90a0..bda94ccc701 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -203,12 +203,13 @@ get_query_binding_point(struct gl_context *ctx, GLenum target, GLuint index)
else
return NULL;
case GL_PRIMITIVES_GENERATED:
- if (ctx->Extensions.EXT_transform_feedback)
+ if (_mesa_has_EXT_transform_feedback(ctx) ||
+ _mesa_has_OES_geometry_shader(ctx))
return &ctx->Query.PrimitivesGenerated[index];
else
return NULL;
case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:
- if (ctx->Extensions.EXT_transform_feedback)
+ if (_mesa_has_EXT_transform_feedback(ctx) || _mesa_is_gles3(ctx))
return &ctx->Query.PrimitivesWritten[index];
else
return NULL;