From f58a6152fc89626e4a8f1746af46e9260d17d404 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 29 Jan 2019 20:33:56 -0300 Subject: gl_shader_cache: Fix texture view for cubemaps as cubemap arrays Cubemaps are considered layered and to create a texture view the texture mustn't be a layered texture, resulting in cubemaps being bound as cubemap arrays. To fix this issue this commit introduces an extra surface parameter called "is_array" and uses this to query for texture view creation. Now that texture views for cubemaps are actually being created, this also fixes the number of layers created for the texture view (since they have to be 6 to create a texture view of cubemaps). --- src/video_core/surface.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video_core/surface.h') diff --git a/src/video_core/surface.h b/src/video_core/surface.h index c2259c3c2..edd3816ba 100644 --- a/src/video_core/surface.h +++ b/src/video_core/surface.h @@ -441,6 +441,8 @@ SurfaceTarget SurfaceTargetFromTextureType(Tegra::Texture::TextureType texture_t bool SurfaceTargetIsLayered(SurfaceTarget target); +bool SurfaceTargetIsArray(SurfaceTarget target); + PixelFormat PixelFormatFromDepthFormat(Tegra::DepthFormat format); PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format); -- cgit v1.2.3