Verify preconditions for copy_region_fallback() before using it, else
try cpu_blit if it fails to meet preconditions
Fixes crash with viewperf after merged-master-2019-12-10
Fixes: b30589cbd3dd ("mesa/st: Reuse st_choose_matching_format from
st_choose_format()")
Reviewed-by: Charmaine Lee <[email protected]
---
src/gallium/drivers/svga/svga_pipe_blit.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/svga/svga_pipe_blit.c
b/src/gallium/drivers/svga/svga_pipe_blit.c
index d889d4a13a8..242b4110220 100644
--- a/src/gallium/drivers/svga/svga_pipe_blit.c
+++ b/src/gallium/drivers/svga/svga_pipe_blit.c
@@ -881,8 +881,10 @@ svga_resource_copy_region(struct pipe_context *pipe,
try_blit(svga, &blit))
goto done;
- copy_region_fallback(svga, dst_tex, dst_level, dstx, dsty, dstz,
- src_tex, src_level, src_box);
+ if (!try_cpu_copy_region(svga, &blit)) {
+ if (!try_cpu_blit(svga, &blit))
+ debug_printf("Blit failed.\n");
+ }
}
done:
--
2.17.1
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev