From d1b1329c3a69fa018cdd3fcb1fd751da58023633 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 19 Feb 2014 21:29:40 -0500 Subject: nv50: enable txg where supported Signed-off-by: Ilia Mirkin --- src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp | 3 ++- src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/nouveau/codegen') diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp index bef103ff00f..e2f93bbf5e6 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp @@ -1447,7 +1447,7 @@ CodeEmitterNV50::emitTEX(const TexInstruction *i) code[0] |= 0x01000000; break; case OP_TXG: - code[0] = 0x01000000; + code[0] |= 0x01000000; code[1] = 0x80000000; break; default: @@ -1790,6 +1790,7 @@ CodeEmitterNV50::emitInstruction(Instruction *insn) case OP_TXB: case OP_TXL: case OP_TXF: + case OP_TXG: emitTEX(insn->asTex()); break; case OP_TXQ: diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index d226d0c36c9..ccddb9a79fa 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -558,6 +558,7 @@ static nv50_ir::operation translateOpcode(uint opcode) NV50_IR_OPCODE_CASE(SAD, SAD); NV50_IR_OPCODE_CASE(TXF, TXF); NV50_IR_OPCODE_CASE(TXQ, TXQ); + NV50_IR_OPCODE_CASE(TG4, TXG); NV50_IR_OPCODE_CASE(EMIT, EMIT); NV50_IR_OPCODE_CASE(ENDPRIM, RESTART); @@ -2434,6 +2435,9 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) case TGSI_OPCODE_TXD: handleTEX(dst0, 3, 3, 0x03, 0x0f, 0x10, 0x20); break; + case TGSI_OPCODE_TG4: + handleTEX(dst0, 2, 2, 0x03, 0x0f, 0x00, 0x00); + break; case TGSI_OPCODE_TEX2: handleTEX(dst0, 2, 2, 0x03, 0x10, 0x00, 0x00); break; -- cgit v1.2.3