zink: don't update tc info directly from cso binds
this somehow becomes expensive at extremely high fps, so defer until rp begin to check layout change state Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>
This commit is contained in:
committed by
Marge Bot
parent
7b4c1b3a42
commit
58b82d231d
@@ -2804,6 +2804,10 @@ void
|
||||
zink_batch_rp(struct zink_context *ctx)
|
||||
{
|
||||
assert(!(ctx->batch.in_rp && ctx->rp_changed));
|
||||
if (!ctx->track_renderpasses && !ctx->blitting) {
|
||||
if (ctx->rp_tc_info_updated)
|
||||
zink_parse_tc_info(ctx);
|
||||
}
|
||||
if (ctx->batch.in_rp && !ctx->rp_layout_changed)
|
||||
return;
|
||||
bool in_rp = ctx->batch.in_rp;
|
||||
|
||||
@@ -1858,7 +1858,7 @@ zink_bind_fs_state(struct pipe_context *pctx,
|
||||
!zink_screen(pctx->screen)->driver_workarounds.needs_zs_shader_swizzle)
|
||||
zink_update_shadow_samplerviews(ctx, shadow_mask | ctx->gfx_stages[MESA_SHADER_FRAGMENT]->fs.legacy_shadow_mask);
|
||||
if (!ctx->track_renderpasses && !ctx->blitting)
|
||||
zink_parse_tc_info(ctx);
|
||||
ctx->rp_tc_info_updated = true;
|
||||
}
|
||||
zink_update_fbfetch(ctx);
|
||||
}
|
||||
|
||||
@@ -545,8 +545,6 @@ zink_bind_depth_stencil_alpha_state(struct pipe_context *pctx, void *cso)
|
||||
{
|
||||
struct zink_context *ctx = zink_context(pctx);
|
||||
|
||||
bool prev_zsread = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_test || ctx->dsa_state->hw_state.stencil_test : false;
|
||||
bool prev_zswrite = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_write || ctx->dsa_state->hw_state.stencil_test : false;
|
||||
zink_flush_dgc_if_enabled(ctx);
|
||||
ctx->dsa_state = cso;
|
||||
|
||||
@@ -558,12 +556,8 @@ zink_bind_depth_stencil_alpha_state(struct pipe_context *pctx, void *cso)
|
||||
ctx->dsa_state_changed = true;
|
||||
}
|
||||
}
|
||||
if (!ctx->track_renderpasses && !ctx->blitting) {
|
||||
bool zs_write = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_write || ctx->dsa_state->hw_state.stencil_test : false;
|
||||
bool zs_read = ctx->dsa_state ? ctx->dsa_state->hw_state.depth_test || ctx->dsa_state->hw_state.stencil_test : false;
|
||||
if (prev_zswrite != zs_write || prev_zsread != zs_read)
|
||||
zink_parse_tc_info(ctx);
|
||||
}
|
||||
if (!ctx->track_renderpasses && !ctx->blitting)
|
||||
ctx->rp_tc_info_updated = true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user