etnaviv: fix polygon offset
authorJonathan Marek <jonathan@marek.ca>
Wed, 3 Jul 2019 18:01:33 +0000 (14:01 -0400)
committerJonathan Marek <jonathan@marek.ca>
Thu, 18 Jul 2019 03:07:07 +0000 (23:07 -0400)
Dividing the fui result by 65535 is obviously wrong, and from testing, on
GC7000L at least there is no division by 65535.

Fixes dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_rasterizer.c

index c8627b1a9ab4cf1b8593984fdb5845dff9f5b2b2..b782e120537bb30c219ce8ea603799c447648ec1 100644 (file)
@@ -56,7 +56,7 @@ etna_rasterizer_state_create(struct pipe_context *pctx,
    cs->PA_LINE_WIDTH = fui(so->line_width / 2.0f);
    cs->PA_POINT_SIZE = fui(so->point_size / 2.0f);
    cs->SE_DEPTH_SCALE = fui(so->offset_scale);
-   cs->SE_DEPTH_BIAS = fui(so->offset_units) / 65535.0f;
+   cs->SE_DEPTH_BIAS = fui(so->offset_units);
    cs->SE_CONFIG = COND(so->line_last_pixel, VIVS_SE_CONFIG_LAST_PIXEL_ENABLE);
    /* XXX anything else? */
    /* XXX bottom_edge_rule */