diff options
author | Eduardo Lima Mitev <[email protected]> | 2019-08-05 08:09:23 +0200 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-10-18 21:11:54 +0000 |
commit | 2a0d45ae6cf09d60c048d7854e3d082bf15e374f (patch) | |
tree | 53352a462f92cb5bc478c1124e047407da8a7edb /src/SConscript | |
parent | 7d4213fe88a5398fa1624615780decf113d44359 (diff) |
freedreno/ir3: Add a NIR pass to select tex instructions eligible for pre-fetch
The pass should run once at the end of shader compilation, for a4xx
onwards. It iterates texture sampling instructions and mark those
eligibile for pre-dispatch by changing the tex op from 'tex' to
'tex_prefetch'. An instruction is eligibile if:
* The coordinate is a vector where all its components come from a
shader input.
* The order of the components match exactly that of the input (no
swizzles).
* The instruction is in the 'main' function, and in the outer
most-block.
The first two restrictions were arrived to empirically, so more
testing could tighten or loosen it.
The 3rd restriction is there to allow moving the instructions
eligible for pre-dispatch to the beginning of the shader, so
that we don't block the registers holding the result for too
long.
Signed-off-by: Rob Clark <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/SConscript')
0 files changed, 0 insertions, 0 deletions