From 4553faf23a1897f429f75dca61a44de79f857e29 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 21 Aug 2018 12:03:15 +0200 Subject: [PATCH] vrend: alpha-textures are supported on GLES Alpha-textures are supported on GLES, unlike on OpenGL core profiles. So we need to check for the difference here, otherwise we get textures uploaded as alpha-textures, and then attempted swizzled as if they were emulated as red-textures. This fixes the following dEQP test-cases: dEQP-GLES31.functional.texture.border_clamp.formats.alpha.nearest_size_pot dEQP-GLES31.functional.texture.border_clamp.formats.alpha.nearest_size_npot dEQP-GLES31.functional.texture.border_clamp.formats.alpha.linear_size_pot dEQP-GLES31.functional.texture.border_clamp.formats.alpha.linear_size_npot dEQP-GLES31.functional.texture.border_clamp.unused_channels.alpha Reviewed-by: Gurchetan Singh Signed-off-by: Erik Faye-Lund Signed-off-by: Jakob Bornecrantz --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index eb4d901..c33076f 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -608,7 +608,7 @@ bool vrend_is_ds_format(enum virgl_formats format) bool vrend_format_is_emulated_alpha(enum virgl_formats format) { - if (!vrend_state.use_core_profile) + if (vrend_state.use_gles || !vrend_state.use_core_profile) return false; return (format == VIRGL_FORMAT_A8_UNORM || format == VIRGL_FORMAT_A16_UNORM);