Minor DCL output fix in GLSL profile. trunk
authorRyan C. Gordon <icculus@icculus.org>
Sat, 05 Apr 2008 14:26:05 -0400
branchtrunk
changeset 103 10e0f349a349
parent 102 db1b4102eea4
child 104 7019f99f17d0
Minor DCL output fix in GLSL profile.
mojoshader.c
--- a/mojoshader.c	Sat Apr 05 13:23:37 2008 -0400
+++ b/mojoshader.c	Sat Apr 05 14:26:05 2008 -0400
@@ -2099,7 +2099,12 @@
         // point limitations there.
 
         if (regtype == REG_TYPE_INPUT)
+        {
+            push_output(ctx, &ctx->globals);
             output_line(ctx, "attribute vec4 %s;", varname);
+            pop_output(ctx);
+        } // if
+
         else if (regtype == REG_TYPE_OUTPUT)
         {
             const uint32 index = ctx->dwords[1];
@@ -2147,6 +2152,11 @@
                             arrayleft, index_str, arrayright);
             } // else
             pop_output(ctx);
+        } // else if
+
+        else
+        {
+            fail(ctx, "unknown DCL register");
         } // else
     } // if