diff options
author | Dave Airlie <[email protected]> | 2017-09-11 07:05:27 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-09-11 23:55:15 +0100 |
commit | d2490eb2d1c73054c0022f02d425d5f9c6d56c56 (patch) | |
tree | 8d708e9638149d912063177bf3d5cc018aebf1fb /src/amd/vulkan/radv_pipeline.c | |
parent | 16eac0a7569cb7c6c3ad033260ead1cc378f79cd (diff) |
radv: move calculating primgroup_size to pipeline.
This moves this out of the draw paths.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline.c')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index acc955f32b2..590dd67c462 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -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; |