Skip to content
Snippets Groups Projects
Commit 49e10504 authored by Jonathan Marek's avatar Jonathan Marek Committed by Dylan Baker
Browse files

etnaviv: fix depth bias


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: default avatarJonathan Marek <jonathan@marek.ca>
Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
(cherry picked from commit 7b524e1a)
parent db4f7eae
No related branches found
No related tags found
No related merge requests found
......@@ -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);
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 */
......
......@@ -226,6 +226,7 @@ etna_set_framebuffer_state(struct pipe_context *pctx,
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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment