From c415c58b4a1892ef98cb3c08d2de633b6e2c9107 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 9 Sep 2019 10:42:18 +0200 Subject: [PATCH] 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 Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_pipeline.c | 17 +++++++++-------- 1 file 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. */ -- 2.30.2