From 2fbd2d5f58265bf83c0ddb123fe31463b546a4f6 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Mon, 11 Feb 2019 21:51:09 -0800 Subject: [PATCH] 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 --- src/gallium/drivers/freedreno/a6xx/fd6_program.c | 7 +++++-- 1 file 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); -- 2.30.2