From e0fbdd3eda951d8589a2ea8f3a46fe032fcf1646 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Tue, 15 Feb 2022 13:52:15 -0800 Subject: [PATCH] turnip: Stop allocating unused pvtmem space in the pipeline CS. The pvtmem was split off to a separate read/write BO. Fixes: 931ad19a1817 ("turnip: make cmdstream bo's read-only to GPU") Part-of: --- src/freedreno/vulkan/tu_pipeline.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index b027623efac..d8cdd1969a5 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -2263,18 +2263,13 @@ tu_pipeline_allocate_cs(struct tu_device *dev, /* graphics case: */ if (builder) { - uint32_t pvtmem_bytes = 0; for (uint32_t i = 0; i < ARRAY_SIZE(builder->variants); i++) { if (builder->variants[i]) { size += builder->variants[i]->info.size / 4; - pvtmem_bytes = MAX2(pvtmem_bytes, builder->variants[i]->pvtmem_size); } } size += builder->binning_variant->info.size / 4; - pvtmem_bytes = MAX2(pvtmem_bytes, builder->binning_variant->pvtmem_size); - - size += calc_pvtmem_size(dev, NULL, pvtmem_bytes) / 4; builder->additional_cs_reserve_size = 0; for (unsigned i = 0; i < ARRAY_SIZE(builder->variants); i++) { @@ -2293,7 +2288,6 @@ tu_pipeline_allocate_cs(struct tu_device *dev, size += builder->additional_cs_reserve_size; } else { size += compute->info.size / 4; - size += calc_pvtmem_size(dev, NULL, compute->pvtmem_size) / 4; size += tu_xs_get_additional_cs_size_dwords(compute); }