[GPU] RT size function adjustments for Vulkan convenience
This commit is contained in:
parent
f6e48d5386
commit
4a95f72fba
|
@ -845,7 +845,9 @@ RenderTargetCache::GetConfigDepthFloat24Conversion() {
|
||||||
|
|
||||||
uint32_t RenderTargetCache::GetRenderTargetHeight(
|
uint32_t RenderTargetCache::GetRenderTargetHeight(
|
||||||
uint32_t pitch_tiles_at_32bpp, xenos::MsaaSamples msaa_samples) const {
|
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.
|
// Down to the end of EDRAM.
|
||||||
uint32_t tile_rows = (xenos::kEdramTileCount + (pitch_tiles_at_32bpp - 1)) /
|
uint32_t tile_rows = (xenos::kEdramTileCount + (pitch_tiles_at_32bpp - 1)) /
|
||||||
pitch_tiles_at_32bpp;
|
pitch_tiles_at_32bpp;
|
||||||
|
|
|
@ -265,11 +265,15 @@ class RenderTargetCache {
|
||||||
uint32_t GetPitchTiles() const {
|
uint32_t GetPitchTiles() const {
|
||||||
return pitch_tiles_at_32bpp << uint32_t(Is64bpp());
|
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 *
|
return pitch_tiles_at_32bpp *
|
||||||
(xenos::kEdramTileWidthSamples >>
|
(xenos::kEdramTileWidthSamples >>
|
||||||
uint32_t(msaa_samples >= xenos::MsaaSamples::k4X));
|
uint32_t(msaa_samples >= xenos::MsaaSamples::k4X));
|
||||||
}
|
}
|
||||||
|
uint32_t GetWidth() const {
|
||||||
|
return GetWidth(pitch_tiles_at_32bpp, msaa_samples);
|
||||||
|
}
|
||||||
|
|
||||||
std::string GetDebugName() const {
|
std::string GetDebugName() const {
|
||||||
return fmt::format(
|
return fmt::format(
|
||||||
|
|
Loading…
Reference in New Issue