diff --git a/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp b/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp index 83d1afec86..97f44d8790 100644 --- a/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp +++ b/rpcs3/Emu/RSX/GL/glutils/buffer_object.cpp @@ -146,11 +146,13 @@ namespace gl void buffer::bind_range(u32 index, u32 offset, u32 size) const { + m_bound_range = { offset, size }; glBindBufferRange(static_cast(current_target()), index, id(), offset, size); } void buffer::bind_range(target target_, u32 index, u32 offset, u32 size) const { + m_bound_range = { offset, size }; glBindBufferRange(static_cast(target_), index, id(), offset, size); } diff --git a/rpcs3/Emu/RSX/GL/glutils/buffer_object.h b/rpcs3/Emu/RSX/GL/glutils/buffer_object.h index 65bf6106e4..75b0936325 100644 --- a/rpcs3/Emu/RSX/GL/glutils/buffer_object.h +++ b/rpcs3/Emu/RSX/GL/glutils/buffer_object.h @@ -74,6 +74,9 @@ namespace gl target m_target = target::array; memory_type m_memory_type = memory_type::undefined; + // Metadata + mutable std::pair m_bound_range{}; + void allocate(GLsizeiptr size, const void* data_, memory_type type, GLenum usage); public: @@ -109,6 +112,7 @@ namespace gl uint id() const { return m_id; } void set_id(uint id) { m_id = id; } bool created() const { return m_id != GL_NONE; } + std::pair bound_range() const { return m_bound_range; } explicit operator bool() const { return created(); } };