glsl2: Implement AST->HIR support for the "discard" instruction.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 30 Jun 2010 21:11:00 +0000 (14:11 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 30 Jun 2010 21:54:58 +0000 (14:54 -0700)
src/glsl/ast_to_hir.cpp

index a0ca7e5f6df02c0a9dd1a727ccb9a06c93c5584d..7d966f848b342e7673782079d5592c08381e019b 100644 (file)
@@ -2206,13 +2206,13 @@ ast_jump_statement::hir(exec_list *instructions,
    }
 
    case 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");
       }
+      instructions->push_tail(new(ctx) ir_discard);
       break;
 
    case ast_break: