From b9e0fb9b2fdbeb9945adf9a1e6416581140561b3 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 20 Mar 2019 10:37:10 +0100 Subject: [PATCH] formats: Remove LxAx formats The formats L8A8_UNORM and L16A16_UNORM are usually not supported, but L8A8_SRGB might, and this results in problems because the host might ask for a texture view of a L8A8_SRGB by using L8A8_UNORM, and this will then fail. Removing these formats lets mesa pick suitable replacements on the guest side. This helps with "The Talos Principle". Signed-off-by: Gert Wollny Reviewed-by: Gurchetan Singh --- src/vrend_formats.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/vrend_formats.c b/src/vrend_formats.c index c557670..479f614 100644 --- a/src/vrend_formats.c +++ b/src/vrend_formats.c @@ -94,10 +94,8 @@ static struct vrend_format_table base_depth_formats[] = static struct vrend_format_table base_la_formats[] = { { VIRGL_FORMAT_A8_UNORM, GL_ALPHA8, GL_ALPHA, GL_UNSIGNED_BYTE, NO_SWIZZLE }, { VIRGL_FORMAT_L8_UNORM, GL_R8, GL_RED, GL_UNSIGNED_BYTE, RRR1_SWIZZLE }, - { VIRGL_FORMAT_L8A8_UNORM, GL_LUMINANCE8_ALPHA8, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NO_SWIZZLE }, { VIRGL_FORMAT_A16_UNORM, GL_ALPHA16, GL_ALPHA, GL_UNSIGNED_SHORT, NO_SWIZZLE }, { VIRGL_FORMAT_L16_UNORM, GL_R16, GL_RED, GL_UNSIGNED_SHORT, RRR1_SWIZZLE }, - { VIRGL_FORMAT_L16A16_UNORM, GL_LUMINANCE16_ALPHA16, GL_LUMINANCE_ALPHA, GL_UNSIGNED_SHORT, NO_SWIZZLE }, }; static struct vrend_format_table rg_base_formats[] = { @@ -249,7 +247,6 @@ static struct vrend_format_table srgb_formats[] = { { 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_SLUMINANCE8_ALPHA8_EXT, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, NO_SWIZZLE }, { VIRGL_FORMAT_R8_SRGB, GL_SR8_EXT, GL_RED, GL_UNSIGNED_BYTE, NO_SWIZZLE }, };