aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2019-07-22 08:12:48 (GMT)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2019-07-22 12:25:54 (GMT)
commitb5116d3cb7b6d81532fa15f8d94942ce94051652 (patch)
tree262094542cee7761cfdccc6b3f588935970787af
parent253be494022c415b766eff47560b80ba7b577a02 (diff)
downloadexternal_mesa3d-b5116d3cb7b6d81532fa15f8d94942ce94051652.zip
external_mesa3d-b5116d3cb7b6d81532fa15f8d94942ce94051652.tar.gz
external_mesa3d-b5116d3cb7b6d81532fa15f8d94942ce94051652.tar.bz2
radv: fix crash in vkCmdClearAttachments with unused attachment
depth_stencil_attachment and/or ds_resolve attachment can be NULL. This fixes crashes with dEQP-VK.renderpass.suballocation.unused_clear_attachments.* Cc: 19.1 <mesa-stable@lists.freedesktop.org> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
-rw-r--r--src/amd/vulkan/radv_meta_clear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
index dd2ba40..b93ba3e 100644
--- a/src/amd/vulkan/radv_meta_clear.c
+++ b/src/amd/vulkan/radv_meta_clear.c
@@ -1688,7 +1688,7 @@ emit_clear(struct radv_cmd_buffer *cmd_buffer,
if (ds_resolve_clear)
ds_att = subpass->ds_resolve_attachment;
- if (ds_att->attachment == VK_ATTACHMENT_UNUSED)
+ if (!ds_att || ds_att->attachment == VK_ATTACHMENT_UNUSED)
return;
VkImageLayout image_layout = ds_att->layout;