[Mesa-dev] [PATCH] radv: avoid GPU hangs if someone does a resolve with non-multisample src
Dave Airlie
airlied at gmail.com
Fri Aug 4 01:15:18 UTC 2017
From: Dave Airlie <airlied at redhat.com>
This is a bug in the app, but I'd rather avoid hanging the GPU,
esp if someone is running in validation and it takes out their
development environment.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/amd/vulkan/radv_meta_resolve.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 6cd0c38..488c8f4 100644
--- a/src/amd/vulkan/radv_meta_resolve.c
+++ b/src/amd/vulkan/radv_meta_resolve.c
@@ -382,6 +382,11 @@ void radv_CmdResolveImage(
radv_meta_save_graphics_reset_vport_scissor_novertex(&saved_state, cmd_buffer);
assert(src_image->info.samples > 1);
+ if (src_image->info.samples > 1) {
+ /* this causes GPU hangs if we get past here */
+ fprintf(stderr, "radv: Illegal resolve operation (src not multisampled), will hang GPU.");
+ return;
+ }
assert(dest_image->info.samples == 1);
if (src_image->info.samples >= 16) {
--
2.9.4
More information about the mesa-dev
mailing list