Module: Mesa
Branch: master
Commit: a37eede540a69392f817162b0c37a992d59a0b17
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a37eede540a69392f817162b0c37a992d59a0b17

Author: Thomas Hellstrom <[email protected]>
Date:   Wed Jun 14 15:39:42 2017 +0200

svga: Fix incorrect format conversion blit destination

The blit.dst.resource member that was used as destination was
modified earlier in the function, effectively making us try to blit
the content onto itself. Fix this and also add a debug printout when the
format conversion blits fail.

Signed-off-by: Thomas Hellstrom <[email protected]>
Reviewed-by: Neha Bhende <[email protected]>

---

 src/gallium/drivers/svga/svga_pipe_blit.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c 
b/src/gallium/drivers/svga/svga_pipe_blit.c
index fd287a1815..28996062ab 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -547,6 +547,7 @@ try_blit(struct svga_context *svga, const struct 
pipe_blit_info *blit_info)
                       blit.src.level, &blit.src.box,
                       &copy_region_blit);
       if (!try_copy_region(svga, &copy_region_blit)) {
+         debug_printf("svga: Source blit format conversion failed.\n");
          ret = false;
          goto done;
       }
@@ -593,13 +594,14 @@ try_blit(struct svga_context *svga, const struct 
pipe_blit_info *blit_info)
        * A temporary resource was created for the blit, we need to
        * copy from the temporary resource back to the original destination.
        */
-      build_blit_info(blit.dst.resource,
+      build_blit_info(dst,
                       blit.dst.level, blit.dst.box.x,
                       blit.dst.box.y, blit.dst.box.z,
                       newDst,
                       blit.dst.level, &blit.dst.box,
                       &copy_region_blit);
       if (!try_copy_region(svga, &copy_region_blit)) {
+         debug_printf("svga: Destination blit format conversion failed.\n");
          ret = false;
          goto done;
       }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to