diff options
author | Rob Clark <[email protected]> | 2020-02-28 15:45:53 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-10 16:01:39 +0000 |
commit | 9ae93be8fbdf753e07fbf1b707ce3bc89105b5a9 (patch) | |
tree | 209c9ede764538ff4260089a02e2df1fc94b4f87 /src/freedreno | |
parent | b6eb11295a7fab543d738263798b96883e3a658b (diff) |
freedreno/ir3: fix has_latency_to_hide
Also count tex-prefetch instructions. And only let the no-latency rule
kick in for frag shaders.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4071>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/ir3/ir3.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index a44663f4238..5cde264a580 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -1201,9 +1201,16 @@ void ir3_legalize(struct ir3 *ir, struct ir3_shader_variant *so, int *max_bary); static inline bool ir3_has_latency_to_hide(struct ir3 *ir) { + /* VS/GS/TCS/TESS co-exist with frag shader invocations, but we don't + * know the nature of the fragment shader. Just assume it will have + * latency to hide: + */ + if (ir->type != MESA_SHADER_FRAGMENT) + return true; + foreach_block (block, &ir->block_list) { foreach_instr (instr, &block->instr_list) { - if (is_tex(instr)) + if (is_tex_or_prefetch(instr)) return true; if (is_load(instr)) { |