formats: Add support for sRGB_R8 also on desktop GL

As of 2018/11/30 EXT_texture_sRGB_R8 is also a valid extension for
desktop GL. Hence, move the format into the joined list so that
it can be picked up if the D-GL host supports it.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent ce63d638d6
commit acc261b06b
  1. 8
      src/vrend_formats.c

@ -250,6 +250,7 @@ static struct vrend_format_table srgb_formats[] = {
{ 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 },
};
static struct vrend_format_table gl_srgb_formats[] =
@ -258,11 +259,6 @@ static struct vrend_format_table gl_srgb_formats[] =
{ VIRGL_FORMAT_B8G8R8A8_SRGB, GL_SRGB8_ALPHA8, GL_BGRA, GL_UNSIGNED_BYTE, NO_SWIZZLE },
};
static struct vrend_format_table gles_srgb_r8_format[] =
{
{ VIRGL_FORMAT_R8_SRGB, GL_SR8_EXT, GL_RED, 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 },
@ -477,8 +473,6 @@ void vrend_build_format_list_gles(void)
*/
add_formats(gles_bgra_formats);
add_formats(gles_srgb_r8_format);
/* The Z32 format is required, but OpenGL ES does not support
* using it as a depth buffer. We just fake support with Z24
* and hope nobody notices.

Loading…
Cancel
Save