mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
pan/bi: Handle 64-bit sources in bi_alu_src_index()
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com> Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40576>
This commit is contained in:
parent
4be0e46e61
commit
9950a98d5e
1 changed files with 2 additions and 4 deletions
|
|
@ -2545,11 +2545,9 @@ bi_alu_src_index(bi_builder *b, nir_alu_src src, unsigned comps)
|
|||
|
||||
unsigned offset = 0;
|
||||
|
||||
assert(bitsize == 8 || bitsize == 16 || bitsize == 32);
|
||||
unsigned subword_shift = (bitsize == 32) ? 0 : (bitsize == 16) ? 1 : 2;
|
||||
|
||||
assert(bitsize == 8 || bitsize == 16 || bitsize == 32 || bitsize == 64);
|
||||
for (unsigned i = 0; i < comps; ++i) {
|
||||
unsigned new_offset = (src.swizzle[i] >> subword_shift);
|
||||
unsigned new_offset = (src.swizzle[i] * bitsize) / 32;
|
||||
|
||||
if (i > 0)
|
||||
assert(offset == new_offset && "wrong vectorization");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue