diff options
-rw-r--r-- | ast_to_hir.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index a0fe37b548..f66c029808 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1591,6 +1591,16 @@ ast_jump_statement::hir(exec_list *instructions, instructions->push_tail(inst); } + if (mode == ast_discard) { + /* FINISHME: discard support */ + if (state->target != fragment_shader) { + YYLTYPE loc = this->get_location(); + + _mesa_glsl_error(& loc, state, + "`discard' may only appear in a fragment shader"); + } + } + /* Jump instructions do not have r-values. */ return NULL; |