[virglrenderer-devel] [PATCH 1/5] vrend: Fix RGB565 format support

Jakob Bornecrantz jakob at collabora.com
Thu Mar 15 19:50:30 UTC 2018


From: Alexandros Frantzis <alexandros.frantzis at collabora.com>

Use the GL_RGB565 internal format (provided by GL_ARB_ES2_compatibility)
for VIRGL_FORMAT_B5G6R5_UNORM.

Fixes:

dEQP-GLES2.functional.texture.format.rgb565_2d_npot
dEQP-GLES2.functional.texture.format.rgb565_2d_pot
dEQP-GLES2.functional.texture.format.rgb565_cube_npot
dEQP-GLES2.functional.texture.format.rgb565_cube_pot
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_nicest
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_non_square_fastest
dEQP-GLES2.functional.texture.mipmap.2d.generate.rgb565_non_square_nicest
dEQP-GLES2.functional.texture.mipmap.cube.generate.rgb565_fastest
dEQP-GLES2.functional.texture.mipmap.cube.generate.rgb565_nicest

Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
Signed-off-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 b4600f5..738b182 100644
--- a/src/vrend_formats.c
+++ b/src/vrend_formats.c
@@ -45,7 +45,7 @@ static struct vrend_format_table base_rgba_formats[] =
     { VIRGL_FORMAT_B5G5R5X1_UNORM, GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV },
     { VIRGL_FORMAT_B5G5R5A1_UNORM, GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV },
 
-    { VIRGL_FORMAT_B5G6R5_UNORM, GL_RGB4, GL_RGB, GL_UNSIGNED_SHORT_5_6_5 },
+    { VIRGL_FORMAT_B5G6R5_UNORM, GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5 },
     { VIRGL_FORMAT_B2G3R3_UNORM, GL_R3_G3_B2, GL_RGB, GL_UNSIGNED_BYTE_3_3_2 },
 
     { VIRGL_FORMAT_R16G16B16X16_UNORM, GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT },
-- 
2.14.1



More information about the virglrenderer-devel mailing list