mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radv: assert that colorAttachment is valid for CmdClearAttachment
This partially reverts a change fromb7a93cbded("radv: Handle VK_ATTACHMENT_UNUSED in CmdClearAttachment") which fixed actual issues but also started to accept invalid values for the colorAttachment field. This change asserts that the field is valid for the current pass. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:b7a93cbded("radv: Handle VK_ATTACHMENT_UNUSED in CmdClearAttachment") Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
parent
a934a3d124
commit
f1bcb9be46
1 changed files with 1 additions and 3 deletions
|
|
@ -1522,9 +1522,7 @@ emit_clear(struct radv_cmd_buffer *cmd_buffer,
|
|||
|
||||
if (aspects & VK_IMAGE_ASPECT_COLOR_BIT) {
|
||||
const uint32_t subpass_att = clear_att->colorAttachment;
|
||||
if (subpass_att == VK_ATTACHMENT_UNUSED)
|
||||
return;
|
||||
|
||||
assert(subpass_att < subpass->color_count);
|
||||
const uint32_t pass_att = subpass->color_attachments[subpass_att].attachment;
|
||||
if (pass_att == VK_ATTACHMENT_UNUSED)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue