zink: block pipeline fast-pathing for any programs using depth texture modes

the data for this is too big to compress into a shader key, so these pipelines
will always consume more cpu

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20598>
This commit is contained in:
Mike Blumenkrantz
2023-01-05 16:39:08 -05:00
committed by Marge Bot
parent 1b2bf99f05
commit ef233d43f4

View File

@@ -226,7 +226,10 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
const int rp_idx = state->render_pass ? 1 : 0;
/* shortcut for reusing previous pipeline across program changes */
if (DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT || DYNAMIC_STATE == ZINK_DYNAMIC_VERTEX_INPUT2) {
if (prog->last_finalized_hash[rp_idx][idx] == state->final_hash && !prog->inline_variants && likely(prog->last_pipeline[rp_idx][idx])) {
if (prog->last_finalized_hash[rp_idx][idx] == state->final_hash &&
!prog->inline_variants && likely(prog->last_pipeline[rp_idx][idx]) &&
/* this data is too big to compare in the fast-path */
likely(!prog->shaders[MESA_SHADER_FRAGMENT]->fs.legacy_shadow_mask)) {
state->pipeline = prog->last_pipeline[rp_idx][idx]->pipeline;
return state->pipeline;
}