summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.com>2018-05-18 14:28:58 +0200
committerDave Airlie <airlied@redhat.com>2018-06-04 13:08:08 +1000
commitec1e384dd28089f93370d0fb8fb97934beefabb3 (patch)
treefe24c14689a37b92b4322c8f5f04c72e26a5c0cc
parent900cdf4b07e9ac12ff206f7b7347cb3cf0e29d33 (diff)
vrend: Add support for VIRGL_FORMAT_R10G10B10A2_UINT
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@collabora.com> Tested-by: Jakob Bornecrantz <jakob@collabora.com>
-rw-r--r--src/virgl_hw.h2
-rw-r--r--src/vrend_formats.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index a430fae..ef5ce67 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 0be213a..860b1d0 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[] = {