vtn: add more info to bitcast bit size error message

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22932>
This commit is contained in:
Mike Blumenkrantz 2023-05-11 10:21:18 -04:00 committed by Marge Bot
parent 3511bb9eea
commit f9688f6378

View file

@ -1301,8 +1301,8 @@ vtn_handle_bitcast(struct vtn_builder *b, const uint32_t *w, unsigned count)
vtn_fail_if(src->num_components * src->bit_size !=
glsl_get_vector_elements(type->type) * glsl_get_bit_size(type->type),
"Source and destination of OpBitcast must have the same "
"total number of bits");
"Source (%%%u) and destination (%%%u) of OpBitcast must have the same "
"total number of bits", w[3], w[2]);
nir_ssa_def *val =
nir_bitcast_vector(&b->nb, src, glsl_get_bit_size(type->type));
vtn_push_nir_ssa(b, w[2], val);