projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
174cc03
)
Test that discard only appears in the fragment shader.
author
Eric Anholt
<eric@anholt.net>
Wed, 31 Mar 2010 09:40:14 +0000
(23:40 -1000)
committer
Eric Anholt
<eric@anholt.net>
Wed, 31 Mar 2010 09:40:14 +0000
(23:40 -1000)
Fixes fragmentOnly4.vert.
ast_to_hir.cpp
patch
|
blob
|
history
diff --git
a/ast_to_hir.cpp
b/ast_to_hir.cpp
index a0fe37b548514434548126ae1095ee9a20308401..f66c02980852f7766b5243ce096c9319a567f882 100644
(file)
--- 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;