diff options
| author | 2019-07-14 08:41:06 -0400 | |
|---|---|---|
| committer | 2019-07-14 12:00:32 -0400 | |
| commit | 0f54b541f4877eda87ad968708fa38ce604c3a80 (patch) | |
| tree | f8ef9261aa047c70f0dd5205edb9fecb5f0b8f96 /src | |
| parent | Texture_Cache: Force Framebuffer reset if an active render target is unregist... (diff) | |
| download | yuzu-0f54b541f4877eda87ad968708fa38ce604c3a80.tar.gz yuzu-0f54b541f4877eda87ad968708fa38ce604c3a80.tar.xz yuzu-0f54b541f4877eda87ad968708fa38ce604c3a80.zip | |
Texture_Cache: Remove some unprecise fallback case and clang format
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/texture_cache/surface_params.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 9 |
2 files changed, 5 insertions, 13 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp index df9260859..33c94daa8 100644 --- a/src/video_core/texture_cache/surface_params.cpp +++ b/src/video_core/texture_cache/surface_params.cpp | |||
| @@ -294,13 +294,14 @@ std::size_t SurfaceParams::GetInnerMipmapMemorySize(u32 level, bool as_host_size | |||
| 294 | const u32 height{GetMipmapSize(uncompressed, GetMipHeight(level), GetDefaultBlockHeight())}; | 294 | const u32 height{GetMipmapSize(uncompressed, GetMipHeight(level), GetDefaultBlockHeight())}; |
| 295 | const u32 depth{is_layered ? 1U : GetMipDepth(level)}; | 295 | const u32 depth{is_layered ? 1U : GetMipDepth(level)}; |
| 296 | if (is_tiled) { | 296 | if (is_tiled) { |
| 297 | return Tegra::Texture::CalculateSize(!as_host_size, GetBytesPerPixel(), width, height, depth, | 297 | return Tegra::Texture::CalculateSize(!as_host_size, GetBytesPerPixel(), width, height, |
| 298 | GetMipBlockHeight(level), GetMipBlockDepth(level)); | 298 | depth, GetMipBlockHeight(level), |
| 299 | GetMipBlockDepth(level)); | ||
| 299 | } else { | 300 | } else { |
| 300 | if (as_host_size || IsBuffer()) { | 301 | if (as_host_size || IsBuffer()) { |
| 301 | return GetBytesPerPixel()*width*height*depth; | 302 | return GetBytesPerPixel() * width * height * depth; |
| 302 | } else { | 303 | } else { |
| 303 | return pitch*height*depth; | 304 | return pitch * height * depth; |
| 304 | } | 305 | } |
| 305 | } | 306 | } |
| 306 | } | 307 | } |
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 5e9812bb9..6d3d2da7d 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -662,15 +662,6 @@ private: | |||
| 662 | } | 662 | } |
| 663 | return {current_surface, *view}; | 663 | return {current_surface, *view}; |
| 664 | } | 664 | } |
| 665 | // The next case is unsafe, so if we r in accurate GPU, just skip it | ||
| 666 | if (Settings::values.use_accurate_gpu_emulation) { | ||
| 667 | return RecycleSurface(overlaps, params, gpu_addr, preserve_contents, | ||
| 668 | MatchTopologyResult::FullMatch); | ||
| 669 | } | ||
| 670 | // This is the case the texture is a part of the parent. | ||
| 671 | if (current_surface->MatchesSubTexture(params, gpu_addr)) { | ||
| 672 | return RebuildSurface(current_surface, params, is_render); | ||
| 673 | } | ||
| 674 | } else { | 665 | } else { |
| 675 | // If there are many overlaps, odds are they are subtextures of the candidate | 666 | // If there are many overlaps, odds are they are subtextures of the candidate |
| 676 | // surface. We try to construct a new surface based on the candidate parameters, | 667 | // surface. We try to construct a new surface based on the candidate parameters, |