summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-06-11 20:24:41 -0700
committerEric Anholt <[email protected]>2013-06-26 01:07:11 -0700
commitdba46831b0887a3f76ad011a9653ed9d2fff570e (patch)
treeb27d35f622c464e73cd4cd08b17ba22db46c1df8 /src/mesa
parentc31aee99f35440a7bf4a9a5fda49fff6719ed33d (diff)
i915: Use the current drawbuffer's depth for polygon offset scale.
There's no reason to care about the window system visual's depth for handling polygon offset in an FBO, and it could only lead to pain. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 7c60d8454fa..126094b591b 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -640,7 +640,7 @@ do { \
} while (0)
-#define DEPTH_SCALE intel->polygon_offset_scale
+#define DEPTH_SCALE (ctx->DrawBuffer->Visual.depthBits == 16 ? 1.0 : 2.0)
#define UNFILLED_TRI unfilled_tri
#define UNFILLED_QUAD unfilled_quad
#define VERT_X(_v) _v->v.x