mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 13:30:12 +01:00
iris: Fix framebuffer layer count
cso_fb->layers is only valid for no-attachment framebuffers. Use the helper function to get the real value, then stash it so we don't have to call the helper function on the old value for comparison, or at draw time for Force Zero RTA Index setting. This fixes Force Zero RTA Index being set even when attempting layered rendering.
This commit is contained in:
parent
df60241ff7
commit
2ca0d913ea
1 changed files with 3 additions and 1 deletions
|
|
@ -2088,6 +2088,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
|
||||||
struct iris_resource *stencil_res;
|
struct iris_resource *stencil_res;
|
||||||
|
|
||||||
unsigned samples = util_framebuffer_get_num_samples(state);
|
unsigned samples = util_framebuffer_get_num_samples(state);
|
||||||
|
unsigned layers = util_framebuffer_get_num_layers(state);
|
||||||
|
|
||||||
if (cso->samples != samples) {
|
if (cso->samples != samples) {
|
||||||
ice->state.dirty |= IRIS_DIRTY_MULTISAMPLE;
|
ice->state.dirty |= IRIS_DIRTY_MULTISAMPLE;
|
||||||
|
|
@ -2097,7 +2098,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
|
||||||
ice->state.dirty |= IRIS_DIRTY_BLEND_STATE;
|
ice->state.dirty |= IRIS_DIRTY_BLEND_STATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cso->layers == 0) != (state->layers == 0)) {
|
if ((cso->layers == 0) != (layers == 0)) {
|
||||||
ice->state.dirty |= IRIS_DIRTY_CLIP;
|
ice->state.dirty |= IRIS_DIRTY_CLIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2107,6 +2108,7 @@ iris_set_framebuffer_state(struct pipe_context *ctx,
|
||||||
|
|
||||||
util_copy_framebuffer_state(cso, state);
|
util_copy_framebuffer_state(cso, state);
|
||||||
cso->samples = samples;
|
cso->samples = samples;
|
||||||
|
cso->layers = layers;
|
||||||
|
|
||||||
struct iris_depth_buffer_state *cso_z = &ice->state.genx->depth_buffer;
|
struct iris_depth_buffer_state *cso_z = &ice->state.genx->depth_buffer;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue