[virglrenderer-devel] [PATCH 1/3] vrend: Add support for VIRGL_FORMAT_R10G10B10A2_UINT
Tomeu Vizoso
tomeu.vizoso at collabora.com
Fri May 18 12:28:58 UTC 2018
As Mesa doesn't support glReadPixel with GL_BGRA_INTEGER on GLES, add this
format so Virgl calls glReadPixel with GL_RGBA_INTEGER.
Fixes dEQP-GLES3.functional.fbo.color.clear.rgb10_a2ui
Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Tested-by: Jakob Bornecrantz <jakob at collabora.com>
---
src/virgl_hw.h | 2 ++
src/vrend_formats.c | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index 1701bc93552d..3f1b40b589bb 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -199,6 +199,8 @@ enum virgl_formats {
VIRGL_FORMAT_R16G16B16X16_UNORM = 234,
VIRGL_FORMAT_R16G16B16X16_SNORM = 235,
+ VIRGL_FORMAT_R10G10B10A2_UINT = 253,
+
VIRGL_FORMAT_BPTC_RGBA_UNORM = 255,
VIRGL_FORMAT_BPTC_SRGBA = 256,
VIRGL_FORMAT_BPTC_RGB_FLOAT = 257,
diff --git a/src/vrend_formats.c b/src/vrend_formats.c
index cf32f6fd5e95..3464c0665b23 100644
--- a/src/vrend_formats.c
+++ b/src/vrend_formats.c
@@ -241,6 +241,7 @@ static struct vrend_format_table bit10_formats[] = {
{ VIRGL_FORMAT_B10G10R10A2_UINT, GL_RGB10_A2UI, GL_BGRA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, NO_SWIZZLE },
{ VIRGL_FORMAT_R10G10B10X2_UNORM, GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, RGB1_SWIZZLE },
{ VIRGL_FORMAT_R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, NO_SWIZZLE },
+ { VIRGL_FORMAT_R10G10B10A2_UINT, GL_RGB10_A2UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV, NO_SWIZZLE },
};
static struct vrend_format_table packed_float_formats[] = {
--
2.17.0
More information about the virglrenderer-devel
mailing list