mojoshader.c
changeset 1082 6fbcfbef2a63
parent 1081 0318ad91ed5d
child 1083 af2182ddc559
--- a/mojoshader.c	Sat Apr 14 17:14:50 2012 -0400
+++ b/mojoshader.c	Sat Apr 14 23:23:25 2012 -0400
@@ -10,6 +10,13 @@
 // !!! FIXME: this file really needs to be split up.
 // !!! FIXME: I keep changing coding styles for symbols and typedefs.
 
+// !!! FIXME: rules from MSDN about temp registers we probably don't check.
+// - There are limited temporaries: vs_1_1 has 12 (ps_1_1 has _2_!).
+// - SM2 apparently was variable, between 12 and 32. Shader Model 3 has 32.
+// - If a temporary register uses components that are not defined in previous
+//   code, shader validation will fail.
+// - A maximum of three temp registers can be used in a single instruction.
+
 #define __MOJOSHADER_INTERNAL__ 1
 #include "mojoshader_internal.h"
 
@@ -8465,6 +8472,10 @@
 
     ctx->current_position = MOJOSHADER_POSITION_AFTER;
 
+    // !!! FIXME: for ps_1_*, the output color is written to r0...throw an
+    // !!! FIXME:  error if this register was never written. This isn't
+    // !!! FIXME:  important for vertex shaders, or shader model 2+.
+
     if (!failed)
     {
         process_definitions(ctx);