diff options
author | Tim Rowley <[email protected]> | 2017-06-28 09:54:32 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-06-29 13:23:33 -0500 |
commit | 867e1117692c4c735688b678dbdff7a5e4696d95 (patch) | |
tree | f6be4798fcc482f01f431ee023be48120d7216c9 /src/gallium/drivers/swr/swr_draw.cpp | |
parent | 9f6110ad327275fecc68248c1d6bd85f6b3d111c (diff) |
swr: set dynamic vertex size
Reduces the memory footprint of the frontend processing by packing
vertices.
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/swr_draw.cpp')
-rw-r--r-- | src/gallium/drivers/swr/swr_draw.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/swr_draw.cpp b/src/gallium/drivers/swr/swr_draw.cpp index f85076b74cc..f26b8e873c1 100644 --- a/src/gallium/drivers/swr/swr_draw.cpp +++ b/src/gallium/drivers/swr/swr_draw.cpp @@ -129,8 +129,10 @@ swr_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) * XXX setup provokingVertex & topologyProvokingVertex */ SWR_FRONTEND_STATE feState = {0}; - /* XXX this value should be minimized based on the shader set */ - feState.vsVertexSize = SWR_VTX_NUM_SLOTS; + feState.vsVertexSize = + VERTEX_ATTRIB_START_SLOT + + + ctx->vs->info.base.num_outputs + - (ctx->vs->info.base.writes_position ? 1 : 0); if (ctx->rasterizer->flatshade_first) { feState.provokingVertex = {1, 0, 0}; |