From 21dc8421714bf802634f2adb956c46cf761983a3 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Mon, 13 Apr 2020 18:24:54 -0300 Subject: [PATCH] gl_texture_cache: Fix layered texture attachment base level The base level is already included in the texture view. If we specify the base level in the texture again, this will end up in the incorrect level and potentially out of bounds. --- src/video_core/renderer_opengl/gl_texture_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 0b4d999d7..2729d1265 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -417,7 +417,7 @@ void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const { switch (params.target) { case SurfaceTarget::Texture2DArray: - glFramebufferTexture(target, attachment, GetTexture(), params.base_level); + glFramebufferTexture(target, attachment, GetTexture(), 0); break; default: UNIMPLEMENTED();