diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-20 01:47:48 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-24 07:36:14 +0200 |
commit | 32a2dcd4153f4e2aea7b5f88c85d8a352f647f12 (patch) | |
tree | 3422389a0dcf71fe8df676bc00222a77ac963825 /src/video_core/renderer_opengl/gl_buffer_cache.h | |
parent | gl_stream_buffer: Use InvalidateBufferData instead unmap and map (diff) | |
download | yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.tar yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.tar.gz yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.tar.bz2 yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.tar.lz yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.tar.xz yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.tar.zst yuzu-32a2dcd4153f4e2aea7b5f88c85d8a352f647f12.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 | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index 6462cfae5..59d95adbc 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -28,6 +28,13 @@ public: explicit Buffer(const Device& device, VAddr cpu_addr, std::size_t size); ~Buffer(); + void Upload(std::size_t offset, std::size_t size, const u8* data) const; + + void Download(std::size_t offset, std::size_t size, u8* data) const; + + void CopyFrom(const Buffer& src, std::size_t src_offset, std::size_t dst_offset, + std::size_t size) const; + GLuint Handle() const noexcept { return gl_buffer.handle; } @@ -57,15 +64,6 @@ public: protected: 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; - - void DownloadBlockData(const Buffer& buffer, std::size_t offset, std::size_t size, - u8* data) override; - - void CopyBlock(const Buffer& src, const Buffer& dst, std::size_t src_offset, - std::size_t dst_offset, std::size_t size) override; - BufferInfo ConstBufferUpload(const void* raw_pointer, std::size_t size) override; private: |