Mesa (staging/22.0): turnip: Stop allocating unused pvtmem space in the pipeline CS.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 13 22:23:55 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: fce4589a9b11948c6d15add28ca6da0d4f706013
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fce4589a9b11948c6d15add28ca6da0d4f706013
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>
(cherry picked from commit e0fbdd3eda951d8589a2ea8f3a46fe032fcf1646)
---
.pick_status.json | 2 +-
src/freedreno/vulkan/tu_pipeline.c | 6 ------
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 3b72e869233..4c3d4797c43 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -828,7 +828,7 @@
"description": "turnip: Stop allocating unused pvtmem space in the pipeline CS.",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"because_sha": "931ad19a18174bb01dfd76f3a1224a97db684d31"
},
{
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c
index 0e693f9811b..b30e1e5740c 100644
--- a/src/freedreno/vulkan/tu_pipeline.c
+++ b/src/freedreno/vulkan/tu_pipeline.c
@@ -2233,18 +2233,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++) {
@@ -2263,7 +2258,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