Mesa (master): nv50: don't crash on TXD opcode

Marcin Åšlusarz mslusarz at kemper.freedesktop.org
Tue Oct 11 10:37:22 PDT 2011


Module: Mesa
Branch: master
Commit: 7f3de70c3c8e9ec9dfc34ddd3a08c4b73c007541
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7f3de70c3c8e9ec9dfc34ddd3a08c4b73c007541

Author: Marcin Slusarz <marcin.slusarz at gmail.com>
Date:   Mon Oct 10 23:31:04 2011 +0200

nv50: don't crash on TXD opcode

It doesn't implement full TXD, but at least it does not crash.
Fixes arb_shader_texture_lod-texgrad and glsl-fs-shadow2DGradARB-*
piglit tests.

---

 src/gallium/drivers/nv50/nv50_tgsi_to_nc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
index 4b11ae1..717a902 100644
--- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
+++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
@@ -847,6 +847,7 @@ translate_opcode(uint opcode)
    case TGSI_OPCODE_TXP: return NV_OP_TEX;
    case TGSI_OPCODE_TXB: return NV_OP_TXB;
    case TGSI_OPCODE_TXL: return NV_OP_TXL;
+   case TGSI_OPCODE_TXD: return NV_OP_TEX;
    case TGSI_OPCODE_XOR: return NV_OP_XOR;
    default:
       return NV_OP_NOP;
@@ -1960,6 +1961,7 @@ bld_instruction(struct bld_context *bld,
    case TGSI_OPCODE_TXB:
    case TGSI_OPCODE_TXL:
    case TGSI_OPCODE_TXP:
+   case TGSI_OPCODE_TXD: // fake
       bld_tex(bld, dst0, insn);
       break;
    case TGSI_OPCODE_XPD:



More information about the mesa-commit mailing list