radv: move calculating primgroup_size to pipeline.

This moves this out of the draw paths.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2017-09-11 07:05:27 +01:00
parent 16eac0a756
commit d2490eb2d1
3 changed files with 11 additions and 9 deletions

View File

@@ -2007,6 +2007,13 @@ radv_pipeline_init(struct radv_pipeline *pipeline,
calculate_tess_state(pipeline, pCreateInfo);
}
if (radv_pipeline_has_tess(pipeline))
pipeline->graphics.primgroup_size = pipeline->graphics.tess.num_patches;
else if (radv_pipeline_has_gs(pipeline))
pipeline->graphics.primgroup_size = 64;
else
pipeline->graphics.primgroup_size = 128; /* recommended without a GS */
const VkPipelineVertexInputStateCreateInfo *vi_info =
pCreateInfo->pVertexInputState;
struct radv_vertex_elements_info *velems = &pipeline->vertex_elements;