summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-04-09 03:20:25 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-04-09 03:20:25 +0200
commit6c8f9f40d71ad19a2f39ac466fd25a44e5a43696 (patch)
treea9713b0399d25d28dd56f5a3f81689fcf2e71f15 /src/video_core
parentMerge pull request #3624 from Kewlan/fix-sl-sr-position (diff)
downloadyuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.tar
yuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.tar.gz
yuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.tar.bz2
yuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.tar.lz
yuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.tar.xz
yuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.tar.zst
yuzu-6c8f9f40d71ad19a2f39ac466fd25a44e5a43696.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);