diff options
author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2020-06-16 03:29:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 03:29:32 +0200 |
commit | 0bd9bc7201568f1c1f6f0a0c425cff6229ffc597 (patch) | |
tree | 7a398409a2e8a03a4bf5246ac5bda06a6d7ef823 /src/video_core/renderer_opengl/gl_buffer_cache.h | |
parent | Merge pull request #4085 from ReinUsesLisp/gcc-times (diff) | |
parent | buffer_cache: Avoid passing references of shared pointers and misc style changes (diff) | |
download | yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.tar yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.tar.gz yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.tar.bz2 yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.tar.lz yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.tar.xz yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.tar.zst yuzu-0bd9bc7201568f1c1f6f0a0c425cff6229ffc597.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_buffer_cache.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_buffer_cache.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index 679b9b1d7..a49aaf9c4 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -23,17 +23,12 @@ class Device; class OGLStreamBuffer; class RasterizerOpenGL; -class CachedBufferBlock; - -using Buffer = std::shared_ptr<CachedBufferBlock>; -using GenericBufferCache = VideoCommon::BufferCache<Buffer, GLuint, OGLStreamBuffer>; - -class CachedBufferBlock : public VideoCommon::BufferBlock { +class Buffer : public VideoCommon::BufferBlock { public: - explicit CachedBufferBlock(VAddr cpu_addr, const std::size_t size); - ~CachedBufferBlock(); + explicit Buffer(VAddr cpu_addr, const std::size_t size); + ~Buffer(); - GLuint GetHandle() const { + GLuint Handle() const { return gl_buffer.handle; } @@ -41,6 +36,7 @@ private: OGLBuffer gl_buffer; }; +using GenericBufferCache = VideoCommon::BufferCache<Buffer, GLuint, OGLStreamBuffer>; class OGLBufferCache final : public GenericBufferCache { public: explicit OGLBufferCache(RasterizerOpenGL& rasterizer, Core::System& system, @@ -54,9 +50,7 @@ public: } protected: - Buffer CreateBlock(VAddr cpu_addr, std::size_t size) override; - - GLuint ToHandle(const Buffer& buffer) override; + std::shared_ptr<Buffer> CreateBlock(VAddr cpu_addr, std::size_t size) override; void UploadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size, const u8* data) override; |