[virglrenderer-devel] [PATCH 3/5] vrend: Support R10G10B10{A2, X2} formats v2
Jakob Bornecrantz
jakob at collabora.com
Tue Mar 20 17:39:28 UTC 2018
From: Alexandros Frantzis <alexandros.frantzis at collabora.com>
Introduce the VIRGL_FORMAT_R10G10B10{A2,X2}_UNORM formats and add
support for them in the renderer.
Fixes:
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb_unsigned_int_2_10_10_10_rev
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_unsigned_int_2_10_10_10_rev
v2:
Also update cvs file with newly added format.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob at collabora.com>
---
src/gallium/auxiliary/util/u_format.csv | 1 +
src/virgl_hw.h | 4 ++++
src/vrend_formats.c | 2 ++
3 files changed, 7 insertions(+)
diff --git a/src/gallium/auxiliary/util/u_format.csv b/src/gallium/auxiliary/util/u_format.csv
index a71aaf1..d409693 100644
--- a/src/gallium/auxiliary/util/u_format.csv
+++ b/src/gallium/auxiliary/util/u_format.csv
@@ -78,6 +78,7 @@ PIPE_FORMAT_B4G4R4A4_UNORM , plain, 1, 1, un4 , un4 , un4 , un4 , zyxw, r
PIPE_FORMAT_B4G4R4X4_UNORM , plain, 1, 1, un4 , un4 , un4 , x4 , zyx1, rgb, x4 , un4 , un4 , un4 , yzw1
PIPE_FORMAT_B5G6R5_UNORM , plain, 1, 1, un5 , un6 , un5 , , zyx1, rgb, un5 , un6 , un5 , , xyz1
PIPE_FORMAT_R10G10B10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , xyzw, rgb, un2 , un10, un10, un10, wzyx
+PIPE_FORMAT_R10G10B10X2_UNORM , plain, 1, 1, un10, un10, un10, x2, xyz1, rgb, x2 , un10, un10, un10, wzy1
PIPE_FORMAT_B10G10R10A2_UNORM , plain, 1, 1, un10, un10, un10, un2 , zyxw, rgb, un2 , un10, un10, un10, yzwx
PIPE_FORMAT_B2G3R3_UNORM , plain, 1, 1, un2 , un3 , un3 , , zyx1, rgb, un3 , un3 , un2 , , xyz1
diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index 4e42c05..7cbbeee 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -38,6 +38,7 @@ enum virgl_formats {
VIRGL_FORMAT_B5G5R5A1_UNORM = 5,
VIRGL_FORMAT_B4G4R4A4_UNORM = 6,
VIRGL_FORMAT_B5G6R5_UNORM = 7,
+ VIRGL_FORMAT_R10G10B10A2_UNORM = 8,
VIRGL_FORMAT_L8_UNORM = 9, /**< ubyte luminance */
VIRGL_FORMAT_A8_UNORM = 10, /**< ubyte alpha */
VIRGL_FORMAT_L8A8_UNORM = 12, /**< ubyte alpha, luminance */
@@ -201,6 +202,9 @@ enum virgl_formats {
VIRGL_FORMAT_BPTC_SRGBA = 256,
VIRGL_FORMAT_BPTC_RGB_FLOAT = 257,
VIRGL_FORMAT_BPTC_RGB_UFLOAT = 258,
+
+ VIRGL_FORMAT_R10G10B10X2_UNORM = 308,
+
VIRGL_FORMAT_MAX,
};
diff --git a/src/vrend_formats.c b/src/vrend_formats.c
index 738b182..aea634a 100644
--- a/src/vrend_formats.c
+++ b/src/vrend_formats.c
@@ -232,6 +232,8 @@ static struct vrend_format_table bit10_formats[] = {
{ VIRGL_FORMAT_B10G10R10X2_UNORM, GL_RGB10_A2, GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV },
{ VIRGL_FORMAT_B10G10R10A2_UNORM, GL_RGB10_A2, GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV },
{ VIRGL_FORMAT_B10G10R10A2_UINT, GL_RGB10_A2UI, GL_BGRA_INTEGER, GL_UNSIGNED_INT_2_10_10_10_REV },
+ { VIRGL_FORMAT_R10G10B10X2_UNORM, GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV },
+ { VIRGL_FORMAT_R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV },
};
static struct vrend_format_table packed_float_formats[] = {
--
2.14.1
More information about the virglrenderer-devel
mailing list