From: Neha Bhende Date: Thu, 4 May 2017 18:25:18 +0000 (-0700) Subject: svga: Allow sRGB format with PIPE_BIND_DISPLAY_TARGET binding flag on vgpu10. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a7d42b71c88aaa6f9d15d07d85c020fba192c52;p=mesa.git svga: Allow sRGB format with PIPE_BIND_DISPLAY_TARGET binding flag on vgpu10. This patch allows to use sRGB formats for DISPLAY_TARGET on vgpu10. Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee --- diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index 08cc50f6664..7901e819de4 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -762,8 +762,10 @@ svga_is_format_supported( struct pipe_screen *screen, return FALSE; } - /* we don't support sRGB rendering into display targets */ - if (util_format_is_srgb(format) && (bindings & PIPE_BIND_DISPLAY_TARGET)) { + if (!ss->sws->have_vgpu10 && + util_format_is_srgb(format) && + (bindings & PIPE_BIND_DISPLAY_TARGET)) { + /* We only support sRGB rendering with vgpu10 */ return FALSE; } @@ -794,6 +796,9 @@ svga_is_format_supported( struct pipe_screen *screen, case SVGA3D_B8G8R8A8_UNORM: case SVGA3D_B8G8R8X8_UNORM: case SVGA3D_B5G6R5_UNORM: + case SVGA3D_B8G8R8X8_UNORM_SRGB: + case SVGA3D_B8G8R8A8_UNORM_SRGB: + case SVGA3D_R8G8B8A8_UNORM_SRGB: break; /* Often unsupported/problematic. This means we end up with the same