summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-11-20 19:48:38 -0500
committerIlia Mirkin <[email protected]>2016-11-22 20:27:20 -0500
commit2595aebd91956cbe47d2805d8c7beac2d9de7fa8 (patch)
tree06f6a3d8fc322934e4c4f113fd54637827f28a16
parent37be598dda8671568fb24105a0cbca7d34cdd2ee (diff)
swr: flatshading makes color outputs flat, it doesn't affect others
We were previously not marking the "regular" flat outputs as flat when flatshading was enabled. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index b0cbc21964e..41193795ce1 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1501,10 +1501,8 @@ swr_update_derived(struct pipe_context *pipe,
(ctx->rasterizer->sprite_coord_enable ? 1 : 0);
for (unsigned i = 0; i < backendState.numAttributes; i++)
backendState.numComponents[i] = 4;
- backendState.constantInterpolationMask =
- ctx->rasterizer->flatshade ?
- ctx->fs->flatConstantMask :
- ctx->fs->constantMask;
+ backendState.constantInterpolationMask = ctx->fs->constantMask |
+ (ctx->rasterizer->flatshade ? ctx->fs->flatConstantMask : 0);
backendState.pointSpriteTexCoordMask = ctx->fs->pointSpriteMask;
SwrSetBackendState(ctx->swrContext, &backendState);