mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +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>
(cherry picked from commit 9cb688af88)
This commit is contained in:
parent
7f29cae6bc
commit
2dd9d60b3a
2 changed files with 7 additions and 5 deletions
|
|
@ -1554,7 +1554,7 @@
|
|||
"description": "lavapipe: treat NULL pColorAttachmentLocations as no handles",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2000,10 +2000,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