diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 5f5d0b7473d..d285acaac10 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -917,15 +917,20 @@ zink_set_framebuffer_state(struct pipe_context *pctx, zink_framebuffer_reference(screen, &fb, NULL); fb = create_framebuffer(ctx); zink_framebuffer_reference(screen, &ctx->framebuffer, fb); + if (ctx->gfx_pipeline_state.render_pass != fb->rp) + ctx->gfx_pipeline_state.dirty = true; ctx->gfx_pipeline_state.render_pass = fb->rp; uint8_t rast_samples = util_framebuffer_get_num_samples(state); /* in vulkan, gl_SampleMask needs to be explicitly ignored for sampleCount == 1 */ if ((ctx->gfx_pipeline_state.rast_samples > 1) != (rast_samples > 1)) ctx->dirty_shader_stages |= 1 << PIPE_SHADER_FRAGMENT; + if (ctx->gfx_pipeline_state.rast_samples != rast_samples) + ctx->gfx_pipeline_state.dirty = true; ctx->gfx_pipeline_state.rast_samples = rast_samples; + if (ctx->gfx_pipeline_state.num_attachments != state->nr_cbufs) + ctx->gfx_pipeline_state.dirty = true; ctx->gfx_pipeline_state.num_attachments = state->nr_cbufs; - ctx->gfx_pipeline_state.dirty = true; /* need to start a new renderpass */ if (zink_curr_batch(ctx)->in_rp)