diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-05-28 01:11:46 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-07-06 05:37:55 +0200 |
commit | f8ba72d4912fb472f97bc8d5b80f3363e6f714cc (patch) | |
tree | a871633dc4e3d35a2a4a123540972d0bd7b34e51 /src/video_core/renderer_opengl/gl_buffer_cache.h | |
parent | gl_buffer_cache: Return used buffer from Upload function (diff) | |
download | yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.tar yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.tar.gz yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.tar.bz2 yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.tar.lz yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.tar.xz yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.tar.zst yuzu-f8ba72d4912fb472f97bc8d5b80f3363e6f714cc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_buffer_cache.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index 544f3b010..4a055035a 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -20,8 +20,8 @@ class RasterizerOpenGL; class CachedBufferEntry final : public RasterizerCacheObject { public: - explicit CachedBufferEntry(VAddr cpu_addr, std::size_t size, GLintptr offset, - std::size_t alignment, u8* host_ptr); + explicit CachedBufferEntry(VAddr cpu_addr, u8* host_ptr, std::size_t size, + std::size_t alignment, GLuint buffer, GLintptr offset); VAddr GetCpuAddr() const override { return cpu_addr; @@ -35,19 +35,25 @@ public: return size; } - GLintptr GetOffset() const { - return offset; - } - std::size_t GetAlignment() const { return alignment; } + GLuint GetBuffer() const { + return buffer; + } + + GLintptr GetOffset() const { + return offset; + } + private: VAddr cpu_addr{}; std::size_t size{}; - GLintptr offset{}; std::size_t alignment{}; + + GLuint buffer{}; + GLintptr offset{}; }; class OGLBufferCache final : public RasterizerCache<std::shared_ptr<CachedBufferEntry>> { |