mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +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 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41407>
This commit is contained in:
parent
ffd534aae4
commit
563259eaa9
1 changed files with 3 additions and 1 deletions
|
|
@ -390,8 +390,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