Mesa (master): r600: quick hack to get KIL_NV working - does condition TR only for now

Andre Maasikas andrem at kemper.freedesktop.org
Tue Dec 8 06:21:48 PST 2009


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

Author: Andre Maasikas <amaasikas at gmail.com>
Date:   Fri Dec  4 12:58:36 2009 +0200

r600: quick hack to get KIL_NV working - does condition TR only for now

---

 src/mesa/drivers/dri/r600/r700_assembler.c |   24 +++++++++++++++++-------
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 87c1638..3738edb 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -3554,7 +3554,10 @@ GLboolean assemble_FRC(r700_AssemblerBase *pAsm)
  
 GLboolean assemble_KIL(r700_AssemblerBase *pAsm, GLuint opcode)
 {  
-    checkop2(pAsm);
+    struct prog_instruction *pILInst = &(pAsm->pILInst[pAsm->uiCurInst]);
+
+    if(pILInst->Opcode == OPCODE_KIL)
+        checkop1(pAsm);
 
     pAsm->D.dst.opcode = opcode;  
     //pAsm->D.dst.math = 1;
@@ -3573,16 +3576,23 @@ GLboolean assemble_KIL(r700_AssemblerBase *pAsm, GLuint opcode)
     setswizzle_PVSSRC(&(pAsm->S[0].src), SQ_SEL_0);
     noneg_PVSSRC(&(pAsm->S[0].src));
 
-    if( GL_FALSE == assemble_src(pAsm, 0, 1) )
+    if(pILInst->Opcode == OPCODE_KIL_NV)
     {
-        return GL_FALSE;
+        setaddrmode_PVSSRC(&(pAsm->S[1].src), ADDR_ABSOLUTE);
+        pAsm->S[1].src.rtype = SRC_REG_TEMPORARY;
+        pAsm->S[1].src.reg = 0;
+        setswizzle_PVSSRC(&(pAsm->S[1].src), SQ_SEL_1);
+        neg_PVSSRC(&(pAsm->S[1].src));
     }
-
-    /*if( GL_FALSE == assemble_src(pAsm, 1, -1) )
+    else
     {
-        return GL_FALSE;
+        if( GL_FALSE == assemble_src(pAsm, 0, 1) )
+        {
+            return GL_FALSE;
+        }
+
     }
-    */ 
+
     if ( GL_FALSE == next_ins(pAsm) )
     {
         return GL_FALSE;



More information about the mesa-commit mailing list