zink: don't set shared block stride without KHR_workgroup_memory_explicit_layout

this is illegal

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33651>
This commit is contained in:
Mike Blumenkrantz 2025-04-07 11:12:21 -04:00 committed by Marge Bot
parent 74531094cb
commit 1c0de360bc

View file

@ -687,7 +687,8 @@ create_shared_block(struct ntv_context *ctx, unsigned bit_size)
}
ctx->shared_block_arr_type[idx] = array;
spirv_builder_emit_array_stride(&ctx->builder, array, bit_size / 8);
if (ctx->sinfo->have_workgroup_memory_explicit_layout)
spirv_builder_emit_array_stride(&ctx->builder, array, bit_size / 8);
/* Create wrapper struct for Block, Offset and Aliased decorations. */
SpvId block = spirv_builder_type_struct(&ctx->builder, &array, 1);