freedreno/a6xx: Add EARLYPREAMBLE flag to all a6xx_sp_xs_ctrl_reg0
authorDanylo Piliaiev <dpiliaiev@igalia.com>
Tue, 12 Apr 2022 18:04:35 +0000 (21:04 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 18 May 2022 11:17:47 +0000 (11:17 +0000)
commit5d377f435b4e64762ce706f6082005e974b894ee
tree0f6808704f0934e17266fef7a614b62a04fda6d3
parentc54555c496aea12d280ac6e882e81d3d69673e98
freedreno/a6xx: Add EARLYPREAMBLE flag to all a6xx_sp_xs_ctrl_reg0

Each shader stage has its own "early preamble" flag.

Early preamble is likely an optimization to hide some of latency
when loading UBOs into consts in the preamble.

Early preamble has the following limitations:
- Only shared, a1, and consts regs could be used
  (accessing other regs would result in GPU fault);
- No cat5/cat6, only stc/ldc variants are working;
- Values writen to shared regs are not accessible by the rest
  of the shader;
- Instructions before shps are also considered to be a part of
  early preamble.

Note, for all shaders from d3d11 games blob produced preambles
compatible with early preamble mode.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15901>
src/freedreno/computerator/a6xx.c
src/freedreno/computerator/examples/early_preamble.asm [new file with mode: 0644]
src/freedreno/ir3/ir3_assembler.h
src/freedreno/ir3/ir3_lexer.l
src/freedreno/ir3/ir3_parser.y
src/freedreno/registers/adreno/a6xx.xml