mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 06:43:17 +00:00
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:
parent
0d6edaa0a0
commit
30198d5ffc
22 changed files with 478 additions and 322 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue