[virglrenderer-devel] [PATCH] vrend: Enable vertex_attrib_binding also on Hosts with GLES >= 3.1

Gert Wollny gert.wollny at collabora.com
Fri May 25 14:47:05 UTC 2018


Ping

Am Montag, den 21.05.2018, 17:46 +0200 schrieb Gert Wollny:
> On GLES >= 3.1 the functionality that is currently relevant for
> attribute  binding in virglrenderer is available. by enabling this
> functionality the new 
> code path vrend_draw_bind_vertex_binding is used.
> 
> Fixes: 
>   dEQP-GLES3.functional.clipping.point.wide_point_z_clip
>   dEQP-
> GLES3.functional.clipping.point.wide_point_z_clip_viewport_center
>   dEQP-
> GLES3.functional.clipping.point.wide_point_z_clip_viewport_corner
> 
> On an Intel Kabylake host this also fixes:
> 
>   dEQP-GLES3.functional.clipping.point.wide_point_clip
>   dEQP-
> GLES3.functional.clipping.point.wide_point_clip_viewport_center
>   dEQP-
> GLES3.functional.clipping.point.wide_point_clip_viewport_corner
> 
> but it should be noted that these three tests expect that also points
> with a 
> centre outside the clip volume will be partially drawn when they
> overlap with 
> the clip volume because of being "wide". The OpenGL standard defines
> that these 
> points should be clipped completely.
> 
> GLES 3.1 does not completely implement GL_ARB_vertex_attrib_binding,
> so it may 
> become necessary to add another flag that would indicate that only
> GLES style 
> vertex_attrib_binding is available if virglrenderer would want to use
> this
> additional functionality. Namely 
>   VertexAttribLPointer
> is not available, and a few query constants are missing from GLES 3.1
> with 
> respect to the extension.
> 
> Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
> ---
> PS: obviously the bug in vrend_draw_bind_vertex_legacy that made
> these tests 
> fail is still there. If someone wants to investigate: The point size
> is not
> properly set.
> 
>  src/vrend_renderer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> index 8cd9109..464560e 100644
> --- a/src/vrend_renderer.c
> +++ b/src/vrend_renderer.c
> @@ -4203,7 +4203,8 @@ int vrend_renderer_init(struct vrend_if_cbs
> *cbs, uint32_t flags)
>  
>     if (epoxy_has_gl_extension("GL_MESA_pack_invert"))
>        vrend_state.have_mesa_invert = true;
> -   if (gl_ver >= 43 ||
> epoxy_has_gl_extension("GL_ARB_vertex_attrib_binding"))
> +   if (gl_ver >= 43 || (gles && gl_ver >= 31) ||
> +       epoxy_has_gl_extension("GL_ARB_vertex_attrib_binding"))
>        vrend_state.have_vertex_attrib_binding = true;
>     if (gl_ver >= 33 ||
> epoxy_has_gl_extension("GL_ARB_sampler_objects"))
>        vrend_state.have_samplers = true;


More information about the virglrenderer-devel mailing list