mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 19:50:25 +01:00
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 <erik.faye-lund@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
b551fe5fa7
commit
f09d94fbd1
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue