mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +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> (cherry picked from commitac289b7268)
This commit is contained in:
parent
f81d8db0ac
commit
a078c471d3
2 changed files with 3 additions and 1 deletions
|
|
@ -10994,7 +10994,7 @@
|
|||
"description": "zink: fix global stores",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "ddc5c3048992debc3cedd22b0f2ff2ca27e8d7e4",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2984,6 +2984,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(&ctx->builder, ptr, param);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue