lima: Fix glFrontFace handling
authorAndreas Baierl <ichgeh@imkreisrum.de>
Thu, 19 Nov 2020 15:38:11 +0000 (16:38 +0100)
committerAndreas Baierl <ichgeh@imkreisrum.de>
Mon, 27 Sep 2021 07:24:32 +0000 (09:24 +0200)
commit187f786108085893733e50abb70518feda44328f
tree2ec82ab4a8cb29cf31251a01c3df2facf0569c83
parent03097f30fb095bffffbb432ebe98904474efad84
lima: Fix glFrontFace handling

Bit 12 of render->aux1 is GL_CCW/GL_CW. For GL_CCW (default of glFrontFace) we have
to set that bit active.

This is not what the blob does and what the original reverse engineering documentation
says. The blob sets this value inverted and does some bogus negation of the fragment
shaders gl_FrontFacing variable instead.

Anyway, doing it this way does not cause regressions but fixes
dEQP-GLES2.functional.shaders.builtin_variable.frontfacing and 4 piglit tests.

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7690>
src/gallium/drivers/lima/ci/deqp-lima-fails.txt
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_parser.c