diff options
author | Ville Syrjälä <[email protected]> | 2017-06-20 22:05:04 +0300 |
---|---|---|
committer | Ville Syrjälä <[email protected]> | 2017-06-22 17:26:17 +0300 |
commit | 1c409fe4c144f11ce6c6a4548ac5c6ba37980058 (patch) | |
tree | 366cb9171a04b7b6fbefa99e768cfb1f88557b38 /src/mesa/drivers/dri/i915/intel_reg.h | |
parent | b81cfc73408b3d55772a56fbfa0e505b4da281a8 (diff) |
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: [email protected]
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_reg.h')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_reg.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_reg.h b/src/mesa/drivers/dri/i915/intel_reg.h index dabbd612ee0..f855b45979c 100644 --- a/src/mesa/drivers/dri/i915/intel_reg.h +++ b/src/mesa/drivers/dri/i915/intel_reg.h @@ -93,7 +93,11 @@ #define S2_TEX_COUNT_SHIFT_830 12 #define S2_VERTEX_1_WIDTH_SHIFT_830 0 #define S2_VERTEX_0_WIDTH_SHIFT_830 6 -/* S3 not interesting */ + +#define S3_TEXCOORD_WRAP_SHORTEST_TCX(unit) (1<<((unit)*4+3)) +#define S3_TEXCOORD_WRAP_SHORTEST_TCY(unit) (1<<((unit)*4+2)) +#define S3_TEXCOORD_WRAP_SHORTEST_TCZ(unit) (1<<((unit)*4+1)) +#define S3_TEXCOORD_PERSPECTIVE_DISABLE(unit) (1<<((unit)*4+0)) #define S4_POINT_WIDTH_SHIFT 23 #define S4_POINT_WIDTH_MASK (0x1ff<<23) |