aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_format_convert.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-08-13 14:57:22 -0500
committerJason Ekstrand <[email protected]>2018-08-29 14:04:02 -0500
commit152fdeddbb7fa43649b864cfd1b98f40e9a355bb (patch)
treedd8a0fb7783f67fdf99e24ddd0806d46b2af7cbc /src/compiler/nir/nir_format_convert.h
parent7c5df52bdc5e673ed818c1a90ba7a28031f6b159 (diff)
nir/format_convert: Rename nir_format_bitcast_uint_vec
We have a name for that, it's called a uvec. This just makes the function name a bit shorter. While we're here, we also add an assert for one of the assumptions this function makes. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_format_convert.h')
-rw-r--r--src/compiler/nir/nir_format_convert.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/nir/nir_format_convert.h b/src/compiler/nir/nir_format_convert.h
index 305273cdfdd..f2eafcbf5b4 100644
--- a/src/compiler/nir/nir_format_convert.h
+++ b/src/compiler/nir/nir_format_convert.h
@@ -148,9 +148,10 @@ nir_format_pack_uint(nir_builder *b, nir_ssa_def *color,
}
static inline nir_ssa_def *
-nir_format_bitcast_uint_vec_unmasked(nir_builder *b, nir_ssa_def *src,
- unsigned src_bits, unsigned dst_bits)
+nir_format_bitcast_uvec_unmasked(nir_builder *b, nir_ssa_def *src,
+ unsigned src_bits, unsigned dst_bits)
{
+ assert(src->bit_size >= src_bits && src->bit_size >= dst_bits);
assert(src_bits == 8 || src_bits == 16 || src_bits == 32);
assert(dst_bits == 8 || dst_bits == 16 || dst_bits == 32);