diff options
author | Eric Anholt <[email protected]> | 2011-07-13 10:56:37 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2011-07-18 11:26:33 -0700 |
commit | fceda4342cadc22ce86877a19bf82b86eb022d79 (patch) | |
tree | 219eb046be19a0e3ec98648c920d7cddf01f1e11 /src/mesa/drivers/dri/i915/i915_fragprog.c | |
parent | af9548d3358884b408fb4c3cc69028befc5abe1d (diff) |
i915: Include gl_FragCoord.w data, not just xyz.
Fixes piglit fragcoord_w test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34323
Diffstat (limited to 'src/mesa/drivers/dri/i915/i915_fragprog.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index e9e8078328a..ac95d44b574 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1346,7 +1346,7 @@ i915ValidateFragmentProgram(struct i915_context *i915) intel->coloroffset = 0; intel->specoffset = 0; - if (inputsRead & FRAG_BITS_TEX_ANY) { + if (inputsRead & FRAG_BITS_TEX_ANY || p->wpos_tex != -1) { EMIT_ATTR(_TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, S4_VFMT_XYZW, 16); } else { @@ -1390,10 +1390,10 @@ i915ValidateFragmentProgram(struct i915_context *i915) * unused texture coordinate: */ s2 &= ~S2_TEXCOORD_FMT(i, S2_TEXCOORD_FMT0_MASK); - s2 |= S2_TEXCOORD_FMT(i, SZ_TO_HW(3)); + s2 |= S2_TEXCOORD_FMT(i, SZ_TO_HW(4)); intel->wpos_offset = offset; - intel->wpos_size = 3 * sizeof(GLuint); + intel->wpos_size = 4 * sizeof(GLuint); EMIT_PAD(intel->wpos_size); } |