st/mesa: Also use PIPE_FORMAT_R8G8B8A8_SRGB for framebuffer_sRGB.
authorJakob Bornecrantz <jakob@collabora.com>
Tue, 3 Apr 2018 15:58:10 +0000 (16:58 +0100)
committerJakob Bornecrantz <jakob@collabora.com>
Tue, 3 Apr 2018 16:48:52 +0000 (17:48 +0100)
When running virgl on a GLES host the only sRGB formats that support
rendering is RGBA and RGBX. That pipe format is in the sRGB default
lists that the state tracker uses when mapping mesa formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
src/mesa/state_tracker/st_extensions.c

index bea61f21cbb25865f2c58e6b842d1c4bee85e94d..0dc8adb26223dab55add3a40a7de35a9042c387f 100644 (file)
@@ -711,7 +711,8 @@ void st_init_extensions(struct pipe_screen *screen,
 
       { { o(EXT_framebuffer_sRGB) },
         { PIPE_FORMAT_A8B8G8R8_SRGB,
-          PIPE_FORMAT_B8G8R8A8_SRGB },
+          PIPE_FORMAT_B8G8R8A8_SRGB,
+          PIPE_FORMAT_R8G8B8A8_SRGB },
          GL_TRUE }, /* at least one format must be supported */
 
       { { o(EXT_packed_float) },