[Mesa-dev] [PATCH 2/2] Revert "i965: Implement guardband clipping on Ivybridge."
Oliver McFadden
oliver.mcfadden at linux.intel.com
Tue Oct 2 04:00:40 PDT 2012
This reverts commit 610910a66d1a97ca51ad8a003bdeadfe9563d721.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55523
Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
CC: Kenneth Graunke <kenneth at whitecape.org>
---
v1: note that I have not actually verified this bug exists on IvyBridge, however
given the severity of the bug (major rendering errors in prominent benchmark
applications) I believe it's safer to simply revert both on master and all
stable/release branches. I am open for discussion on this second patch.
I have verified that SandyBridge suffers badly from this bug on multiple OpenGL
ES2.0 programs/benchmarks.
src/mesa/drivers/dri/i965/gen7_clip_state.c | 1 -
src/mesa/drivers/dri/i965/gen7_viewport_state.c | 19 +++++--------------
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/gen7_clip_state.c b/src/mesa/drivers/dri/i965/gen7_clip_state.c
index 3bc6de0..15de042 100644
--- a/src/mesa/drivers/dri/i965/gen7_clip_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_clip_state.c
@@ -101,7 +101,6 @@ upload_clip_state(struct brw_context *brw)
GEN6_CLIP_MODE_NORMAL |
nonperspective_barycentric_enable_flag |
GEN6_CLIP_XY_TEST |
- GEN6_CLIP_GB_TEST |
userclip << GEN6_USER_CLIP_CLIP_DISTANCES_SHIFT |
depth_clamp |
provoking);
diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c
index 7036ef6..2bcf338 100644
--- a/src/mesa/drivers/dri/i965/gen7_viewport_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c
@@ -43,20 +43,11 @@ gen7_upload_sf_clip_viewport(struct brw_context *brw)
/* Also assign to clip.vp_offset in case something uses it. */
brw->clip.vp_offset = brw->sf.vp_offset;
- /* According to the "Vertex X,Y Clamping and Quantization" section of the
- * Strips and Fans documentation, Ivybridge and later don't have a maximum
- * post-clamp delta. However, the guardband extent must fit in [-32K, 32K)
- * which gives us a maximum size of 64K. Use 65000 rather than 65536 to be
- * somewhat cautious---make the guardband slightly smaller than the maximum.
- */
- const float maximum_guardband_extent = 65000;
- float gbx = maximum_guardband_extent / (float) ctx->Viewport.Width;
- float gby = maximum_guardband_extent / (float) ctx->Viewport.Height;
-
- vp->guardband.xmin = -gbx;
- vp->guardband.xmax = gbx;
- vp->guardband.ymin = -gby;
- vp->guardband.ymax = gby;
+ /* Disable guardband clipping (see gen6_viewport_state.c for rationale). */
+ vp->guardband.xmin = -1.0;
+ vp->guardband.xmax = 1.0;
+ vp->guardband.ymin = -1.0;
+ vp->guardband.ymax = 1.0;
/* _NEW_BUFFERS */
if (render_to_fbo) {
--
1.7.8.6
More information about the mesa-dev
mailing list