summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_state.cpp
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-07-12 15:03:42 -0600
committerTim Rowley <[email protected]>2016-07-20 10:22:15 -0500
commitefdaf5fa3e74ca4f3d9217dc6955aef6dc698a68 (patch)
tree19ed6e0186ecd93e1b52e07704cf58c8b87ae860 /src/gallium/drivers/swr/swr_state.cpp
parenta5846fb75abae86dee29b2948b5d6462d84467c3 (diff)
swr: [rasterizer] attribute swizzling and linkage
Add support for enhanced attribute swizzling. Currently supports constant source overrides to handle PrimitiveID support. No support yet for input select swizzling or wrap shortest. Removes obsoleted linkageMask and associated code. Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_state.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 5caaa5c7139..dac95ce42e7 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1373,16 +1373,13 @@ swr_update_derived(struct pipe_context *pipe,
}
}
- uint32_t linkage = ctx->vs->linkageMask;
- if (ctx->rasterizer->sprite_coord_enable)
- linkage |= (1 << ctx->vs->info.base.num_outputs);
-
- SwrSetLinkage(ctx->swrContext, linkage, NULL);
-
// set up backend state
SWR_BACKEND_STATE backendState = {0};
- backendState.numAttributes = 1;
- backendState.numComponents[0] = 4;
+ backendState.numAttributes =
+ ctx->vs->info.base.num_outputs - 1 +
+ (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 :