mesa/main: fix validation of transform-feedback queries
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 7 Nov 2018 15:00:59 +0000 (16:00 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 23 Nov 2018 09:48:36 +0000 (10:48 +0100)
commitf09d94fbd113f6fd0e9583b6c21826281c39ea97
tree46018cecc5c40ecff37bec052ce0e422c5d5335d
parentb551fe5fa7e032ea93565a8a9a8bee9a344822cd
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>
src/mesa/main/queryobj.c