diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-05-11 06:17:47 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:36:12 +0200 |
commit | 41b4674458595d3d5cd938c06ce651b6d80d305c (patch) | |
tree | b647258e16830af3a22d6be6e5d4e10d54dae781 /src/video_core/renderer_opengl/gl_texture_cache.h | |
parent | texture_cache: Add ASync Protections (diff) | |
download | yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.tar yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.tar.gz yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.tar.bz2 yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.tar.lz yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.tar.xz yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.tar.zst yuzu-41b4674458595d3d5cd938c06ce651b6d80d305c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 0a1b57014..0ba42dbab 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -51,6 +51,7 @@ protected: void DecorateSurfaceName(); View CreateView(const ViewParams& view_key) override; + View CreateViewInner(const ViewParams& view_key, const bool is_proxy); private: void UploadTextureMipmap(u32 level, std::vector<u8>& staging_buffer); @@ -67,13 +68,17 @@ private: class CachedSurfaceView final : public VideoCommon::ViewBase { public: - explicit CachedSurfaceView(CachedSurface& surface, const ViewParams& params); + explicit CachedSurfaceView(CachedSurface& surface, const ViewParams& params, + const bool is_proxy); ~CachedSurfaceView(); /// Attaches this texture view to the current bound GL_DRAW_FRAMEBUFFER void Attach(GLenum attachment) const; GLuint GetTexture() { + if (is_proxy) { + return surface.GetTexture(); + } return texture_view.handle; } @@ -119,6 +124,7 @@ private: OGLTextureView texture_view; u32 swizzle; + bool is_proxy; }; class TextureCacheOpenGL final : public TextureCacheBase { |