[Mesa-dev] [PATCH 3/8] i915: Use the current drawbuffer's depth for polygon offset scale.

Eric Anholt eric at anholt.net
Fri Jun 21 10:57:27 PDT 2013


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.
---
 src/mesa/drivers/dri/i915/intel_tris.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 7c60d84..126094b 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
-- 
1.8.3.rc0



More information about the mesa-dev mailing list