freedreno/a3xx: double the polygon offset value
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 16 Aug 2015 19:26:38 +0000 (15:26 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 17 Aug 2015 15:38:38 +0000 (11:38 -0400)
A few other drivers do this, fixes the gl-1.4-polygon-offset piglit test

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c

index 9c16804..583caaa 100644 (file)
@@ -73,7 +73,7 @@ fd3_rasterizer_state_create(struct pipe_context *pctx,
        so->gras_su_poly_offset_scale =
                        A3XX_GRAS_SU_POLY_OFFSET_SCALE_VAL(cso->offset_scale);
        so->gras_su_poly_offset_offset =
-                       A3XX_GRAS_SU_POLY_OFFSET_OFFSET(cso->offset_units);
+                       A3XX_GRAS_SU_POLY_OFFSET_OFFSET(cso->offset_units * 2.0f);
 
        so->gras_su_mode_control =
                        A3XX_GRAS_SU_MODE_CONTROL_LINEHALFWIDTH(cso->line_width/2.0);