Mesa (master): pan/midgard: Use texture, not textureLod, on early Midgard
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 15 19:19:15 UTC 2019
Module: Mesa
Branch: master
Commit: 8344d7425b0cad4c6bb327718097036170799f14
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8344d7425b0cad4c6bb327718097036170799f14
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Mon Nov 11 08:19:18 2019 -0500
pan/midgard: Use texture, not textureLod, on early Midgard
We have to disable the fixup.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Tested-by: Andre Heider <a.heider at gmail.com>
---
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) {
More information about the mesa-commit
mailing list