aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_print.c
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2019-07-10 09:48:21 +0200
committerRob Clark <[email protected]>2019-10-18 21:11:54 +0000
commitf1d4fadf1bdc399be515fc21bea3c2832e802f3e (patch)
tree3c33c78257bbf3a55a873a7765816b05f19af666 /src/compiler/nir/nir_print.c
parent27df3e015bd1c0f74461b05a9f5b8c1a3fdf6ee5 (diff)
nir: Add new texop nir_texop_tex_prefetch
This is like nir_texop_tex, but signals that the sampling coordinates are immutable during the shader stage, in a way that allows the HW that supports pre-dispatching sampling operations to pre-fetch the result prior to scheduling the shader stage. This is introduced to support the feature in Freedreno. Adreno HW from a4xx supports it. A NIR pass introduced later in this series will detect sampling operations that are eligible for pre-dispatch, and replace nir_texop_tex by this new op, to tell the backend to enable pre-fetch. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_print.c')
-rw-r--r--src/compiler/nir/nir_print.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 496f9279676..8408fa2ba74 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -985,6 +985,9 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
case nir_texop_samples_identical:
fprintf(fp, "samples_identical ");
break;
+ case nir_texop_tex_prefetch:
+ fprintf(fp, "tex (pre-dispatchable) ");
+ break;
default:
unreachable("Invalid texture operation");
break;