mesa/src/panfrost/compiler
Alyssa Rosenzweig 2f2738dc90 pan/bi: Use nir_lower_mem_access_bit_sizes
OpenCL can generate large loads and stores that we can't support, so we need to
lower. We can load/store up to 128-bits in a single go. We currently only handle
up to 32-bit components in the load and no more than vec4, so we split up
accordingly.

It's not clear to me what the requirements are for alignment on Valhall, so we
conservatively generate aligned access, at worst there's a performance penalty
in those cases. I think unaligned access is suppoerted, but likely with a
performance penalty of its own? So in the absence of hard data otherwise, let's
just use natural alignment.

Oddly, this shaves off a tiny bit of ALU in a few compute shaders on Valhall,
all in gfxbench. Seems to just be noise from the RA lottery.

total instructions in shared programs: 2686768 -> 2686756 (<.01%)
instructions in affected programs: 584 -> 572 (-2.05%)
helped: 6
HURT: 0
Instructions are helped.

total cvt in shared programs: 14644.33 -> 14644.14 (<.01%)
cvt in affected programs: 5.77 -> 5.58 (-3.25%)
helped: 6
HURT: 0

total quadwords in shared programs: 1455320 -> 1455312 (<.01%)
quadwords in affected programs: 56 -> 48 (-14.29%)
helped: 1
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
2023-04-13 01:49:33 +00:00
..
bifrost pan/bi: Move Bifrost specific C code to src/compiler/bifrost 2023-01-02 17:54:49 +00:00
test pan/bi: Add a unit test for fsat(reg.yx) 2023-01-16 15:29:38 +00:00
valhall
ISA.xml
Notes.txt
README.md
bi_builder.h.py
bi_helper_invocations.c
bi_layout.c
bi_liveness.c
bi_lower_divergent_indirects.c
bi_lower_swizzle.c pan/bi: Lower swizzles for 8-bit CSEL 2023-04-13 01:49:33 +00:00
bi_opcodes.c.py
bi_opcodes.h.py
bi_opt_constant_fold.c
bi_opt_copy_prop.c
bi_opt_cse.c
bi_opt_dce.c
bi_opt_dual_tex.c
bi_opt_mod_props.c
bi_opt_push_ubo.c
bi_packer.c.py
bi_pressure_schedule.c
bi_print.c
bi_print_common.c
bi_print_common.h
bi_printer.c.py
bi_quirks.h
bi_ra.c
bi_test.h
bi_validate.c
bifrost.h
bifrost_compile.c pan/bi: Use nir_lower_mem_access_bit_sizes 2023-04-13 01:49:33 +00:00
bifrost_compile.h panfrost: Preprocess shaders in the driver 2023-03-23 23:53:46 +00:00
bifrost_isa.py
bifrost_nir.h pan/bi: Export bifrost_nir_lower_load_output 2023-03-23 23:53:46 +00:00
bifrost_nir_algebraic.py
bir.c
cmdline.c pan/bi: Move Bifrost specific C code to src/compiler/bifrost 2023-01-02 17:54:49 +00:00
compiler.h panfrost: Lower sysvals in GL 2023-03-23 23:53:46 +00:00
gen_disasm.py pan/bi: Move Bifrost specific C code to src/compiler/bifrost 2023-01-02 17:54:49 +00:00
meson.build meson: inline gtest_test_protocol now that it's always 'gtest' 2023-03-10 07:20:29 +00:00
nodearray.h

README.md

Bifrost compiler

Register file

Defined partially in software, partially in hardware.

Blend shaders

R0 - R3: input (color #0) R4 - R7: input (color #1) R8 - R15: general purpose R48: return address

Fragment

Anything live during BLEND must respect blend shader registers.

R0 - R3: preloaded (message #0) R4 - R7: preloaded (message #1) R57 - R63: preloaded (various)

R0 - R15: general purpose (full threads) R48 - R63: general purpose (full threads)

R32 - R47: general purpose (half threads, or v6)