i915: Include gl_FragCoord.w data, not just xyz.

Fixes piglit fragcoord_w test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34323
This commit is contained in:
Eric Anholt
2011-07-13 10:56:37 -07:00
parent af9548d335
commit fceda4342c

View File

@@ -1346,7 +1346,7 @@ i915ValidateFragmentProgram(struct i915_context *i915)
intel->coloroffset = 0; intel->coloroffset = 0;
intel->specoffset = 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); EMIT_ATTR(_TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, S4_VFMT_XYZW, 16);
} }
else { else {
@@ -1390,10 +1390,10 @@ i915ValidateFragmentProgram(struct i915_context *i915)
* unused texture coordinate: * unused texture coordinate:
*/ */
s2 &= ~S2_TEXCOORD_FMT(i, S2_TEXCOORD_FMT0_MASK); 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_offset = offset;
intel->wpos_size = 3 * sizeof(GLuint); intel->wpos_size = 4 * sizeof(GLuint);
EMIT_PAD(intel->wpos_size); EMIT_PAD(intel->wpos_size);
} }