mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-22 16:00:35 +01:00
pan/midg: Fix 64-bit swizzle printer
Swizzling happens in 2 steps on Midgard: 1. Vector expansion/shuffling 2. Swizzling at the instruction-size granularity, but defined using the source size. Those size are different if the source is expanded. So, when we print 64 bit swizzles on an expanded source, we first need to apply an offset if the high part of the 32bit vector was selected, and then divide the result by 2 to account for vector expansion. To sum-up, swizzling on midgard is complicated, and I'm not sure I got it right, but it seems to print what I expect on the few compute shaders using 64bit arithmetic I debugged. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14885>
This commit is contained in:
parent
39e4b7279d
commit
b58c262144
1 changed files with 4 additions and 1 deletions
|
|
@ -415,7 +415,10 @@ print_vec_selectors_64(FILE *fp, unsigned swizzle,
|
|||
unsigned a = (swizzle >> (i * 2)) & 3;
|
||||
|
||||
if (INPUT_EXPANDS(expand_mode)) {
|
||||
fprintf(fp, "%c", components[a]);
|
||||
if (expand_mode == midgard_src_expand_high)
|
||||
a += 2;
|
||||
|
||||
fprintf(fp, "%c", components[a / 2]);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue