<div dir="auto">The assumption was that if you're setting that ext, you can do gles31. Is there a driver/hw combo where that's not the case? If so, we should fix that instead...</div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 23, 2017 3:05 AM, "Tomasz Figa" <<a href="mailto:tfiga@chromium.org">tfiga@chromium.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In validate_DrawElements_common() we need to check for OES_geometry_shader<br>
extension to determine if we should fail if transform feedback is<br>
unpaused. However current code reads ctx->Extensions.OES_geometry_<wbr>shader<br>
directly, which does not take context version into account. This means<br>
that if the context is GLES 3.0, which makes the OES_geometry_shader<br>
inapplicable, we would not validate the draw properly. To fix it, let's<br>
replace the check with a call to _mesa_has_OES_geometry_shader(<wbr>).<br>
<br>
Fixes following dEQP tests on i965 with a GLES 3.0 context:<br>
<br>
dEQP-GLES3.functional.<wbr>negative_api.vertex_array#<wbr>draw_elements<br>
dEQP-GLES3.functional.<wbr>negative_api.vertex_array#<wbr>draw_elements_incomplete_<wbr>primitive<br>
dEQP-GLES3.functional.<wbr>negative_api.vertex_array#<wbr>draw_elements_instanced<br>
dEQP-GLES3.functional.<wbr>negative_api.vertex_array#<wbr>draw_elements_instanced_<wbr>incomplete_primitive<br>
dEQP-GLES3.functional.<wbr>negative_api.vertex_array#<wbr>draw_range_elements<br>
dEQP-GLES3.functional.<wbr>negative_api.vertex_array#<wbr>draw_range_elements_<wbr>incomplete_primitive<br>
<br>
Change-Id: Iebc960b479fcd5f6c2b1501cb3e77<wbr>98b575e6c4d<br>
Signed-off-by: Tomasz Figa <<a href="mailto:tfiga@chromium.org">tfiga@chromium.org</a>><br>
---<br>
src/mesa/main/api_validate.c | 3 ++-<br>
1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c<br>
index 1e8a714067..184bf143ed 100644<br>
--- a/src/mesa/main/api_validate.c<br>
+++ b/src/mesa/main/api_validate.c<br>
@@ -664,7 +664,8 @@ validate_DrawElements_common(<wbr>struct gl_context *ctx,<br>
* to have been overlooked. The body of the spec only explicitly allows<br>
* the indirect versions.<br>
*/<br>
- if (_mesa_is_gles3(ctx) && !ctx->Extensions.OES_geometry_<wbr>shader &&<br>
+ if (_mesa_is_gles3(ctx) &&<br>
+ !_mesa_has_OES_geometry_<wbr>shader(ctx) &&<br>
_mesa_is_xfb_active_and_<wbr>unpaused(ctx)) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"%s(transform feedback active)", caller);<br>
--<br>
2.11.0.483.g087da7b7c-goog<br>
<br>
</blockquote></div></div>