aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-02-11 21:51:09 -0800
committerKristian H. Kristensen <[email protected]>2019-02-13 11:14:06 -0800
commit2fbd2d5f58265bf83c0ddb123fe31463b546a4f6 (patch)
tree5ab9582ca036b5e743a2a1d19b43d90ecefa8293
parent1831238c8e1fb45c15770b0ae7fed9a62cb2f0eb (diff)
freedreno/a6xx: Front facing needs UNK3 bit
We need to set UNK3 in GRAS_CNTL and RB_RENDER_CONTROL0 for the value to be reliably delivered. Fixes: dEQP-GLES3.functional.shaders.builtin_variable.frontfacing Signed-off-by: Kristian H. Kristensen <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_program.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c
index 9fde74201dd..470bacfd5fe 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c
@@ -549,7 +549,8 @@ setup_stateobj(struct fd_ringbuffer *ring,
A6XX_GRAS_CNTL_XCOORD |
A6XX_GRAS_CNTL_YCOORD |
A6XX_GRAS_CNTL_ZCOORD |
- A6XX_GRAS_CNTL_WCOORD));
+ A6XX_GRAS_CNTL_WCOORD) |
+ COND(s[FS].v->frag_face, A6XX_GRAS_CNTL_UNK3));
OUT_PKT4(ring, REG_A6XX_RB_RENDER_CONTROL0, 2);
OUT_RING(ring, COND(enable_varyings, A6XX_RB_RENDER_CONTROL0_VARYING |
@@ -559,7 +560,9 @@ setup_stateobj(struct fd_ringbuffer *ring,
A6XX_RB_RENDER_CONTROL0_XCOORD |
A6XX_RB_RENDER_CONTROL0_YCOORD |
A6XX_RB_RENDER_CONTROL0_ZCOORD |
- A6XX_RB_RENDER_CONTROL0_WCOORD));
+ A6XX_RB_RENDER_CONTROL0_WCOORD) |
+ COND(s[FS].v->frag_face, A6XX_RB_RENDER_CONTROL0_UNK3));
+
OUT_RING(ring, COND(s[FS].v->frag_face, A6XX_RB_RENDER_CONTROL1_FACENESS));
OUT_PKT4(ring, REG_A6XX_SP_FS_OUTPUT_REG(0), 8);