mojoshader.c
changeset 1101 3a1384bf9ca1
parent 1100 d1c8e5a9dcd0
child 1102 0af2fb8af7fc
--- a/mojoshader.c	Mon Apr 23 01:53:07 2012 -0400
+++ b/mojoshader.c	Mon Apr 23 01:53:40 2012 -0400
@@ -9077,6 +9077,17 @@
                     item = prev;
                     break;
 
+                case REG_TYPE_INPUT:
+                    // You don't have to dcl_ your inputs in Shader Model 1.
+                    if (shader_is_pixel(ctx)&&!shader_version_atleast(ctx,2,0))
+                    {
+                        add_attribute_register(ctx, regtype, regnum,
+                                               MOJOSHADER_USAGE_COLOR, regnum,
+                                               0xF, 0);
+                        break;
+                    } // if
+                    // fall through...
+
                 default:
                     fail(ctx, "BUG: we used a register we don't know how to define.");
             } // switch