mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
turnip: Stop allocating unused pvtmem space in the pipeline CS.
The pvtmem was split off to a separate read/write BO. Fixes:931ad19a18("turnip: make cmdstream bo's read-only to GPU") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15038> (cherry picked from commite0fbdd3eda)
This commit is contained in:
parent
c554672096
commit
9cd5c779ba
2 changed files with 1 additions and 7 deletions
|
|
@ -2900,7 +2900,7 @@
|
|||
"description": "turnip: Stop allocating unused pvtmem space in the pipeline CS.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"because_sha": "931ad19a18174bb01dfd76f3a1224a97db684d31"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue