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>
macos/master
Tomeu Vizoso 7 years ago committed by Dave Airlie
parent 900cdf4b07
commit ec1e384dd2
  1. 2
      src/virgl_hw.h
  2. 1
      src/vrend_formats.c

@ -199,6 +199,8 @@ enum virgl_formats {
VIRGL_FORMAT_R16G16B16X16_UNORM = 234, VIRGL_FORMAT_R16G16B16X16_UNORM = 234,
VIRGL_FORMAT_R16G16B16X16_SNORM = 235, VIRGL_FORMAT_R16G16B16X16_SNORM = 235,
VIRGL_FORMAT_R10G10B10A2_UINT = 253,
VIRGL_FORMAT_BPTC_RGBA_UNORM = 255, VIRGL_FORMAT_BPTC_RGBA_UNORM = 255,
VIRGL_FORMAT_BPTC_SRGBA = 256, VIRGL_FORMAT_BPTC_SRGBA = 256,
VIRGL_FORMAT_BPTC_RGB_FLOAT = 257, VIRGL_FORMAT_BPTC_RGB_FLOAT = 257,

@ -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_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_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_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[] = { static struct vrend_format_table packed_float_formats[] = {

Loading…
Cancel
Save