From b2c4521a9102db22ed1ef950cb7b31b856caa5ab Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 26 May 2020 17:36:23 -0300 Subject: [PATCH] texture_cache: Fix layered null surfaces Null texture cubes were not considered arrays, causing issues on Vulkan and OpenGL when creating views. --- src/video_core/texture_cache/texture_cache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index d6efc34b2..8bfc541d4 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -991,7 +991,9 @@ private: params.target = target; params.is_tiled = false; params.srgb_conversion = false; - params.is_layered = false; + params.is_layered = + target == SurfaceTarget::Texture1DArray || target == SurfaceTarget::Texture2DArray || + target == SurfaceTarget::TextureCubemap || target == SurfaceTarget::TextureCubeArray; params.block_width = 0; params.block_height = 0; params.block_depth = 0;