From cb8e07824dff9f19c4e2126611e9973c19ee33a3 Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Thu, 3 Mar 2022 11:40:09 -0800 Subject: [PATCH] vrend: move gl_srgb_formats into gl_bgra_formats There's no reason to keep them separated. gles_bgra_formats already includes both UNORM and SRGB versions anyways. Signed-off-by: Ryan Neph Reviewed-by: Gert Wollny Part-of: --- src/vrend_formats.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/vrend_formats.c b/src/vrend_formats.c index 0c3e6b2..61b9f9f 100644 --- a/src/vrend_formats.c +++ b/src/vrend_formats.c @@ -294,12 +294,6 @@ static struct vrend_format_table srgb_formats[] = { { VIRGL_FORMAT_R8_SRGB, GL_SR8_EXT, GL_RED, GL_UNSIGNED_BYTE, NO_SWIZZLE }, }; -static struct vrend_format_table gl_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 }, -}; - static struct vrend_format_table bit10_formats[] = { { VIRGL_FORMAT_B10G10R10X2_UNORM, GL_RGB10_A2, GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV, RGB1_SWIZZLE }, { VIRGL_FORMAT_B10G10R10A2_UNORM, GL_RGB10_A2, GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV, NO_SWIZZLE }, @@ -327,6 +321,8 @@ static struct vrend_format_table bptc_formats[] = { static struct vrend_format_table gl_bgra_formats[] = { { VIRGL_FORMAT_B8G8R8X8_UNORM, GL_RGBA8, GL_BGRA, GL_UNSIGNED_BYTE, RGB1_SWIZZLE }, { VIRGL_FORMAT_B8G8R8A8_UNORM, GL_RGBA8, GL_BGRA, GL_UNSIGNED_BYTE, NO_SWIZZLE }, + { 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 }, }; static struct vrend_format_table gles_bgra_formats[] = { @@ -611,7 +607,6 @@ void vrend_build_format_list_gl(void) */ add_formats(gl_base_rgba_formats); add_formats(gl_bgra_formats); - add_formats(gl_srgb_formats); } void vrend_build_format_list_gles(void)