i915: Use the current drawbuffer's depth for polygon offset scale.
authorEric Anholt <eric@anholt.net>
Wed, 12 Jun 2013 03:24:41 +0000 (20:24 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 26 Jun 2013 08:07:11 +0000 (01:07 -0700)
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 <kenneth@whitecape.org>
src/mesa/drivers/dri/i915/intel_tris.c

index 7c60d8454fa86d967058878420f409b6e77c9f3b..126094b591b6117168a2e5a72214a3b16700a8a8 100644 (file)
@@ -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