diff options
author | Eric Anholt <[email protected]> | 2010-08-17 15:51:34 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-17 16:39:18 -0700 |
commit | e43b250fc076aea9e4b5319fdf409e95b28ac8fc (patch) | |
tree | 0696fbe854fd03c21fe5ffbac9471efa0a4424ea /src/mesa | |
parent | 66690864efb9ab1077f87744e1afec3231f244f6 (diff) |
i915: Add support for reading output regs in the FS.
Fixes glsl-unused-varying and many others, since we produce an output
reg read any time gl_FragColor is written inside an if statement.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 2ba0d2c591e..3101bd17001 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -143,6 +143,20 @@ src_vector(struct i915_fragment_program *p, } break; + case PROGRAM_OUTPUT: + switch (source->Index) { + case FRAG_RESULT_COLOR: + src = UREG(REG_TYPE_OC, 0); + break; + case FRAG_RESULT_DEPTH: + src = UREG(REG_TYPE_OD, 0); + break; + default: + i915_program_error(p, "Bad source->Index: %d", source->Index); + return 0; + } + break; + /* Various paramters and env values. All emitted to * hardware as program constants. */ |