mirror of https://gitlab.freedesktop.org/mesa/mesa
zink: use zink_shader_key_optimal unions for pipeline state asserts
no functional changes, just easier to debug fails Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28955>
This commit is contained in:
parent
8432876614
commit
7bdaf6e95f
|
@ -128,9 +128,9 @@ zink_get_gfx_pipeline(struct zink_context *ctx,
|
|||
/* extra safety asserts for optimal path to catch refactoring bugs */
|
||||
if (prog->optimal_keys) {
|
||||
ASSERTED const union zink_shader_key_optimal *opt = (union zink_shader_key_optimal*)&prog->last_variant_hash;
|
||||
ASSERTED uint32_t sanitized = zink_sanitize_optimal_key(ctx->gfx_stages, ctx->gfx_pipeline_state.shader_keys_optimal.key.val);
|
||||
assert(opt->val == sanitized);
|
||||
assert(state->optimal_key == sanitized);
|
||||
ASSERTED union zink_shader_key_optimal sanitized{.val = zink_sanitize_optimal_key(ctx->gfx_stages, ctx->gfx_pipeline_state.shader_keys_optimal.key.val)};
|
||||
assert(opt->val == sanitized.val);
|
||||
assert(state->optimal_key == sanitized.val);
|
||||
}
|
||||
/* recalc vertex state if missing optimal extensions */
|
||||
if (DYNAMIC_STATE != ZINK_DYNAMIC_VERTEX_INPUT2 && DYNAMIC_STATE != ZINK_DYNAMIC_VERTEX_INPUT && ctx->vertex_state_changed) {
|
||||
|
|
Loading…
Reference in New Issue