yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Fixes to mipmap's process and reconstruct process

This commit is contained in:
Fernando Sahmkow 2019-05-08 07:09:02 -04:00 committed by ReinUsesLisp
parent e0002599ac
commit de0b1cb2b2
2 changed files with 3 additions and 3 deletions

View File

@ -262,20 +262,20 @@ public:
view_params.target == SurfaceTarget::Texture3D) { view_params.target == SurfaceTarget::Texture3D) {
return {}; return {};
} }
const std::size_t size{view_params.GetGuestSizeInBytes()};
const auto layer_mipmap{GetLayerMipmap(view_addr)}; const auto layer_mipmap{GetLayerMipmap(view_addr)};
if (!layer_mipmap) { if (!layer_mipmap) {
return {}; return {};
} }
const u32 layer{layer_mipmap->first}; const u32 layer{layer_mipmap->first};
const u32 mipmap{layer_mipmap->second}; const u32 mipmap{layer_mipmap->second};
const std::size_t size{view_params.GetGuestSizeInBytes()};
if (GetMipmapSize(mipmap) != size) { if (GetMipmapSize(mipmap) != size) {
// TODO: The view may cover many mimaps, this case can still go on. // 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 // This edge-case can be safely be ignored since it will just result in worse
// performance. // performance.
return {}; return {};
} }
return GetView(ViewParams(params.target, layer, 1, mipmap, 1)); return GetView(ViewParams(view_params.target, layer, 1, mipmap, 1));
} }
TView GetMainView() const { TView GetMainView() const {

View File

@ -323,7 +323,7 @@ private:
const SurfaceParams& params, const SurfaceParams& params,
const GPUVAddr gpu_addr, const GPUVAddr gpu_addr,
const u8* host_ptr) { const u8* host_ptr) {
if (!params.is_layered || params.target == SurfaceTarget::Texture3D) { if (params.target == SurfaceTarget::Texture3D) {
return {}; return {};
} }
TSurface new_surface = GetUncachedSurface(gpu_addr, params); TSurface new_surface = GetUncachedSurface(gpu_addr, params);