summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-12 15:32:26 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:34 +0200
commita56f687793a0a24a368f0dafd5333daf8cbacecf (patch)
tree8d932d2bc522f8aca134e35523bfd6dbf9ca3e29 /src
parenttexture_cache: eliminate accelerated depth->color/color->depth copies due to driver instability. (diff)
downloadyuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.gz
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.bz2
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.lz
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.xz
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.zst
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 60a7356bb..f789da2c4 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -74,10 +74,17 @@ SurfaceParams SurfaceParams::CreateForTexture(Core::System& system,
params.component_type = ComponentTypeFromTexture(config.tic.r_type.Value());
params.type = GetFormatType(params.pixel_format);
// TODO: on 1DBuffer we should use the tic info.
- params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray());
- params.width = config.tic.Width();
- params.height = config.tic.Height();
- params.depth = config.tic.Depth();
+ if (!config.tic.IsBuffer()) {
+ params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray());
+ params.width = config.tic.Width();
+ params.height = config.tic.Height();
+ params.depth = config.tic.Depth();
+ } else {
+ params.target = SurfaceTarget::TextureBuffer;
+ params.width = config.tic.Width();
+ params.height = 0;
+ params.depth = 0;
+ }
if (params.target == SurfaceTarget::TextureCubemap ||
params.target == SurfaceTarget::TextureCubeArray) {
params.depth *= 6;