i915: Fix gl_Fragcoord interpolation
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Jun 2017 19:05:04 +0000 (22:05 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 22 Jun 2017 14:26:17 +0000 (17:26 +0300)
commit1c409fe4c144f11ce6c6a4548ac5c6ba37980058
tree366cb9171a04b7b6fbefa99e768cfb1f88557b38
parentb81cfc73408b3d55772a56fbfa0e505b4da281a8
i915: Fix gl_Fragcoord interpolation

gl_FragCoord contains the window coordinates so it seems to me that
we should not use perspective correct interpolation for it. At least
now I get similar output as i965/swrast/llvmpipe produce.

This fixes dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_w.
dEQP-GLES2.functional.shaders.builtin_variable.fragcoord_xyz was already
passing, though I'm not quite sure how it managed to do that.

v2: Add definitons for the S3 "wrap shortest" bits as well (Ian)

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
src/mesa/drivers/dri/i915/i915_context.h
src/mesa/drivers/dri/i915/i915_fragprog.c
src/mesa/drivers/dri/i915/i915_state.c
src/mesa/drivers/dri/i915/i915_vtbl.c
src/mesa/drivers/dri/i915/intel_reg.h