diff options
author | Eric Anholt <[email protected]> | 2014-09-23 15:27:55 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-09-23 17:23:29 -0700 |
commit | 45b104e0a228595142ed4bc62bbc8948100b9325 (patch) | |
tree | 6c23588560123540d5d42fb532ba92f4b13a50bb /src/gallium/drivers/vc4/vc4_state.c | |
parent | 0e7bc3088be693284fba80519be825e6e8218e40 (diff) |
vc4: Add support for flat shading.
This is just the GL 1.1 flat shading of colors -- we don't need to support
TGSI constant interpolation bits, because we don't do GLSL 1.30.
Fixes 7 piglit tests.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_state.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_state.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_state.c b/src/gallium/drivers/vc4/vc4_state.c index c7757709ee6..2e14573deb0 100644 --- a/src/gallium/drivers/vc4/vc4_state.c +++ b/src/gallium/drivers/vc4/vc4_state.c @@ -290,6 +290,13 @@ static void vc4_rasterizer_state_bind(struct pipe_context *pctx, void *hwcso) { struct vc4_context *vc4 = vc4_context(pctx); + struct vc4_rasterizer_state *rast = hwcso; + + if (vc4->rasterizer && rast && + vc4->rasterizer->base.flatshade != rast->base.flatshade) { + vc4->dirty |= VC4_DIRTY_FLAT_SHADE_FLAGS; + } + vc4->rasterizer = hwcso; vc4->dirty |= VC4_DIRTY_RASTERIZER; } |