pan/bi: Use the correct size for UBO loads

Multiply by the destination bit size to get the number of bits to
load instead of assuming 32 bits.

Fixes: 2e57684d2d ("pan/bi: Implement load_ubo with the builder")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9071>
This commit is contained in:
Icecream95 2021-02-11 23:51:10 +13:00 committed by Marge Bot
parent 596fb88c01
commit 9bb376bbdb
1 changed files with 1 additions and 1 deletions

View File

@ -550,7 +550,7 @@ bi_emit_load_ubo(bi_builder *b, nir_intrinsic_instr *instr)
uint32_t const_offset = offset_is_const ? nir_src_as_uint(*offset) : 0;
bool kernel_input = (instr->intrinsic == nir_intrinsic_load_kernel_input);
bi_load_to(b, instr->num_components * 32,
bi_load_to(b, instr->num_components * nir_dest_bit_size(instr->dest),
bi_dest_index(&instr->dest), offset_is_const ?
bi_imm_u32(const_offset) : dyn_offset,
kernel_input ? bi_zero() : bi_src_index(&instr->src[0]),