mojoshader_effects.c
changeset 1231 76468460693e
parent 1218 063ee7ba5eea
child 1237 da180fe5b4b7
--- 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;