mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
zink/spirv: unit_value -> raw_value
The point here isn't that the value is uint, but that is't untreated. So raw seems more fitting as a description. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
This commit is contained in:
parent
16339646f0
commit
7c1a2cbcad
1 changed files with 5 additions and 5 deletions
|
|
@ -864,7 +864,7 @@ alu_instr_src_components(const nir_alu_instr *instr, unsigned src)
|
||||||
static SpvId
|
static SpvId
|
||||||
get_alu_src(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src)
|
get_alu_src(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src)
|
||||||
{
|
{
|
||||||
SpvId uint_value = get_alu_src_raw(ctx, alu, src);
|
SpvId raw_value = get_alu_src_raw(ctx, alu, src);
|
||||||
|
|
||||||
unsigned num_components = alu_instr_src_components(alu, src);
|
unsigned num_components = alu_instr_src_components(alu, src);
|
||||||
unsigned bit_size = nir_src_bit_size(alu->src[src].src);
|
unsigned bit_size = nir_src_bit_size(alu->src[src].src);
|
||||||
|
|
@ -873,16 +873,16 @@ get_alu_src(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src)
|
||||||
switch (nir_alu_type_get_base_type(type)) {
|
switch (nir_alu_type_get_base_type(type)) {
|
||||||
case nir_type_bool:
|
case nir_type_bool:
|
||||||
assert(bit_size == 1);
|
assert(bit_size == 1);
|
||||||
return uvec_to_bvec(ctx, uint_value, num_components);
|
return uvec_to_bvec(ctx, raw_value, num_components);
|
||||||
|
|
||||||
case nir_type_int:
|
case nir_type_int:
|
||||||
return bitcast_to_ivec(ctx, uint_value, bit_size, num_components);
|
return bitcast_to_ivec(ctx, raw_value, bit_size, num_components);
|
||||||
|
|
||||||
case nir_type_uint:
|
case nir_type_uint:
|
||||||
return uint_value;
|
return raw_value;
|
||||||
|
|
||||||
case nir_type_float:
|
case nir_type_float:
|
||||||
return bitcast_to_fvec(ctx, uint_value, bit_size, num_components);
|
return bitcast_to_fvec(ctx, raw_value, bit_size, num_components);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
unreachable("unknown nir_alu_type");
|
unreachable("unknown nir_alu_type");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue