summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-06-30 00:52:37 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-30 00:52:37 +0200
commitf6f1a8f26a302dc33df635625c490f0d65880059 (patch)
tree4b0f73bcd53ef8ddc3e57520d82d32937cb21b5c /src/video_core/texture_cache
parenttexture_cache: Use std::array for siblings_table (diff)
downloadyuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.gz
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.bz2
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.lz
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.xz
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.tar.zst
yuzu-f6f1a8f26a302dc33df635625c490f0d65880059.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/surface_params.h9
-rw-r--r--src/video_core/texture_cache/texture_cache.h3
2 files changed, 4 insertions, 8 deletions
diff --git a/src/video_core/texture_cache/surface_params.h b/src/video_core/texture_cache/surface_params.h
index 4dfb882f0..358d6757c 100644
--- a/src/video_core/texture_cache/surface_params.h
+++ b/src/video_core/texture_cache/surface_params.h
@@ -95,7 +95,7 @@ public:
/// Returns the block depth of a given mipmap level.
u32 GetMipBlockDepth(u32 level) const;
- /// returns the best possible row/pitch alignment for the surface.
+ /// Returns the best possible row/pitch alignment for the surface.
u32 GetRowAlignment(u32 level) const {
const u32 bpp =
GetCompressionType() == SurfaceCompression::Converted ? 4 : GetBytesPerPixel();
@@ -109,7 +109,7 @@ public:
std::size_t GetHostMipmapLevelOffset(u32 level) const;
/// Returns the offset in bytes in host memory (linear) of a given mipmap level
- // for a texture that is converted in host gpu.
+ /// for a texture that is converted in host gpu.
std::size_t GetConvertedMipmapOffset(u32 level) const;
/// Returns the size in bytes in guest memory of a given mipmap level.
@@ -176,10 +176,7 @@ public:
pixel_format < VideoCore::Surface::PixelFormat::MaxDepthStencilFormat;
}
- /// Returns how the compression should be handled for this texture. Values
- /// are: None(no compression), Compressed(texture is compressed),
- /// Converted(texture is converted before upload/ after download),
- /// Rearranged(texture is swizzled before upload/after download).
+ /// Returns how the compression should be handled for this texture.
SurfaceCompression GetCompressionType() const {
return VideoCore::Surface::GetFormatCompressionType(pixel_format);
}
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 9fcf87744..3df3e17dd 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -571,8 +571,7 @@ private:
// Step 1
// Check Level 1 Cache for a fast structural match. If candidate surface
// matches at certain level we are pretty much done.
- auto iter = l1_cache.find(cache_addr);
- if (iter != l1_cache.end()) {
+ if (const auto iter = l1_cache.find(cache_addr); iter != l1_cache.end()) {
TSurface& current_surface = iter->second;
const auto topological_result = current_surface->MatchesTopology(params);
if (topological_result != MatchTopologyResult::FullMatch) {