summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-07-28 14:41:51 -0700
committerEric Anholt <[email protected]>2010-07-28 15:00:09 -0700
commit4a962170d7cf4243d6ae156fca20a6167388925d (patch)
tree4d779c860f351ce01c1e03b4fae06d4a312463dd /src/mesa/program
parent8d8469eb2ade4fd48188403351a38f740987fb80 (diff)
glsl2: Add support for redeclaring layout of gl_FragCoord for ARB_fcc.
Fixes: glsl-arb-fragment-coord-conventions
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index c53381e29d9..a3019cc650a 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -557,7 +557,12 @@ ir_to_mesa_visitor::find_variable_storage(ir_variable *var)
void
ir_to_mesa_visitor::visit(ir_variable *ir)
{
- (void)ir;
+ if (strcmp(ir->name, "gl_FragCoord") == 0) {
+ struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog;
+
+ fp->OriginUpperLeft = ir->origin_upper_left;
+ fp->PixelCenterInteger = ir->pixel_center_integer;
+ }
}
void