From: Alyssa Rosenzweig Date: Mon, 11 Nov 2019 13:19:18 +0000 (-0500) Subject: pan/midgard: Use texture, not textureLod, on early Midgard X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8344d7425b0cad4c6bb327718097036170799f14;p=mesa.git 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 --- 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) {