summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-10-18 11:30:48 -0700
committerRob Clark <[email protected]>2019-10-18 21:11:54 +0000
commitf30c256ec05618fb40dccbd94a3434b2f63db478 (patch)
treeacc19581d33e998246853bbb6917b2f6573c28ab /src
parent72048dd799c308f8091cac13e3dbde013105ec77 (diff)
freedreno/ir3: enable pre-fs texture fetch for a6xx
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_context.c b/src/freedreno/ir3/ir3_context.c
index c389f750bd5..a75bbfa1eff 100644
--- a/src/freedreno/ir3/ir3_context.c
+++ b/src/freedreno/ir3/ir3_context.c
@@ -96,6 +96,12 @@ ir3_context_init(struct ir3_compiler *compiler,
NIR_PASS_V(ctx->s, nir_opt_constant_folding);
}
+ /* Enable the texture pre-fetch feature only a4xx onwards. But
+ * only enable it on generations that have been tested:
+ */
+ if ((so->type == MESA_SHADER_FRAGMENT) && (compiler->gpu_id >= 600))
+ NIR_PASS_V(ctx->s, ir3_nir_lower_tex_prefetch);
+
NIR_PASS_V(ctx->s, nir_convert_from_ssa, true);
if (ir3_shader_debug & IR3_DBG_DISASM) {