mojoshader_assembler.c
changeset 519 c9b27381c971
parent 516 6cc635dac768
child 521 57e1945104cb
--- a/mojoshader_assembler.c	Sat Dec 13 08:48:11 2008 -0500
+++ b/mojoshader_assembler.c	Sat Dec 13 08:58:35 2008 -0500
@@ -1416,6 +1416,22 @@
             return FAIL;
     } // while
 
+    uint32 controls = 0;
+
+    // This might need to be TEXLD instead of TEXLDP.
+    if (strcasecmp(opstr, "TEXLDP") == 0)
+    {
+        controls = CONTROL_TEXLDP;
+        strcpy(opstr, "TEXLD");
+    } // if
+
+    // This might need to be TEXLD instead of TEXLDB.
+    if (strcasecmp(opstr, "TEXLDB") == 0)
+    {
+        controls = CONTROL_TEXLDB;
+        strcpy(opstr, "TEXLD");
+    } // else if
+
     int i;
     int valid_opcode = 0;
     const Instruction *instruction = NULL;
@@ -1431,7 +1447,6 @@
     } // for
 
     uint32 opcode = (uint32) i;
-    uint32 controls = 0;
 
     if (!valid_opcode)
         return failf(ctx, "Unknown instruction '%s'", opstr);
@@ -1445,6 +1460,7 @@
     } // if
 
     // This might need to be BREAKC instead of BREAK.
+    // !!! FIXME: compare opcode, not string
     else if (strcmp(instruction->opcode_string, "BREAK") == 0)
     {
         if (parse_condition(ctx, &controls))
@@ -1452,6 +1468,7 @@
     } // else if
 
     // SETP has a conditional code, always.
+    // !!! FIXME: compare opcode, not string
     else if (strcmp(instruction->opcode_string, "SETP") == 0)
     {
         if (!parse_condition(ctx, &controls))