diff options
author | Lionel Landwerlin <[email protected]> | 2019-02-06 17:37:58 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2019-02-08 00:18:16 +0000 |
commit | a934a3d1245d823650a18830bab2f6b7b4b4dbbe (patch) | |
tree | 3e6f02c5079fad96a5b4deda819c08ac1b30f639 /src/intel/vulkan | |
parent | 3c153b39823ee085bfe46ce4afbe347dee0fdfee (diff) |
anv: assert that color attachment are valid
This reverts commit d76e7779884775bcebf235adb0e8367816b9b95d.
Let's make this obvious that there is an application issue if it tries
to access an attachment that doesn't exist in the current pass.
Signed-off-by: Lionel Landwerlin <[email protected]>
Fixes: d76e7779884775 ("anv: Handle VK_ATTACHMENT_UNUSED in colorAttachment")
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_blorp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index fbe3e82af59..f4eaf8f4db1 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -1013,10 +1013,7 @@ clear_color_attachment(struct anv_cmd_buffer *cmd_buffer, { const struct anv_subpass *subpass = cmd_buffer->state.subpass; const uint32_t color_att = attachment->colorAttachment; - - if (color_att == VK_ATTACHMENT_UNUSED) - return; - + assert(color_att < subpass->color_count); const uint32_t att_idx = subpass->color_attachments[color_att].attachment; if (att_idx == VK_ATTACHMENT_UNUSED) |