summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-05-12 23:31:03 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:36:12 +0200
commitc2ed348bddc1cd1bd97ce789d7855b1571e45ef4 (patch)
tree2cea9018ea39fe3b4c32e2aec95a3d45617211a8
parentgl_framebuffer_cache: Use a hashed struct to cache framebuffers (diff)
downloadyuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.tar
yuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.tar.gz
yuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.tar.bz2
yuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.tar.lz
yuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.tar.xz
yuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.tar.zst
yuzu-c2ed348bddc1cd1bd97ce789d7855b1571e45ef4.zip
-rw-r--r--src/video_core/texture_cache/surface_params.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 6f39f8468..8472b69dc 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -111,6 +111,7 @@ SurfaceParams SurfaceParams::CreateForDepthBuffer(
params.unaligned_height = zeta_height;
params.target = SurfaceTarget::Texture2D;
params.depth = 1;
+ params.pitch = 0;
params.num_levels = 1;
params.is_layered = false;
return params;
@@ -131,6 +132,7 @@ SurfaceParams SurfaceParams::CreateForFramebuffer(Core::System& system, std::siz
params.component_type = ComponentTypeFromRenderTarget(config.format);
params.type = GetFormatType(params.pixel_format);
if (params.is_tiled) {
+ params.pitch = 0;
params.width = config.width;
} else {
const u32 bpp = GetFormatBpp(params.pixel_format) / CHAR_BIT;