diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-11-11 08:19:18 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-11-15 18:37:33 +0000 |
commit | 8344d7425b0cad4c6bb327718097036170799f14 (patch) | |
tree | 0d642dccae667ab268830a916743bcfa384c68e8 | |
parent | 29f5b00e6e3def63682ac3cf46ff15dc51509d61 (diff) |
pan/midgard: Use texture, not textureLod, on early Midgard
We have to disable the fixup.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Tomeu Vizoso <[email protected]>
Tested-by: Andre Heider <[email protected]>
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 7 |
1 files 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) { |