Fixes remaining failures in these deqp tests (tested on GC3000/GC7000L):
dEQP-GLES2.functional.polygon_offset.*
Fixes: 6c3c05dc ("etnaviv: fix polygon offset")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
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);
+ cs->SE_DEPTH_BIAS = fui((so->offset_units / 65535.0f) * 2.0f);
cs->SE_CONFIG = COND(so->line_last_pixel, VIVS_SE_CONFIG_LAST_PIXEL_ENABLE);
/* XXX anything else? */
/* XXX bottom_edge_rule */
depth_format |
COND(depth_supertiled, VIVS_PE_DEPTH_CONFIG_SUPER_TILED) |
VIVS_PE_DEPTH_CONFIG_DEPTH_MODE_Z |
+ VIVS_PE_DEPTH_CONFIG_UNK18 | /* something to do with clipping? */
COND(ctx->specs.halti >= 5, VIVS_PE_DEPTH_CONFIG_DISABLE_ZS) /* Needs to be enabled on GC7000, otherwise depth writes hang w/ TS - apparently it does something else now */
;
/* VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH */