diff options
author | Samuel Pitoiset <[email protected]> | 2019-09-09 10:42:18 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-09-16 12:08:22 +0200 |
commit | c415c58b4a1892ef98cb3c08d2de633b6e2c9107 (patch) | |
tree | 3a08554a204358b8a49f5343583685790cb4fcb5 /src/amd | |
parent | 67093ed3a339c5014d9ba34e6e7bc7cf0e329170 (diff) |
radv/gfx10: adjust the LDS size for VS/TES NGG streamout
It should account for the number of streamout outputs.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 48ea2c03929..8b523d884fc 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1729,15 +1729,16 @@ gfx10_get_ngg_info(const VkGraphicsPipelineCreateInfo *pCreateInfo, esvert_lds_size = es_info->esgs_itemsize / 4; gsprim_lds_size = (gs_info->gs.gsvs_vertex_size / 4 + 1) * max_out_verts_per_gsprim; } else { - /* TODO: This needs to be adjusted once LDS use for compaction - * after culling is implemented. */ - /* - if (es_info->info.so.num_outputs) - esvert_lds_size = 4 * es_info->info.so.num_outputs + 1; - */ + /* VS and TES. */ + /* LDS size for passing data from GS to ES. */ + struct radv_streamout_info *so_info = nir[MESA_SHADER_TESS_CTRL] + ? &infos[MESA_SHADER_TESS_EVAL].so + : &infos[MESA_SHADER_VERTEX].so; + + if (so_info->num_outputs) + esvert_lds_size = 4 * so_info->num_outputs + 1; - /* LDS size for passing data from GS to ES. - * GS stores Primitive IDs (one DWORD) into LDS at the address + /* GS stores Primitive IDs (one DWORD) into LDS at the address * corresponding to the ES thread of the provoking vertex. All * ES threads load and export PrimitiveID for their thread. */ |