Mesa (master): nv50/ir/tgsi: handle DP2 in tgsi Instruction srcMask

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sat Aug 18 15:37:17 UTC 2012


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

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Sat Aug 18 17:34:44 2012 +0200

nv50/ir/tgsi: handle DP2 in tgsi Instruction srcMask

Solved by Tiziano Bacocco on IRC.

---

 .../drivers/nv50/codegen/nv50_ir_from_tgsi.cpp     |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
index 16f191d..071674b 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_from_tgsi.cpp
@@ -214,6 +214,8 @@ unsigned int Instruction::srcMask(unsigned int s) const
    case TGSI_OPCODE_COS:
    case TGSI_OPCODE_SIN:
       return (mask & 0x8) | ((mask & 0x7) ? 0x1 : 0x0);
+   case TGSI_OPCODE_DP2:
+      return 0x3;
    case TGSI_OPCODE_DP3:
       return 0x7;
    case TGSI_OPCODE_DP4:




More information about the mesa-commit mailing list