aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/swr_draw.cpp
diff options
context:
space:
mode:
authorBruce Cherniak <[email protected]>2016-05-24 15:00:17 -0500
committerTim Rowley <[email protected]>2016-05-25 18:47:16 -0500
commitc8835a592471a0238e296f6529b5dadb431cc622 (patch)
tree2e75f1fcde19886777c15f4a6ca471cdc0dc3604 /src/gallium/drivers/swr/swr_draw.cpp
parent978ab88858170b219cf6b66eaac11e89ae2f0ce9 (diff)
swr: [rasterizer] Correctly select optimized primitive assembly.
Indexed primitives were always using cut-aware primitive assembly, whether primitive_restart was enabled or not. Correctly pass down primitive_restart and select optimized PA when possible. Reviewed-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_draw.cpp')
-rw-r--r--src/gallium/drivers/swr/swr_draw.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp
index 428bf78cb55..7a4c89626fb 100644
--- a/src/gallium/drivers/swr/swr_draw.cpp
+++ b/src/gallium/drivers/swr/swr_draw.cpp
@@ -159,6 +159,12 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
SwrSetFetchFunc(ctx->swrContext, velems->fsFunc);
+ /* Set up frontend state
+ * XXX setup provokingVertex & topologyProvokingVertex */
+ SWR_FRONTEND_STATE feState = {0};
+ feState.bEnableCutIndex = info->primitive_restart;
+ SwrSetFrontendState(ctx->swrContext, &feState);
+
if (info->indexed)
SwrDrawIndexedInstanced(ctx->swrContext,
swr_convert_prim_topology(info->mode),