radv: fix CmdSetColorWriteEnableEXT(attachmentCount==MAX_RTS)

cc: mesa-stable

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15508>
(cherry picked from commit e23f881311)
This commit is contained in:
Mike Blumenkrantz 2022-03-22 15:49:21 -04:00 committed by Dylan Baker
parent c5da1584fe
commit 67ba608c95
2 changed files with 2 additions and 2 deletions

View file

@ -556,7 +556,7 @@
"description": "radv: fix CmdSetColorWriteEnableEXT(attachmentCount==MAX_RTS)",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"because_sha": null
},
{

View file

@ -5502,7 +5502,7 @@ radv_CmdSetColorWriteEnableEXT(VkCommandBuffer commandBuffer, uint32_t attachmen
struct radv_cmd_state *state = &cmd_buffer->state;
uint32_t color_write_enable = 0;
assert(attachmentCount < MAX_RTS);
assert(attachmentCount <= MAX_RTS);
for (uint32_t i = 0; i < attachmentCount; i++) {
color_write_enable |= pColorWriteEnables[i] ? (0xfu << (i * 4)) : 0;