[virglrenderer-devel] [PATCH 1/4] vrend: Add VIRGL_FORMAT_R8G8B8A8_SRGB format and test for more sRGB formats
Jakob Bornecrantz
jakob at collabora.com
Wed May 16 14:34:24 UTC 2018
This along with another patch allows us to expose
GL_[EXT|ARB]_framebuffer_sRGB on a GLES host.
Signed-off-by: Jakob Bornecrantz <jakob at collabora.com>
---
src/virgl_hw.h | 1 +
src/vrend_formats.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/virgl_hw.h b/src/virgl_hw.h
index e746f61..8e17387 100644
--- a/src/virgl_hw.h
+++ b/src/virgl_hw.h
@@ -85,6 +85,7 @@ enum virgl_formats {
VIRGL_FORMAT_L8A8_SRGB = 96,
VIRGL_FORMAT_B8G8R8A8_SRGB = 100,
VIRGL_FORMAT_B8G8R8X8_SRGB = 101,
+ VIRGL_FORMAT_R8G8B8A8_SRGB = 104,
/* compressed formats */
VIRGL_FORMAT_DXT1_RGB = 105,
diff --git a/src/vrend_formats.c b/src/vrend_formats.c
index 4da51a9..f03ffd8 100644
--- a/src/vrend_formats.c
+++ b/src/vrend_formats.c
@@ -231,10 +231,10 @@ static struct vrend_format_table rgtc_formats[] = {
};
static struct vrend_format_table srgb_formats[] = {
-
{ VIRGL_FORMAT_B8G8R8X8_SRGB, GL_SRGB8_ALPHA8, GL_BGRA, GL_UNSIGNED_BYTE, RGB1_SWIZZLE },
{ VIRGL_FORMAT_B8G8R8A8_SRGB, GL_SRGB8_ALPHA8, GL_BGRA, GL_UNSIGNED_BYTE, NO_SWIZZLE },
{ VIRGL_FORMAT_R8G8B8X8_SRGB, GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, RGB1_SWIZZLE },
+ { VIRGL_FORMAT_R8G8B8A8_SRGB, GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_BYTE, NO_SWIZZLE },
{ VIRGL_FORMAT_L8_SRGB, GL_SR8_EXT, GL_RED, GL_UNSIGNED_BYTE, RRR1_SWIZZLE },
{ VIRGL_FORMAT_L8A8_SRGB, GL_SRG8_EXT, GL_RG, GL_UNSIGNED_BYTE, RRRG_SWIZZLE },
--
2.14.1
More information about the virglrenderer-devel
mailing list