From 6c3c05dc38a2e4243252b688282816be8824538b Mon Sep 17 00:00:00 2001 From: Jonathan Marek Date: Wed, 3 Jul 2019 14:01:33 -0400 Subject: [PATCH] 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 --- src/gallium/drivers/etnaviv/etnaviv_rasterizer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.30.2