mojoshader.c
changeset 1038 9b23f9a8aa31
parent 1035 5855d767e4b2
child 1042 cb6659f80bb9
--- a/mojoshader.c	Tue May 31 16:01:10 2011 -0400
+++ b/mojoshader.c	Tue May 31 16:25:00 2011 -0400
@@ -7091,6 +7091,10 @@
     if ((tokcount < 2) || (SWAP32(tokens[1]) != PRES_ID))
         return;  // not a preshader.
 
+#if !SUPPORT_PRESHADERS
+    fail(ctx, "Preshader found, but preshader support is disabled!");
+#else
+
     assert(ctx->have_preshader == 0);  // !!! FIXME: can you have more than one?
     ctx->have_preshader = 1;
 
@@ -7396,6 +7400,7 @@
 parse_preshader_cleanup:
     free_symbols(ctx->free, ctx->malloc_data,
                  ctabdata.symbols, ctabdata.symbol_count);
+#endif
 } // parse_preshader