Add FIXME for preshader output registers
authorEthan Lee <flibitijibibo@flibitijibibo.com>
Mon, 27 Jan 2020 09:26:35 -0500
changeset 1231 76468460693e
parent 1230 600d972bbd57
child 1232 eec14d60f416
Add FIXME for preshader output registers
mojoshader_effects.c
--- a/mojoshader_effects.c	Sun Jan 12 17:26:54 2020 -0500
+++ b/mojoshader_effects.c	Mon Jan 27 09:26:35 2020 -0500
@@ -39,6 +39,17 @@
     MOJOSHADER_preshaderInstruction *inst = preshader->instructions;
     int instit;
 
+#if 0 // FIXME: Do we need to do this or is the compiler smart enough?
+    // Clear preshader output registers first!
+    for (instit = 0; instit < preshader->instruction_count; instit++, inst++)
+    {
+        const MOJOSHADER_preshaderOperand *operand = &inst->operands[inst->operand_count - 1];
+        if (operand->type == MOJOSHADER_PRESHADEROPERAND_OUTPUT)
+            memset(&outregs[operand->index], '\0', sizeof(float) * 4);
+    } // for
+    inst = preshader->instructions;
+#endif
+
     for (instit = 0; instit < preshader->instruction_count; instit++, inst++)
     {
         const MOJOSHADER_preshaderOperand *operand = inst->operands;