Surface management rework (2/3) (#329)

* texture_cache: interface refactoring

* a bit of fixes and improvements

* texture_cache: macro tile extents for bpp 128

* texture_cache: detiler: prefer host memory for large buffers upload
This commit is contained in:
psucien 2024-07-28 17:20:42 +02:00 committed by GitHub
parent 0d6edaa0a0
commit 30198d5ffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 478 additions and 322 deletions

View file

@ -377,9 +377,13 @@ struct Liverpool {
return 1u << z_info.num_samples; // spec doesn't say it is a log2
}
u32 NumBits() const {
return z_info.format == ZFormat::Z32Float ? 32 : 16;
}
size_t GetDepthSliceSize() const {
ASSERT(z_info.format != ZFormat::Invalid);
const auto bpe = z_info.format == ZFormat::Z32Float ? 4 : 2;
const auto bpe = NumBits() >> 3; // in bytes
return (depth_slice.tile_max + 1) * 64 * bpe * NumSamples();
}
};