mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
zink: fix global stores
We have to cast the value if the type doesn't match.
Fixes: ddc5c30489 ("zink: handle global and scratch vars")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24859>
This commit is contained in:
parent
ac1685bc6a
commit
ac289b7268
1 changed files with 2 additions and 0 deletions
|
|
@ -2517,6 +2517,8 @@ emit_store_global(struct ntv_context *ctx, nir_intrinsic_instr *intr)
|
|||
dest_type);
|
||||
nir_alu_type atype;
|
||||
SpvId param = get_src(ctx, &intr->src[0], &atype);
|
||||
if (atype != nir_type_uint)
|
||||
param = emit_bitcast(ctx, dest_type, param);
|
||||
SpvId ptr = emit_bitcast(ctx, pointer_type, get_src(ctx, &intr->src[1], &atype));
|
||||
spirv_builder_emit_store_aligned(&ctx->builder, ptr, param, bit_size / 8);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue