mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-21 13:18:09 +02:00
lavapipe: update cbuf count when remapping attachments
handle cases where attachments are remapped to higher indices than
the renderpass was created with
fixes:
dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.local_read.mapping_*_attachments_to_locs_from_*
cc: mesa-stable
(cherry picked from commit 563259eaa9)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41540>
This commit is contained in:
parent
9be16393a6
commit
72b5aad56d
2 changed files with 4 additions and 2 deletions
|
|
@ -2964,7 +2964,7 @@
|
|||
"description": "lavapipe: update cbuf count when remapping attachments",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -346,8 +346,10 @@ emit_fb_state(struct rendering_state *state)
|
|||
struct pipe_framebuffer_state fb = state->framebuffer;
|
||||
memset(fb.cbufs, 0, sizeof(fb.cbufs));
|
||||
for (unsigned i = 0; i < fb.nr_cbufs; i++) {
|
||||
if (state->fb_map[i] < PIPE_MAX_COLOR_BUFS)
|
||||
if (state->fb_map[i] < PIPE_MAX_COLOR_BUFS) {
|
||||
fb.cbufs[state->fb_map[i]] = state->framebuffer.cbufs[i];
|
||||
fb.nr_cbufs = MAX2(fb.nr_cbufs, state->fb_map[i] + 1);
|
||||
}
|
||||
}
|
||||
state->pctx->set_framebuffer_state(state->pctx, &fb);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue