r600: add support for TXB instruction
authorAndre Maasikas <amaasikas@gmail.com>
Thu, 3 Dec 2009 10:26:44 +0000 (12:26 +0200)
committerAndre Maasikas <amaasikas@gmail.com>
Tue, 8 Dec 2009 08:02:23 +0000 (10:02 +0200)
makes testing other things easier - does not hang the card
TODO: enable TEX dependency tracking in vertex programs

src/mesa/drivers/dri/r600/r700_assembler.c

index 6ff08e1cfb7aab93c9d61383db33f76078bdf40a..be875ae6b800b21e06a5bdcd964c44d8138960c8 100644 (file)
@@ -3450,22 +3450,6 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
            need_barrier = GL_TRUE;
     }
 
-    switch (pAsm->pILInst[pAsm->uiCurInst].Opcode)
-    {
-        case OPCODE_TEX:
-            break;
-        case OPCODE_TXB:
-            radeon_error("do not support TXB yet\n");
-            return GL_FALSE;
-            break;
-        case OPCODE_TXP:
-            break;
-        default:
-            radeon_error("Internal error: bad texture op (not TEX)\n");
-            return GL_FALSE;
-            break;
-    }
-
     if (pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXP)
     {
         GLuint tmp = gethelpr(pAsm);
@@ -3644,7 +3628,15 @@ GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
 
     }
 
-    pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
+    if(pAsm->pILInst[pAsm->uiCurInst].Opcode == OPCODE_TXB)
+    {
+        pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE_L;
+    }
+    else
+    {
+        pAsm->D.dst.opcode = SQ_TEX_INST_SAMPLE;
+    }
+
     pAsm->is_tex = GL_TRUE;
     if ( GL_TRUE == need_barrier )
     {