From: Kristian H. Kristensen Date: Tue, 12 Feb 2019 05:51:09 +0000 (-0800) Subject: freedreno/a6xx: Front facing needs UNK3 bit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2fbd2d5f58265bf83c0ddb123fe31463b546a4f6;p=mesa.git 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 --- 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);