mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
zink: handle 64bit constant loading in ntv
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7654>
This commit is contained in:
parent
bb326973fc
commit
fb4a2490d8
1 changed files with 6 additions and 2 deletions
|
|
@ -1562,7 +1562,7 @@ emit_load_const(struct ntv_context *ctx, nir_load_const_instr *load_const)
|
|||
} else {
|
||||
for (int i = 0; i < num_components; i++)
|
||||
components[i] = emit_uint_const(ctx, bit_size,
|
||||
load_const->value[i].u32);
|
||||
bit_size == 64 ? load_const->value[i].u64 : load_const->value[i].u32);
|
||||
|
||||
}
|
||||
constant = spirv_builder_const_composite(&ctx->builder, type,
|
||||
|
|
@ -1572,8 +1572,12 @@ emit_load_const(struct ntv_context *ctx, nir_load_const_instr *load_const)
|
|||
if (bit_size == 1)
|
||||
constant = spirv_builder_const_bool(&ctx->builder,
|
||||
load_const->value[0].b);
|
||||
else
|
||||
else if (bit_size == 32)
|
||||
constant = emit_uint_const(ctx, bit_size, load_const->value[0].u32);
|
||||
else if (bit_size == 64)
|
||||
constant = emit_uint_const(ctx, bit_size, load_const->value[0].u64);
|
||||
else
|
||||
unreachable("unhandled constant bit size!");
|
||||
}
|
||||
|
||||
store_ssa_def(ctx, &load_const->def, constant);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue