diff options
| author | 2020-07-14 14:04:16 -0400 | |
|---|---|---|
| committer | 2020-07-14 14:04:16 -0400 | |
| commit | 666b37ad56e816cd2bde4a521cba0e63812dc681 (patch) | |
| tree | c498f364e42006df041ec4bab818edb2c1b23d36 /src/video_core/texture_cache | |
| parent | Merge pull request #4294 from MerryMage/cpu-opt-settings (diff) | |
| parent | video_core/textures: Add and use SwizzleSliceToVoxel, and minor style changes (diff) | |
| download | yuzu-666b37ad56e816cd2bde4a521cba0e63812dc681.tar.gz yuzu-666b37ad56e816cd2bde4a521cba0e63812dc681.tar.xz yuzu-666b37ad56e816cd2bde4a521cba0e63812dc681.zip | |
Merge pull request #4242 from ReinUsesLisp/maxwell-dma
maxwell_dma: Match official doc and support pitch->voxel copies
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/surface_params.cpp | 5 | ||||
| -rw-r--r-- | src/video_core/texture_cache/surface_params.h | 2 |
2 files changed, 3 insertions, 4 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 | |||
| 343 | size += GetInnerMipmapMemorySize(level, as_host_size, uncompressed); | 343 | size += GetInnerMipmapMemorySize(level, as_host_size, uncompressed); |
| 344 | } | 344 | } |
| 345 | if (is_tiled && is_layered) { | 345 | if (is_tiled && is_layered) { |
| 346 | return Common::AlignBits(size, | 346 | return Common::AlignBits(size, Tegra::Texture::GOB_SIZE_SHIFT + block_height + block_depth); |
| 347 | Tegra::Texture::GetGOBSizeShift() + block_height + block_depth); | ||
| 348 | } | 347 | } |
| 349 | return size; | 348 | return size; |
| 350 | } | 349 | } |
| @@ -418,7 +417,7 @@ std::tuple<u32, u32, u32> SurfaceParams::GetBlockOffsetXYZ(u32 offset) const { | |||
| 418 | const u32 block_size = GetBlockSize(); | 417 | const u32 block_size = GetBlockSize(); |
| 419 | const u32 block_index = offset / block_size; | 418 | const u32 block_index = offset / block_size; |
| 420 | const u32 gob_offset = offset % block_size; | 419 | const u32 gob_offset = offset % block_size; |
| 421 | const u32 gob_index = gob_offset / static_cast<u32>(Tegra::Texture::GetGOBSize()); | 420 | const u32 gob_index = gob_offset / static_cast<u32>(Tegra::Texture::GOB_SIZE); |
| 422 | const u32 x_gob_pixels = 64U / GetBytesPerPixel(); | 421 | const u32 x_gob_pixels = 64U / GetBytesPerPixel(); |
| 423 | const u32 x_block_pixels = x_gob_pixels << block_width; | 422 | const u32 x_block_pixels = x_gob_pixels << block_width; |
| 424 | const u32 y_block_pixels = 8U << block_height; | 423 | const u32 y_block_pixels = 8U << block_height; |
diff --git a/src/video_core/texture_cache/surface_params.h b/src/video_core/texture_cache/surface_params.h index 24957df8d..118aa689e 100644 --- a/src/video_core/texture_cache/surface_params.h +++ b/src/video_core/texture_cache/surface_params.h | |||
| @@ -204,7 +204,7 @@ public: | |||
| 204 | static std::size_t AlignLayered(const std::size_t out_size, const u32 block_height, | 204 | static std::size_t AlignLayered(const std::size_t out_size, const u32 block_height, |
| 205 | const u32 block_depth) { | 205 | const u32 block_depth) { |
| 206 | return Common::AlignBits(out_size, | 206 | return Common::AlignBits(out_size, |
| 207 | Tegra::Texture::GetGOBSizeShift() + block_height + block_depth); | 207 | Tegra::Texture::GOB_SIZE_SHIFT + block_height + block_depth); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | /// Converts a width from a type of surface into another. This helps represent the | 210 | /// Converts a width from a type of surface into another. This helps represent the |