anv: fix FS output <-> attachment map building
The arrays is first memset to OUTPUT_DISABLED, but if we iterate over MAX_RTS instead of the actual attachment count, we end up resetting any values not set by the application to the, probably identity, that comes from the state. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37531>
This commit is contained in:
@@ -665,7 +665,7 @@ cmd_buffer_maybe_flush_rt_writes(struct anv_cmd_buffer *cmd_buffer,
|
||||
/* Build a map of fragment color output to attachment */
|
||||
uint8_t rt_to_att[MAX_RTS];
|
||||
memset(rt_to_att, ANV_COLOR_OUTPUT_DISABLED, MAX_RTS);
|
||||
for (uint32_t i = 0; i < MAX_RTS; i++) {
|
||||
for (uint32_t i = 0; i < gfx->color_att_count; i++) {
|
||||
if (dyn->cal.color_map[i] != MESA_VK_ATTACHMENT_UNUSED)
|
||||
rt_to_att[dyn->cal.color_map[i]] = i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user