diff options
author | Rob Clark <[email protected]> | 2020-01-18 11:03:38 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-01 02:40:22 +0000 |
commit | ad2587d3c8885ce4aa0403269268a1c0ab8c2cac (patch) | |
tree | dc95945974ec6cbdd69d49e43d610311f0d3c696 /src/freedreno/ir3/ir3_depth.c | |
parent | 4a7a6c9ef0eb6b26d8410591353142207689d085 (diff) |
freedreno/ir3: add is_tex_or_prefetch()
Some of the aspects of tex prefetch are in common with normal tex
instructions, such as having a wrmask to control which components
are written. Add a helper for this.
This should result in actually using the prefetch wrmask to avoid
fetching unneeded components.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
Diffstat (limited to 'src/freedreno/ir3/ir3_depth.c')
-rw-r--r-- | src/freedreno/ir3/ir3_depth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_depth.c b/src/freedreno/ir3/ir3_depth.c index 59ea3af407b..135d4365d2e 100644 --- a/src/freedreno/ir3/ir3_depth.c +++ b/src/freedreno/ir3/ir3_depth.c @@ -114,7 +114,7 @@ remove_unused_by_block(struct ir3_block *block) /* tex (cat5) instructions have a writemask, so we can * mask off unused components. Other instructions do not. */ - if (is_tex(src) && (src->regs[0]->wrmask > 1)) { + if (is_tex_or_prefetch(src) && (src->regs[0]->wrmask > 1)) { src->regs[0]->wrmask &= ~(1 << instr->split.off); /* prune no-longer needed right-neighbors. We could |