summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authorTomasz Figa <[email protected]>2017-02-23 17:05:18 +0900
committerKenneth Graunke <[email protected]>2017-03-02 00:37:17 -0800
commit06758c1e8a8963e0894387d2f5ca83d88c9ac86c (patch)
treef4c58880f755d52112b5fff9b2024c78d6dfbe5d /src/mesa/main/api_validate.c
parent58793e514b6c57924b08d3a9c766ed05e8d9662a (diff)
mesa: Use _mesa_has_OES_geometry_shader() when validating draws
In validate_DrawElements_common() we need to check for OES_geometry_shader extension to determine if we should fail if transform feedback is unpaused. However current code reads ctx->Extensions.OES_geometry_shader directly, which does not take context version into account. This means that if the context is GLES 3.0, which makes the OES_geometry_shader inapplicable, we would not validate the draw properly. To fix it, let's replace the check with a call to _mesa_has_OES_geometry_shader(). Fixes following dEQP tests on i965 with a GLES 3.0 context: dEQP-GLES3.functional.negative_api.vertex_array#draw_elements dEQP-GLES3.functional.negative_api.vertex_array#draw_elements_incomplete_primitive dEQP-GLES3.functional.negative_api.vertex_array#draw_elements_instanced dEQP-GLES3.functional.negative_api.vertex_array#draw_elements_instanced_incomplete_primitive dEQP-GLES3.functional.negative_api.vertex_array#draw_range_elements dEQP-GLES3.functional.negative_api.vertex_array#draw_range_elements_incomplete_primitive Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 1e8a714067b..184bf143edf 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -664,7 +664,8 @@ validate_DrawElements_common(struct gl_context *ctx,
* to have been overlooked. The body of the spec only explicitly allows
* the indirect versions.
*/
- if (_mesa_is_gles3(ctx) && !ctx->Extensions.OES_geometry_shader &&
+ if (_mesa_is_gles3(ctx) &&
+ !_mesa_has_OES_geometry_shader(ctx) &&
_mesa_is_xfb_active_and_unpaused(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(transform feedback active)", caller);