freedreno/ir3: limit # of tex prefetch by shader size
authorRob Clark <robdclark@chromium.org>
Mon, 4 May 2020 22:13:20 +0000 (15:13 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 May 2020 03:28:40 +0000 (03:28 +0000)
commitf351e1d137603213b5daacece5ff67ad0786d982
tree03ac686a4eed13214dc728fa1ae215d058a84c0c
parentd69f6fd8529b1dcefa443a8cb31bd362bb64a28c
freedreno/ir3: limit # of tex prefetch by shader size

It seems for short frag shaders, too much prefetch can be detrimental.
I think what we *really* want to do is decide after pre-RA sched, when
we also know about nop's and what the actual ir3 instruction count is.
But that will require re-working how prefetch lowering works.  For now
this is a super crude heuristic to attempt to approximate a good
solution.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4923>
src/freedreno/ir3/ir3_compiler_nir.c
src/freedreno/ir3/ir3_context.c
src/freedreno/ir3/ir3_context.h