From: Neha Bhende Date: Thu, 18 Aug 2016 22:27:45 +0000 (-0700) Subject: svga: fix regression related to srgb X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10f6e08549660ee66395fc075cea9c7d0bba4e04;p=mesa.git svga: fix regression related to srgb This regression is caused because of commit 3190c7ee9727161d627f107c2e7f8ec3a11941c1 Regression caused by following OpenGL 4.4 spec rules relates to GL_FRAMEBUFFER_SRGB in Mesa. Reviewed-by: Brian Paul Reviewed-by: Charmaine Lee --- diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index ea0b3968c39..e1a4c069ca0 100644 --- a/src/gallium/drivers/svga/svga_pipe_blit.c +++ b/src/gallium/drivers/svga/svga_pipe_blit.c @@ -322,6 +322,18 @@ svga_blit(struct pipe_context *pipe, return; } + /** + * When there is blit from srgb to linear format or vice versa, we change + * src.format to srgb or linear, respectively + */ + + if (util_format_is_srgb(blit.dst.format)) { + blit.src.format = util_format_srgb(blit.src.format); + } + else { + blit.src.format = util_format_linear(blit.src.format); + } + /* XXX turn off occlusion and streamout queries */ util_blitter_save_vertex_buffer_slot(svga->blitter, svga->curr.vb);