[virglrenderer-devel] [PATCH 3/3] vrend: Remove VIRGL_FORMAT_B5G5R5A1_UNORM from GLES

Tomeu Vizoso tomeu.vizoso at collabora.com
Fri May 18 12:29:00 UTC 2018


glTexImage2D on GLES doesn't support GL_BGRA, so remove this one more
format so one with a GL_RGBA layout is chosen instead on GLES.

Fixes dEQP-GLES3.functional.texture.format.sized.2d.rgb5_a1_pot

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Tested-by: Jakob Bornecrantz <jakob at collabora.com>
---
 src/vrend_formats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/vrend_formats.c b/src/vrend_formats.c
index e44790e1cbf9..9474dad16615 100644
--- a/src/vrend_formats.c
+++ b/src/vrend_formats.c
@@ -50,7 +50,6 @@ static struct vrend_format_table base_rgba_formats[] =
     { VIRGL_FORMAT_B4G4R4X4_UNORM, GL_RGBA4, GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV, RGB1_SWIZZLE },
     { VIRGL_FORMAT_A4B4G4R4_UNORM, GL_RGBA4, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, NO_SWIZZLE },
     { VIRGL_FORMAT_B5G5R5X1_UNORM, GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, RGB1_SWIZZLE },
-    { VIRGL_FORMAT_B5G5R5A1_UNORM, GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, NO_SWIZZLE },
 
     { VIRGL_FORMAT_B5G6R5_UNORM, GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, NO_SWIZZLE },
     { VIRGL_FORMAT_B2G3R3_UNORM, GL_R3_G3_B2, GL_RGB, GL_UNSIGNED_BYTE_3_3_2, NO_SWIZZLE },
@@ -63,6 +62,7 @@ static struct vrend_format_table base_rgba_formats[] =
 static struct vrend_format_table gl_base_rgba_formats[] =
   {
     { VIRGL_FORMAT_B4G4R4A4_UNORM, GL_RGBA4, GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV, NO_SWIZZLE },
+    { VIRGL_FORMAT_B5G5R5A1_UNORM, GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, NO_SWIZZLE },
   };
 
 static struct vrend_format_table base_depth_formats[] =
-- 
2.17.0



More information about the virglrenderer-devel mailing list