[virglrenderer-devel] [PATCH] vrend: enable multisample on GLE host with GLES >= 3.0 (v2)

Gert Wollny gert.wollny at collabora.com
Mon May 21 08:40:55 UTC 2018


Discard, I was a bit too fast with that, I'll resent an updated version
in a moment. 

Am Montag, den 21.05.2018, 10:32 +0200 schrieb Gert Wollny:
> v2: Do not set GL_SAMPLE_ALPHA_TO_ONE state when on gles, because it
> is
>     not supported there. This silences the according warnings on the
> host.
> 
> Multisample fragment operations are part of the OpenGL ES 3.0 spec
> and
> enabling them doesnt't require the extensions to be listed
> explicitely.
> 
> Fixes:
> 
>  dEQP-
> GLES3.functional.multisample.fbo_max_samples.proportionality_alpha_to
> _coverage
>  dEQP-
> GLES3.functional.multisample.fbo_max_samples.proportionality_sample_c
> overage
>  dEQP-
> GLES3.functional.multisample.fbo_max_samples.proportionality_sample_c
> overage_inverted
>  dEQP-
> GLES3.functional.multisample.fbo_max_samples.sample_coverage_invert
> 
> on an GLE host with GLES >= 3.0.
> 
> Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
> Reviewed-by: Gurchetan Singh <gurchetansingh at chromium.org> (v1)
> ---
> PS: I don't have commit rights. 
>  src/vrend_renderer.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> index 3610dd8..fb6975f 100644
> --- a/src/vrend_renderer.c
> +++ b/src/vrend_renderer.c
> @@ -3347,7 +3347,7 @@ static void vrend_hw_emit_blend(struct
> vrend_context *ctx, struct pipe_blend_sta
>        else
>           glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE);
>  
> -      if (state->alpha_to_one)
> +      if (state->alpha_to_one && !vrend_state.use_gles)
>           glEnable(GL_SAMPLE_ALPHA_TO_ONE);
>        else
>           glDisable(GL_SAMPLE_ALPHA_TO_ONE);
> @@ -4216,7 +4216,9 @@ int vrend_renderer_init(struct vrend_if_cbs
> *cbs, uint32_t flags)
>  
>     if (epoxy_has_gl_extension("GL_ARB_stencil_texturing"))
>        vrend_state.have_stencil_texturing = true;
> -   if (epoxy_has_gl_extension("GL_EXT_framebuffer_multisample") &&
> epoxy_has_gl_extension("GL_ARB_texture_multisample")) {
> +   if ((gles && gl_ver >= 30) ||
> +       (epoxy_has_gl_extension("GL_EXT_framebuffer_multisample") &&
> +        epoxy_has_gl_extension("GL_ARB_texture_multisample"))) {
>        vrend_state.have_multisample = true;
>        if
> (epoxy_has_gl_extension("GL_EXT_framebuffer_multisample_blit_scaled")
> )
>           vrend_state.have_ms_scaled_blit = true;


More information about the virglrenderer-devel mailing list