aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink/nir_to_spirv
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-02-10 16:04:45 +0100
committerMarge Bot <[email protected]>2020-02-17 12:46:54 +0000
commit4d016de25052cc28d449538fddbe755aaff85d0a (patch)
tree2bfe1159265d837328c836319328874301450cfc /src/gallium/drivers/zink/nir_to_spirv
parent7c1a2cbcadf8d4a366df3f96818c19e082764c56 (diff)
zink/spirv: uint -> raw
Similarly to the previous commit, the important bit here is the rawness of these variables, not the uintness. So let's rename these to reflect this. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3763>
Diffstat (limited to 'src/gallium/drivers/zink/nir_to_spirv')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index 8df35a31738..46e623a0c6d 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -601,26 +601,29 @@ get_alu_src_raw(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src)
int bit_size = nir_src_bit_size(alu->src[src].src);
assert(bit_size == 1 || bit_size == 32);
- SpvId uint_type = spirv_builder_type_uint(&ctx->builder, MAX2(bit_size, 32));
+ SpvId raw_type = spirv_builder_type_uint(&ctx->builder, MAX2(bit_size, 32));
if (used_channels == 1) {
uint32_t indices[] = { alu->src[src].swizzle[0] };
- return spirv_builder_emit_composite_extract(&ctx->builder, uint_type,
+ return spirv_builder_emit_composite_extract(&ctx->builder, raw_type,
def, indices,
ARRAY_SIZE(indices));
} else if (live_channels == 1) {
- SpvId uvec_type = spirv_builder_type_vector(&ctx->builder, uint_type,
- used_channels);
+ SpvId raw_vec_type = spirv_builder_type_vector(&ctx->builder,
+ raw_type,
+ used_channels);
SpvId constituents[NIR_MAX_VEC_COMPONENTS];
for (unsigned i = 0; i < used_channels; ++i)
constituents[i] = def;
- return spirv_builder_emit_composite_construct(&ctx->builder, uvec_type,
+ return spirv_builder_emit_composite_construct(&ctx->builder,
+ raw_vec_type,
constituents,
used_channels);
} else {
- SpvId uvec_type = spirv_builder_type_vector(&ctx->builder, uint_type,
- used_channels);
+ SpvId raw_vec_type = spirv_builder_type_vector(&ctx->builder,
+ raw_type,
+ used_channels);
uint32_t components[NIR_MAX_VEC_COMPONENTS];
size_t num_components = 0;
@@ -631,8 +634,9 @@ get_alu_src_raw(struct ntv_context *ctx, nir_alu_instr *alu, unsigned src)
components[num_components++] = alu->src[src].swizzle[i];
}
- return spirv_builder_emit_vector_shuffle(&ctx->builder, uvec_type,
- def, def, components, num_components);
+ return spirv_builder_emit_vector_shuffle(&ctx->builder, raw_vec_type,
+ def, def, components,
+ num_components);
}
}