diff options
author | Neha Bhende <bhenden@vmware.com> | 2016-08-18 15:27:45 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2016-08-26 06:19:52 -0600 |
commit | 10f6e08549660ee66395fc075cea9c7d0bba4e04 (patch) | |
tree | 25a4283ef78509ca997f2d0527b1683745c76f04 | |
parent | 3b7341d5476fbeda7df673216d86d062fefd2a55 (diff) | |
download | external_mesa3d-10f6e08549660ee66395fc075cea9c7d0bba4e04.zip external_mesa3d-10f6e08549660ee66395fc075cea9c7d0bba4e04.tar.gz external_mesa3d-10f6e08549660ee66395fc075cea9c7d0bba4e04.tar.bz2 |
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 <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_blit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c b/src/gallium/drivers/svga/svga_pipe_blit.c index ea0b396..e1a4c06 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); |