Mesa (main): turnip: Stop allocating unused pvtmem space in the pipeline CS.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 12 01:26:34 UTC 2022
Module: Mesa
Branch: main
Commit: e0fbdd3eda951d8589a2ea8f3a46fe032fcf1646
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e0fbdd3eda951d8589a2ea8f3a46fe032fcf1646
Author: Emma Anholt <emma at anholt.net>
Date: Tue Feb 15 13:52:15 2022 -0800
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15038>
---
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);
}
More information about the mesa-commit
mailing list