summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-06 11:24:50 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:20 -0700
commit110d5cc83c18999e578ef7485e3c976446176b81 (patch)
treee5d761d38979184dbd674ec1291786424f104df9
parent8041bce333a48033975eb83d47ecc6bd7a91cd1d (diff)
ir_to_mesa: Support gl_Position output.
-rw-r--r--ir_to_mesa.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index f8b37dd202..9f9113d2c3 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -442,6 +442,9 @@ ir_to_mesa_visitor::visit(ir_dereference_variable *ir)
if (strncmp(var->name, "gl_", 3) == 0) {
if (strcmp(var->name, "gl_FragColor") == 0) {
ir_to_mesa_set_tree_reg(tree, PROGRAM_INPUT, FRAG_ATTRIB_COL0);
+ } else if (strcmp(var->name, "gl_Position") == 0) {
+ ir_to_mesa_set_tree_reg(tree, PROGRAM_OUTPUT,
+ VERT_RESULT_HPOS);
} else {
assert(0);
}