Don't make the MOJOSHADER_DO_INSTRUCTION_TABLE caller undef everything after.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 20 Jul 2020 14:51:03 -0400
changeset 1283 c198fe1c469a
parent 1282 a9b48833d3b6
child 1284 0ed38e8899a3
Don't make the MOJOSHADER_DO_INSTRUCTION_TABLE caller undef everything after.
mojoshader.c
mojoshader_assembler.c
mojoshader_internal.h
--- a/mojoshader.c	Mon Jul 20 14:50:10 2020 -0400
+++ b/mojoshader.c	Mon Jul 20 14:51:03 2020 -0400
@@ -1985,10 +1985,6 @@
 
     #define MOJOSHADER_DO_INSTRUCTION_TABLE 1
     #include "mojoshader_internal.h"
-    #undef MOJOSHADER_DO_INSTRUCTION_TABLE
-
-    #undef INSTRUCTION
-    #undef INSTRUCTION_STATE
 };
 
 
--- a/mojoshader_assembler.c	Mon Jul 20 14:50:10 2020 -0400
+++ b/mojoshader_assembler.c	Mon Jul 20 14:51:03 2020 -0400
@@ -1096,9 +1096,6 @@
     #define INSTRUCTION(op, opstr, slots, a, t) { opstr, parse_args_##a },
     #define MOJOSHADER_DO_INSTRUCTION_TABLE 1
     #include "mojoshader_internal.h"
-    #undef MOJOSHADER_DO_INSTRUCTION_TABLE
-    #undef INSTRUCTION
-    #undef INSTRUCTION_STATE
 };
 
 
--- a/mojoshader_internal.h	Mon Jul 20 14:50:10 2020 -0400
+++ b/mojoshader_internal.h	Mon Jul 20 14:51:03 2020 -0400
@@ -870,6 +870,11 @@
 INSTRUCTION_STATE(SETP, "SETP", 1, DSS, MOJOSHADER_TYPE_ANY)
 INSTRUCTION_STATE(TEXLDL, "TEXLDL", 2, DSS, MOJOSHADER_TYPE_ANY)
 INSTRUCTION_STATE(BREAKP, "BREAKP", 3, S, MOJOSHADER_TYPE_ANY)
+
+#undef MOJOSHADER_DO_INSTRUCTION_TABLE
+#undef INSTRUCTION
+#undef INSTRUCTION_STATE
+
 #endif
 
 // end of mojoshader_internal.h ...