ir_to_mesa: Support gl_Position output.
authorEric Anholt <eric@anholt.net>
Thu, 6 May 2010 18:24:50 +0000 (11:24 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 24 Jun 2010 22:05:20 +0000 (15:05 -0700)
ir_to_mesa.cpp

index f8b37dd202859a5c39cb76b74f217143dd6ea816..9f9113d2c31e8e04da44f06ee5d914473491bf03 100644 (file)
@@ -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);
       }