Mesa (master): radv/gfx10: fix unnecessary LDS overallocation for NGG GS

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 16 10:12:47 UTC 2019


Module: Mesa
Branch: master
Commit: d81100d307f5520160924df9be0bd32a272030ff
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d81100d307f5520160924df9be0bd32a272030ff

Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date:   Mon Sep  9 10:43:44 2019 +0200

radv/gfx10: fix unnecessary LDS overallocation for NGG GS

Ported from RadeonSI.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

---

 src/amd/vulkan/radv_pipeline.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 8b523d884fc..56d63e5f50f 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -1678,17 +1678,11 @@ gfx10_get_ngg_info(const VkGraphicsPipelineCreateInfo *pCreateInfo,
 	/* We can't allow using the whole LDS, because GS waves compete with
 	 * other shader stages for LDS space.
 	 *
-	 * Streamout can increase the ESGS buffer size later on, so be more
-	 * conservative with streamout and use 4K dwords. This may be suboptimal.
-	 *
-	 * Otherwise, use the limit of 7K dwords. The reason is that we need
-	 * to leave some headroom for the max_esverts increase at the end.
-	 *
 	 * TODO: We should really take the shader's internal LDS use into
 	 *       account. The linker will fail if the size is greater than
 	 *       8K dwords.
 	 */
-	const unsigned max_lds_size = (0 /*gs_info->info.so.num_outputs*/ ? 4 : 7) * 1024 - 128;
+	const unsigned max_lds_size = 8 * 1024 - 768;
 	const unsigned target_lds_size = max_lds_size;
 	unsigned esvert_lds_size = 0;
 	unsigned gsprim_lds_size = 0;




More information about the mesa-commit mailing list