zink: avoid designated initializers as they are not supported in C++ < 20
error C7555: use of designated initializers requires at least '/std:c++20'
Fixes: 7bdaf6e95f ("zink: use zink_shader_key_optimal unions for pipeline state asserts")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29139>
This commit is contained in:
committed by
Marge Bot
parent
320c0b44f4
commit
654ef35635
@@ -128,7 +128,8 @@ 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 union zink_shader_key_optimal sanitized{.val = zink_sanitize_optimal_key(ctx->gfx_stages, ctx->gfx_pipeline_state.shader_keys_optimal.key.val)};
|
||||
ASSERTED union zink_shader_key_optimal sanitized = {};
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user