summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-08-04 02:13:55 +0100
committerEmil Velikov <[email protected]>2017-08-11 20:52:13 +0100
commit07b5c788367df13afe5027a84b2ec305f1e94e5a (patch)
tree4dda96cbe5fdfadefcc81af6b1fd4e64a89463bf
parent59f7fdb85e363f40f94e4585561a200282f2d9b6 (diff)
radv: avoid GPU hangs if someone does a resolve with non-multisample src (v2)
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. v2: get it right, reverse the polarity. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: <[email protected]> Signed-off-by: Dave Airlie <[email protected]> (cherry picked from commit 36a1b61321561634c6b243cf876c347fef73dfa4)
-rw-r--r--src/amd/vulkan/radv_meta_resolve.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c
index 6cd0c381a54..6023e0f8999 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) {