From 8344d7425b0cad4c6bb327718097036170799f14 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 11 Nov 2019 08:19:18 -0500 Subject: [PATCH] pan/midgard: Use texture, not textureLod, on early Midgard We have to disable the fixup. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Tomeu Vizoso Tested-by: Andre Heider --- src/panfrost/midgard/midgard_compile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 2338744cb78..c71afba9427 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -1801,12 +1801,13 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr, static void emit_tex(compiler_context *ctx, nir_tex_instr *instr) { - /* Fixup op, since only textureLod is permitted in VS but NIR can give - * generic tex in some cases (which confuses the hardware) */ + /* Fixup op, since only textureLod is permitted in VS on later Midgard + * but NIR can give generic tex in some cases (which confuses the + * hardware). Interestingly, early Midgard lines up with NIR */ bool is_vertex = ctx->stage == MESA_SHADER_VERTEX; - if (is_vertex && instr->op == nir_texop_tex) + if (is_vertex && instr->op == nir_texop_tex && ctx->gpu_id >= 0x750) instr->op = nir_texop_txl; switch (instr->op) { -- 2.30.2