BREAKP support in GLSL profile. trunk
authorRyan C. Gordon <icculus@icculus.org>
Thu, 03 Apr 2008 05:49:02 -0400
branchtrunk
changeset 61 0a1de4d2ba04
parent 60 790a87c64c79
child 62 c504bde0e80c
BREAKP support in GLSL profile.
mojoshader.c
--- a/mojoshader.c	Thu Apr 03 05:42:17 2008 -0400
+++ b/mojoshader.c	Thu Apr 03 05:49:02 2008 -0400
@@ -2019,7 +2019,8 @@
 
 static void emit_GLSL_BREAKP(Context *ctx)
 {
-    fail(ctx, "unimplemented.");  // !!! FIXME
+    const char *src0 = make_GLSL_sourcearg_string(ctx, 0);
+    output_line(ctx, "if (%s) { break; }", src0);
 } // emit_GLSL_BREAKP
 
 static void emit_GLSL_RESERVED(Context *ctx)