summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-08 13:09:02 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:36:12 +0200
commitde0b1cb2b2199bd8efff78938d385fa74652cdfb (patch)
tree627dc29f0d24dc37aaa823fada0d14c7c40e1eda /src
parentsurface_base: Add parenthesis to EmplaceOverview's predicate (diff)
downloadyuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.tar
yuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.tar.gz
yuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.tar.bz2
yuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.tar.lz
yuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.tar.xz
yuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.tar.zst
yuzu-de0b1cb2b2199bd8efff78938d385fa74652cdfb.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/texture_cache/surface_base.h4
-rw-r--r--src/video_core/texture_cache/texture_cache.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h
index c11998249..017ee999e 100644
--- a/src/video_core/texture_cache/surface_base.h
+++ b/src/video_core/texture_cache/surface_base.h
@@ -262,20 +262,20 @@ public:
view_params.target == SurfaceTarget::Texture3D) {
return {};
}
- const std::size_t size{view_params.GetGuestSizeInBytes()};
const auto layer_mipmap{GetLayerMipmap(view_addr)};
if (!layer_mipmap) {
return {};
}
const u32 layer{layer_mipmap->first};
const u32 mipmap{layer_mipmap->second};
+ const std::size_t size{view_params.GetGuestSizeInBytes()};
if (GetMipmapSize(mipmap) != size) {
// TODO: The view may cover many mimaps, this case can still go on.
// This edge-case can be safely be ignored since it will just result in worse
// performance.
return {};
}
- return GetView(ViewParams(params.target, layer, 1, mipmap, 1));
+ return GetView(ViewParams(view_params.target, layer, 1, mipmap, 1));
}
TView GetMainView() const {
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index bb5a50ab9..554b9a228 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -323,7 +323,7 @@ private:
const SurfaceParams& params,
const GPUVAddr gpu_addr,
const u8* host_ptr) {
- if (!params.is_layered || params.target == SurfaceTarget::Texture3D) {
+ if (params.target == SurfaceTarget::Texture3D) {
return {};
}
TSurface new_surface = GetUncachedSurface(gpu_addr, params);