OSDN Git Service

svga: convert dst format to linear when blending is enabled.
authorNeha Bhende <bhenden@vmware.com>
Thu, 4 May 2017 18:25:04 +0000 (11:25 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 5 Sep 2018 17:22:42 +0000 (11:22 -0600)
When blending is enabled, framebuffer colorspace has to be linear.
Previously, we never hit this case because we were not supporting sRGB
drawable. Previous patch added that support.

Tested with mtt glretrace, viewperf, piglit, conform.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_pipe_blit.c

index bca0de3..d97f623 100644 (file)
@@ -597,8 +597,10 @@ try_blit(struct svga_context *svga, const struct pipe_blit_info *blit_info)
     * If format is srgb and blend is enabled then color values need
     * to be converted into linear format.
     */
-   if (is_blending_enabled(svga, &blit))
+   if (is_blending_enabled(svga, &blit)) {
       blit.src.format = util_format_linear(blit.src.format);
+      blit.dst.format = util_format_linear(blit.dst.format);
+   }
 
    /* Check if we can create shader resource view and
     * render target view for the quad blitter to work