[Mesa-dev] [PATCH 2/5] swr: flatshading makes color outputs flat, it doesn't affect others
Rowley, Timothy O
timothy.o.rowley at intel.com
Tue Nov 22 19:44:26 UTC 2016
Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com<mailto:timothy.o.rowley at intel.com>>
On Nov 21, 2016, at 11:52 AM, Ilia Mirkin <imirkin at alum.mit.edu<mailto:imirkin at alum.mit.edu>> wrote:
We were previously not marking the "regular" flat outputs as flat when
flatshading was enabled.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu<mailto:imirkin at alum.mit.edu>>
---
src/gallium/drivers/swr/swr_state.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index dcbe434..8541aca 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1490,10 +1490,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);
--
2.7.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161122/2480112d/attachment.html>
More information about the mesa-dev
mailing list