summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_format_convert.h5
-rw-r--r--src/intel/blorp/blorp_blit.c2
2 files changed, 4 insertions, 3 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);
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 7cc580abd06..60cb32641d6 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -939,7 +939,7 @@ bit_cast_color(struct nir_builder *b, nir_ssa_def *color,
isl_format_get_num_channels(key->src_format);
color = nir_channels(b, color, (1 << src_channels) - 1);
- color = nir_format_bitcast_uint_vec_unmasked(b, color, src_bpc, dst_bpc);
+ color = nir_format_bitcast_uvec_unmasked(b, color, src_bpc, dst_bpc);
}
/* Blorp likes to assume that colors are vec4s */