aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache/surface_params.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-05-24 15:34:31 -0400
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-20 21:38:33 -0300
commit12649d1daf24ccd4a5dd3821ff083e62f28887ab (patch)
tree36ece73b658929c2878bdc1c7f4592fed8c595da /src/video_core/texture_cache/surface_params.cpp
parentae0dbf5c737751b75bdcbc3704b4c6cd7769614d (diff)
texture_cache uncompress-compress is untopological.
This makes conflicts between non compress and compress textures to be auto recycled. It also limits the amount of mipmaps a texture can have if it goes above it's limit.
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 d9d157d023..77c09264a4 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;
}