mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
lavapipe: treat NULL pColorAttachmentLocations as no handles
this fixes a crash seen in: dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.interaction_with_color_write_enable Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41309>
This commit is contained in:
parent
be75ece095
commit
9cb688af88
1 changed files with 6 additions and 4 deletions
|
|
@ -2062,10 +2062,12 @@ handle_rendering_attachment_locations(struct vk_cmd_queue_entry *cmd, struct ren
|
|||
state->fb_remapped = true;
|
||||
memset(state->fb_map, PIPE_MAX_COLOR_BUFS, sizeof(state->fb_map));
|
||||
assert(state->color_att_count == set->colorAttachmentCount);
|
||||
for (unsigned i = 0; i < state->color_att_count; i++) {
|
||||
if (set->pColorAttachmentLocations[i] == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
state->fb_map[i] = set->pColorAttachmentLocations[i];
|
||||
if (set->pColorAttachmentLocations) {
|
||||
for (unsigned i = 0; i < state->color_att_count; i++) {
|
||||
if (set->pColorAttachmentLocations[i] == VK_ATTACHMENT_UNUSED)
|
||||
continue;
|
||||
state->fb_map[i] = set->pColorAttachmentLocations[i];
|
||||
}
|
||||
}
|
||||
emit_fb_state(state);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue