Mesa (glsl2): glsl2: Implement AST->HIR support for the "discard" instruction.

Ian Romanick idr at kemper.freedesktop.org
Wed Jun 30 14:59:32 PDT 2010


Module: Mesa
Branch: glsl2
Commit: 77049a702ad54e09c4102fe8c964e069944f83e5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=77049a702ad54e09c4102fe8c964e069944f83e5

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Jun 30 14:11:00 2010 -0700

glsl2: Implement AST->HIR support for the "discard" instruction.

---

 src/glsl/ast_to_hir.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index a0ca7e5..7d966f8 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -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:



More information about the mesa-commit mailing list