diff options
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_buffer_cache.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h index f2347581b..544f3b010 100644 --- a/src/video_core/renderer_opengl/gl_buffer_cache.h +++ b/src/video_core/renderer_opengl/gl_buffer_cache.h @@ -7,6 +7,7 @@ #include <cstddef> #include <memory> #include <tuple> +#include <utility> #include "common/common_types.h" #include "video_core/rasterizer_cache.h" @@ -53,19 +54,18 @@ class OGLBufferCache final : public RasterizerCache<std::shared_ptr<CachedBuffer public: explicit OGLBufferCache(RasterizerOpenGL& rasterizer, std::size_t size); - /// Uploads data from a guest GPU address. Returns host's buffer offset where it's been - /// allocated. - GLintptr UploadMemory(GPUVAddr gpu_addr, std::size_t size, std::size_t alignment = 4, - bool cache = true); + /// Uploads data from a guest GPU address. Returns the OpenGL buffer where it's located and its + /// offset. + std::pair<GLuint, GLintptr> UploadMemory(GPUVAddr gpu_addr, std::size_t size, + std::size_t alignment = 4, bool cache = true); - /// Uploads from a host memory. Returns host's buffer offset where it's been allocated. - GLintptr UploadHostMemory(const void* raw_pointer, std::size_t size, std::size_t alignment = 4); + /// Uploads from a host memory. Returns the OpenGL buffer where it's located and its offset. + std::pair<GLuint, GLintptr> UploadHostMemory(const void* raw_pointer, std::size_t size, + std::size_t alignment = 4); bool Map(std::size_t max_size); void Unmap(); - GLuint GetHandle() const; - protected: void AlignBuffer(std::size_t alignment); |