Also count tex-prefetch instructions. And only let the no-latency rule
kick in for frag shaders.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4071>
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)) {