summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/seagull.scm9
1 files changed, 6 insertions, 3 deletions
diff --git a/chickadee/graphics/seagull.scm b/chickadee/graphics/seagull.scm
index ef6ec1f..11b38eb 100644
--- a/chickadee/graphics/seagull.scm
+++ b/chickadee/graphics/seagull.scm
@@ -521,6 +521,11 @@
(expand exp stage env)))
names exps)))
+(define (expand:discard stage env)
+ (if (eq? stage 'fragment)
+ '(outputs)
+ (seagull-syntax-error "discard not allowed in vertex shader" exp expand)))
+
(define (expand exp stage env)
(define (primitive-call-for-stage? x)
(primitive-call? x stage))
@@ -574,9 +579,7 @@
(('case key clauses ...)
(expand:case key clauses stage env))
(('discard)
- (if (eq? stage 'fragment)
- '(outputs)
- (seagull-syntax-error "discard not allowed in vertex shader" exp expand)))
+ (expand:discard stage env))
;; Primitive calls:
(((? primitive-call-for-stage? operator) args ...)
(expand:primitive-call operator args stage env))