mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
zink: only reset pipeline hash conditionally when updating fb state
if we aren't changing anything here then we don't need to update the pipeline Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9189>
This commit is contained in:
parent
b1843879c1
commit
98250d42b7
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue