From: Jonathan Marek Date: Wed, 3 Jul 2019 18:01:33 +0000 (-0400) Subject: etnaviv: fix polygon offset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c3c05dc38a2e4243252b688282816be8824538b;p=mesa.git etnaviv: fix polygon offset 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 Reviewed-by: Christian Gmeiner --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c b/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c index c8627b1a9ab..b782e120537 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c +++ b/src/gallium/drivers/etnaviv/etnaviv_rasterizer.c @@ -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 */