mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
zink: fix gl_SampleMaskIn spirv generation
the uint[1] -> uint dance is only relevant on the first load, so move the variable type shuffling inside the create block to avoid breaking successive loads fixes #5543 cc: mesa-stable Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13488>
This commit is contained in:
parent
f42a4f6451
commit
8899f6a198
1 changed files with 5 additions and 5 deletions
|
|
@ -2368,12 +2368,12 @@ static void
|
|||
emit_load_uint_input(struct ntv_context *ctx, nir_intrinsic_instr *intr, SpvId *var_id, const char *var_name, SpvBuiltIn builtin)
|
||||
{
|
||||
SpvId var_type = spirv_builder_type_uint(&ctx->builder, 32);
|
||||
if (builtin == SpvBuiltInSampleMask) {
|
||||
/* gl_SampleMaskIn is an array[1] in spirv... */
|
||||
var_type = spirv_builder_type_array(&ctx->builder, var_type, emit_uint_const(ctx, 32, 1));
|
||||
spirv_builder_emit_array_stride(&ctx->builder, var_type, sizeof(uint32_t));
|
||||
}
|
||||
if (!*var_id) {
|
||||
if (builtin == SpvBuiltInSampleMask) {
|
||||
/* gl_SampleMaskIn is an array[1] in spirv... */
|
||||
var_type = spirv_builder_type_array(&ctx->builder, var_type, emit_uint_const(ctx, 32, 1));
|
||||
spirv_builder_emit_array_stride(&ctx->builder, var_type, sizeof(uint32_t));
|
||||
}
|
||||
*var_id = create_builtin_var(ctx, var_type,
|
||||
SpvStorageClassInput,
|
||||
var_name,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue