summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/surface_params.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-07-04 23:42:10 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-07-10 09:09:32 +0200
commitc574ab5aa1d3ff81b28ddfbba3818b3ce724aa32 (patch)
treebfd4107fc64c09c767be6bfe79c4904075ce0307 /src/video_core/texture_cache/surface_params.cpp
parentmaxwell_dma: Rename registers to match official docs and reorder (diff)
downloadyuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.tar
yuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.tar.gz
yuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.tar.bz2
yuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.tar.lz
yuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.tar.xz
yuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.tar.zst
yuzu-c574ab5aa1d3ff81b28ddfbba3818b3ce724aa32.zip
Diffstat (limited to 'src/video_core/texture_cache/surface_params.cpp')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 0b2b2b8c4..921562c1f 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -343,8 +343,7 @@ std::size_t SurfaceParams::GetLayerSize(bool as_host_size, bool uncompressed) co
size += GetInnerMipmapMemorySize(level, as_host_size, uncompressed);
}
if (is_tiled && is_layered) {
- return Common::AlignBits(size,
- Tegra::Texture::GetGOBSizeShift() + block_height + block_depth);
+ return Common::AlignBits(size, Tegra::Texture::GOB_SIZE_SHIFT + block_height + block_depth);
}
return size;
}
@@ -418,7 +417,7 @@ std::tuple<u32, u32, u32> SurfaceParams::GetBlockOffsetXYZ(u32 offset) const {
const u32 block_size = GetBlockSize();
const u32 block_index = offset / block_size;
const u32 gob_offset = offset % block_size;
- const u32 gob_index = gob_offset / static_cast<u32>(Tegra::Texture::GetGOBSize());
+ const u32 gob_index = gob_offset / static_cast<u32>(Tegra::Texture::GOB_SIZE);
const u32 x_gob_pixels = 64U / GetBytesPerPixel();
const u32 x_block_pixels = x_gob_pixels << block_width;
const u32 y_block_pixels = 8U << block_height;