[GPU] RT size function adjustments for Vulkan convenience

This commit is contained in:
Triang3l 2021-06-19 13:57:04 +03:00
parent f6e48d5386
commit 4a95f72fba
2 changed files with 8 additions and 2 deletions

View File

@ -845,7 +845,9 @@ RenderTargetCache::GetConfigDepthFloat24Conversion() {
uint32_t RenderTargetCache::GetRenderTargetHeight(
uint32_t pitch_tiles_at_32bpp, xenos::MsaaSamples msaa_samples) const {
assert_not_zero(pitch_tiles_at_32bpp);
if (!pitch_tiles_at_32bpp) {
return 0;
}
// Down to the end of EDRAM.
uint32_t tile_rows = (xenos::kEdramTileCount + (pitch_tiles_at_32bpp - 1)) /
pitch_tiles_at_32bpp;

View File

@ -265,11 +265,15 @@ class RenderTargetCache {
uint32_t GetPitchTiles() const {
return pitch_tiles_at_32bpp << uint32_t(Is64bpp());
}
uint32_t GetWidth() const {
static constexpr uint32_t GetWidth(uint32_t pitch_tiles_at_32bpp,
xenos::MsaaSamples msaa_samples) {
return pitch_tiles_at_32bpp *
(xenos::kEdramTileWidthSamples >>
uint32_t(msaa_samples >= xenos::MsaaSamples::k4X));
}
uint32_t GetWidth() const {
return GetWidth(pitch_tiles_at_32bpp, msaa_samples);
}
std::string GetDebugName() const {
return fmt::format(