summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2019-06-12 09:32:26 -0400
committerGravatar ReinUsesLisp2019-06-20 21:38:34 -0300
commita56f687793a0a24a368f0dafd5333daf8cbacecf (patch)
tree8d932d2bc522f8aca134e35523bfd6dbf9ca3e29 /src
parenttexture_cache: eliminate accelerated depth->color/color->depth copies due to ... (diff)
downloadyuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.gz
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.tar.xz
yuzu-a56f687793a0a24a368f0dafd5333daf8cbacecf.zip
texture_cache: correct texture buffer on surface params
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,
74 params.component_type = ComponentTypeFromTexture(config.tic.r_type.Value()); 74 params.component_type = ComponentTypeFromTexture(config.tic.r_type.Value());
75 params.type = GetFormatType(params.pixel_format); 75 params.type = GetFormatType(params.pixel_format);
76 // TODO: on 1DBuffer we should use the tic info. 76 // TODO: on 1DBuffer we should use the tic info.
77 params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray()); 77 if (!config.tic.IsBuffer()) {
78 params.width = config.tic.Width(); 78 params.target = TextureType2SurfaceTarget(entry.GetType(), entry.IsArray());
79 params.height = config.tic.Height(); 79 params.width = config.tic.Width();
80 params.depth = config.tic.Depth(); 80 params.height = config.tic.Height();
81 params.depth = config.tic.Depth();
82 } else {
83 params.target = SurfaceTarget::TextureBuffer;
84 params.width = config.tic.Width();
85 params.height = 0;
86 params.depth = 0;
87 }
81 if (params.target == SurfaceTarget::TextureCubemap || 88 if (params.target == SurfaceTarget::TextureCubemap ||
82 params.target == SurfaceTarget::TextureCubeArray) { 89 params.target == SurfaceTarget::TextureCubeArray) {
83 params.depth *= 6; 90 params.depth *= 6;