radv: assert that colorAttachment is valid for CmdClearAttachment
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 6 Feb 2019 17:48:38 +0000 (17:48 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 8 Feb 2019 00:18:16 +0000 (00:18 +0000)
commitf1bcb9be46898580c9928c3dc9078f9f3e0be67d
tree17e3d845e1a8c533dcb3eeacf96c93c98e4c13f9
parenta934a3d1245d823650a18830bab2f6b7b4b4dbbe
radv: assert that colorAttachment is valid for CmdClearAttachment

This partially reverts a change from b7a93cbdede05a ("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: b7a93cbdede05a ("radv: Handle VK_ATTACHMENT_UNUSED in CmdClearAttachment")
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_clear.c