<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, May 21, 2018 at 8:46 AM Gert Wollny <<a href="mailto:gert.wollny@collabora.com">gert.wollny@collabora.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On GLES >= 3.1 the functionality that is currently relevant for attribute <br>
binding in virglrenderer is available. by enabling this functionality the new <br>
code path vrend_draw_bind_vertex_binding is used.<br>
<br>
Fixes: <br>
  dEQP-GLES3.functional.clipping.point.wide_point_z_clip<br>
  dEQP-GLES3.functional.clipping.point.wide_point_z_clip_viewport_center<br>
  dEQP-GLES3.functional.clipping.point.wide_point_z_clip_viewport_corner<br>
<br>
On an Intel Kabylake host this also fixes:<br>
<br>
  dEQP-GLES3.functional.clipping.point.wide_point_clip<br>
  dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_center<br>
  dEQP-GLES3.functional.clipping.point.wide_point_clip_viewport_corner<br>
<br>
but it should be noted that these three tests expect that also points with a <br>
centre outside the clip volume will be partially drawn when they overlap with <br>
the clip volume because of being "wide". The OpenGL standard defines that these <br>
points should be clipped completely.<br></blockquote><div><br></div><div>Is this a test problem or a problem with vrend_draw_bind_vertex_legacy?  Would the test pass if the points are completely clipped?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
GLES 3.1 does not completely implement GL_ARB_vertex_attrib_binding, so it may <br>
become necessary to add another flag that would indicate that only GLES style <br>
vertex_attrib_binding is available if virglrenderer would want to use this<br>
additional functionality. Namely <br>
  VertexAttribLPointer<br>
is not available, and a few query constants are missing from GLES 3.1 with <br>
respect to the extension.<br>
<br>iSigned-off-by: Gert Wollny <<a href="mailto:gert.wollny@collabora.com" target="_blank">gert.wollny@collabora.com</a>><br>
---<br>
PS: obviously the bug in vrend_draw_bind_vertex_legacy that made these tests <br>
fail is still there. If someone wants to investigate: The point size is not<br>
properly set.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 src/vrend_renderer.c | 3 ++-<br>
 1 file changed, 2 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c<br>
index 8cd9109..464560e 100644<br>
--- a/src/vrend_renderer.c<br>
+++ b/src/vrend_renderer.c<br>
@@ -4203,7 +4203,8 @@ int vrend_renderer_init(struct vrend_if_cbs *cbs, uint32_t flags)<br>
<br>
    if (epoxy_has_gl_extension("GL_MESA_pack_invert"))<br>
       vrend_state.have_mesa_invert = true;<br>
-   if (gl_ver >= 43 || epoxy_has_gl_extension("GL_ARB_vertex_attrib_binding"))<br>
+   if (gl_ver >= 43 || (gles && gl_ver >= 31) ||<br>
+       epoxy_has_gl_extension("GL_ARB_vertex_attrib_binding"))<br></blockquote><div><br></div><div>Since GLES31 doesn't fully implement this, we can not advertise this.  You can also do</div><div><br></div><div><div>   if (vrend_state.have_vertex_attrib_binding || (vrend_state.use_gles && vrend_state.gl_major_ver >= 3 &&  vrend_state.gl_minor_ver >= 1)</div><div>      vrend_draw_bind_vertex_binding(ctx, ctx->sub->ve);</div><div>   else </div><div>      vrend_draw_bind_vertex_legacy(ctx, ctx->sub->ve);</div></div><div><br></div><div>It's a little more verbose, but also more correct.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
       vrend_state.have_vertex_attrib_binding = true;<br>
    if (gl_ver >= 33 || epoxy_has_gl_extension("GL_ARB_sampler_objects"))<br>
       vrend_state.have_samplers = true;<br>
-- <br>
2.17.0<br>
<br>
_______________________________________________<br>
virglrenderer-devel mailing list<br>
<a href="mailto:virglrenderer-devel@lists.freedesktop.org" target="_blank">virglrenderer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/virglrenderer-devel</a><br>
</blockquote></div></div>