summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_buffer_cache.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-06-15 00:03:11 +0200
committerGitHub <noreply@github.com>2023-06-15 00:03:11 +0200
commit702a2ac63164b5af2305113205c3deba327fb4e9 (patch)
tree386fb267fe068ffa5a6d29e25a630a9fa49dabdb /src/video_core/renderer_opengl/gl_buffer_cache.cpp
parentMerge pull request #10726 from t895/emulation-nav-component (diff)
parentbuffer_cache_base: Specify buffer type in HostBindings (diff)
downloadyuzu-702a2ac63164b5af2305113205c3deba327fb4e9.tar
yuzu-702a2ac63164b5af2305113205c3deba327fb4e9.tar.gz
yuzu-702a2ac63164b5af2305113205c3deba327fb4e9.tar.bz2
yuzu-702a2ac63164b5af2305113205c3deba327fb4e9.tar.lz
yuzu-702a2ac63164b5af2305113205c3deba327fb4e9.tar.xz
yuzu-702a2ac63164b5af2305113205c3deba327fb4e9.tar.zst
yuzu-702a2ac63164b5af2305113205c3deba327fb4e9.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_buffer_cache.cpp')
-rw-r--r--src/video_core/renderer_opengl/gl_buffer_cache.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.cpp b/src/video_core/renderer_opengl/gl_buffer_cache.cpp
index 0cc546a3a..38d553d3c 100644
--- a/src/video_core/renderer_opengl/gl_buffer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_buffer_cache.cpp
@@ -232,12 +232,12 @@ void BufferCacheRuntime::BindVertexBuffer(u32 index, Buffer& buffer, u32 offset,
}
}
-void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings& bindings) {
- for (u32 index = 0; index < bindings.buffers.size(); index++) {
- BindVertexBuffer(
- bindings.min_index + index, *reinterpret_cast<Buffer*>(bindings.buffers[index]),
- static_cast<u32>(bindings.offsets[index]), static_cast<u32>(bindings.sizes[index]),
- static_cast<u32>(bindings.strides[index]));
+void BufferCacheRuntime::BindVertexBuffers(VideoCommon::HostBindings<Buffer>& bindings) {
+ for (u32 index = 0; index < bindings.buffers.size(); ++index) {
+ BindVertexBuffer(bindings.min_index + index, *bindings.buffers[index],
+ static_cast<u32>(bindings.offsets[index]),
+ static_cast<u32>(bindings.sizes[index]),
+ static_cast<u32>(bindings.strides[index]));
}
}
@@ -329,10 +329,9 @@ void BufferCacheRuntime::BindTransformFeedbackBuffer(u32 index, Buffer& buffer,
static_cast<GLintptr>(offset), static_cast<GLsizeiptr>(size));
}
-void BufferCacheRuntime::BindTransformFeedbackBuffers(VideoCommon::HostBindings& bindings) {
- for (u32 index = 0; index < bindings.buffers.size(); index++) {
- glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, index,
- reinterpret_cast<Buffer*>(bindings.buffers[index])->Handle(),
+void BufferCacheRuntime::BindTransformFeedbackBuffers(VideoCommon::HostBindings<Buffer>& bindings) {
+ for (u32 index = 0; index < bindings.buffers.size(); ++index) {
+ glBindBufferRange(GL_TRANSFORM_FEEDBACK_BUFFER, index, bindings.buffers[index]->Handle(),
static_cast<GLintptr>(bindings.offsets[index]),
static_cast<GLsizeiptr>(bindings.sizes[index]));
}