summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2020-04-13 16:16:18 +0200
committerGitHub <noreply@github.com>2020-04-13 16:16:18 +0200
commit3351e1e94f6d72453f89b4aea419b523496fd73f (patch)
treeaa204c0f6ce52cd8b76e1da765a137df222dc35f /src/video_core
parentMerge pull request #3646 from ReinUsesLisp/fix-glsl-turing (diff)
parentgl_texture_cache: Attach view instead of base texture for layered attachments (diff)
downloadyuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.tar
yuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.tar.gz
yuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.tar.bz2
yuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.tar.lz
yuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.tar.xz
yuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.tar.zst
yuzu-3351e1e94f6d72453f89b4aea419b523496fd73f.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 36590a6d0..0b4d999d7 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -411,14 +411,13 @@ CachedSurfaceView::~CachedSurfaceView() = default;
void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const {
ASSERT(params.num_levels == 1);
- const GLuint texture = surface.GetTexture();
if (params.num_layers > 1) {
// Layered framebuffer attachments
UNIMPLEMENTED_IF(params.base_layer != 0);
switch (params.target) {
case SurfaceTarget::Texture2DArray:
- glFramebufferTexture(target, attachment, texture, params.base_level);
+ glFramebufferTexture(target, attachment, GetTexture(), params.base_level);
break;
default:
UNIMPLEMENTED();
@@ -427,6 +426,7 @@ void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const {
}
const GLenum view_target = surface.GetTarget();
+ const GLuint texture = surface.GetTexture();
switch (surface.GetSurfaceParams().target) {
case SurfaceTarget::Texture1D:
glFramebufferTexture1D(target, attachment, view_target, texture, params.base_level);