summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/surface_params.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-24 21:34:31 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:33 +0200
commit228f516bb4426a41a4d1c1756751557f7a0eecda (patch)
tree36ece73b658929c2878bdc1c7f4592fed8c595da /src/video_core/texture_cache/surface_params.cpp
parenttexture_cache: Correct copying between compressed and uncompressed formats (diff)
downloadyuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.tar
yuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.tar.gz
yuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.tar.bz2
yuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.tar.lz
yuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.tar.xz
yuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.tar.zst
yuzu-228f516bb4426a41a4d1c1756751557f7a0eecda.zip
Diffstat (limited to 'src/video_core/texture_cache/surface_params.cpp')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index d9d157d02..77c09264a 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -85,6 +85,7 @@ SurfaceParams SurfaceParams::CreateForTexture(Core::System& system,
}
params.pitch = params.is_tiled ? 0 : config.tic.Pitch();
params.num_levels = config.tic.max_mip_level + 1;
+ params.emulated_levels = std::min(params.num_levels, params.MaxPossibleMipmap());
params.is_layered = params.IsLayered();
return params;
}
@@ -109,6 +110,7 @@ SurfaceParams SurfaceParams::CreateForDepthBuffer(
params.depth = 1;
params.pitch = 0;
params.num_levels = 1;
+ params.emulated_levels = 1;
params.is_layered = false;
return params;
}
@@ -139,6 +141,7 @@ SurfaceParams SurfaceParams::CreateForFramebuffer(Core::System& system, std::siz
params.depth = 1;
params.target = SurfaceTarget::Texture2D;
params.num_levels = 1;
+ params.emulated_levels = 1;
params.is_layered = false;
return params;
}
@@ -163,6 +166,7 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface(
params.target = SurfaceTarget::Texture2D;
params.depth = 1;
params.num_levels = 1;
+ params.emulated_levels = 1;
params.is_layered = params.IsLayered();
return params;
}