broadcom/vc5: Emit proper flatshading code for glShadeModel(GL_FLAT).
authorEric Anholt <eric@anholt.net>
Wed, 27 Dec 2017 23:12:37 +0000 (15:12 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 3 Jan 2018 22:25:23 +0000 (14:25 -0800)
commit2056e4a777bd0eed88ff2762977955b2f2bf2f1c
tree619d3ce2823d1880e9cd787be8bf9488b8c593d2
parent476469955225e15f454e01dc80047dd5fa5c9f97
broadcom/vc5: Emit proper flatshading code for glShadeModel(GL_FLAT).

In updating the simulator, behavior changed slightly so that our old code
wasn't getting glxgears's flatshading interpolated right.  Emit flat
shading code just like we would for a normal flat-shaded varying, by
passing a flag in the shader key for glShadeModel(GL_FLAT) state and
customizing the color inputs based on that.
src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/vir.c
src/gallium/drivers/vc5/vc5_emit.c
src/gallium/drivers/vc5/vc5_program.c
src/gallium/drivers/vc5/vc5_state.c