summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;