Skip to content

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.


There is only flag definition and support of it for computerator. Using it would require at least some perf testing.

Merge request reports