From ba5ee56b8e5ad7db3ad381a80dc55d20ea0403bb Mon Sep 17 00:00:00 2001 From: Eidolon Date: Thu, 23 Mar 2023 13:30:17 -0500 Subject: [PATCH] Rename RHI update_buffer_contents to update_buffer Consistency with update_texture --- src/hwr2/pass_blit_rect.cpp | 4 ++-- src/hwr2/pass_imgui.cpp | 4 ++-- src/hwr2/pass_postprocess.cpp | 4 ++-- src/hwr2/pass_twodee.cpp | 4 ++-- src/rhi/gl3_core/gl3_core_rhi.cpp | 2 +- src/rhi/gl3_core/gl3_core_rhi.hpp | 2 +- src/rhi/rhi.hpp | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/hwr2/pass_blit_rect.cpp b/src/hwr2/pass_blit_rect.cpp index 74726cf7d..5ff82b7f7 100644 --- a/src/hwr2/pass_blit_rect.cpp +++ b/src/hwr2/pass_blit_rect.cpp @@ -123,13 +123,13 @@ void BlitRectPass::transfer(Rhi& rhi, Handle ctx) { if (quad_vbo_needs_upload_ && quad_vbo_) { - rhi.update_buffer_contents(ctx, quad_vbo_, 0, tcb::as_bytes(tcb::span(kVerts))); + rhi.update_buffer(ctx, quad_vbo_, 0, tcb::as_bytes(tcb::span(kVerts))); quad_vbo_needs_upload_ = false; } if (quad_ibo_needs_upload_ && quad_ibo_) { - rhi.update_buffer_contents(ctx, quad_ibo_, 0, tcb::as_bytes(tcb::span(kIndices))); + rhi.update_buffer(ctx, quad_ibo_, 0, tcb::as_bytes(tcb::span(kIndices))); quad_ibo_needs_upload_ = false; } diff --git a/src/hwr2/pass_imgui.cpp b/src/hwr2/pass_imgui.cpp index e644e3c09..afa62a882 100644 --- a/src/hwr2/pass_imgui.cpp +++ b/src/hwr2/pass_imgui.cpp @@ -156,10 +156,10 @@ void ImguiPass::transfer(Rhi& rhi, Handle ctx) } tcb::span vert_span = tcb::span(im_list->VtxBuffer.Data, im_list->VtxBuffer.size()); - rhi.update_buffer_contents(ctx, vbo, 0, tcb::as_bytes(vert_span)); + rhi.update_buffer(ctx, vbo, 0, tcb::as_bytes(vert_span)); tcb::span index_span = tcb::span(im_list->IdxBuffer.Data, im_list->IdxBuffer.size()); - rhi.update_buffer_contents(ctx, ibo, 0, tcb::as_bytes(index_span)); + rhi.update_buffer(ctx, ibo, 0, tcb::as_bytes(index_span)); // Uniform sets std::array g1_uniforms = { diff --git a/src/hwr2/pass_postprocess.cpp b/src/hwr2/pass_postprocess.cpp index e119ebbb1..e75ff2243 100644 --- a/src/hwr2/pass_postprocess.cpp +++ b/src/hwr2/pass_postprocess.cpp @@ -175,13 +175,13 @@ void PostprocessWipePass::transfer(Rhi& rhi, Handle ctx) if (upload_vbo_) { - rhi.update_buffer_contents(ctx, vbo_, 0, tcb::as_bytes(tcb::span(kPostprocessVerts))); + rhi.update_buffer(ctx, vbo_, 0, tcb::as_bytes(tcb::span(kPostprocessVerts))); upload_vbo_ = false; } if (upload_ibo_) { - rhi.update_buffer_contents(ctx, ibo_, 0, tcb::as_bytes(tcb::span(kPostprocessIndices))); + rhi.update_buffer(ctx, ibo_, 0, tcb::as_bytes(tcb::span(kPostprocessIndices))); upload_ibo_ = false; } diff --git a/src/hwr2/pass_twodee.cpp b/src/hwr2/pass_twodee.cpp index 6fd9b521e..02a3cac30 100644 --- a/src/hwr2/pass_twodee.cpp +++ b/src/hwr2/pass_twodee.cpp @@ -832,8 +832,8 @@ void TwodeePass::transfer(Rhi& rhi, Handle ctx) tcb::span vertex_data = tcb::as_bytes(tcb::span(orig_list.vertices)); tcb::span index_data = tcb::as_bytes(tcb::span(orig_list.indices)); - rhi.update_buffer_contents(ctx, merged_list.vbo, 0, vertex_data); - rhi.update_buffer_contents(ctx, merged_list.ibo, 0, index_data); + rhi.update_buffer(ctx, merged_list.vbo, 0, vertex_data); + rhi.update_buffer(ctx, merged_list.ibo, 0, index_data); // Update the binding sets for each individual merged command VertexAttributeBufferBinding vbos[] = {{0, merged_list.vbo}}; diff --git a/src/rhi/gl3_core/gl3_core_rhi.cpp b/src/rhi/gl3_core/gl3_core_rhi.cpp index f5226e862..17c7db784 100644 --- a/src/rhi/gl3_core/gl3_core_rhi.cpp +++ b/src/rhi/gl3_core/gl3_core_rhi.cpp @@ -647,7 +647,7 @@ void GlCoreRhi::destroy_buffer(rhi::Handle handle) disposal_.push_back([this, name] { gl_->DeleteBuffers(1, &name); }); } -void GlCoreRhi::update_buffer_contents( +void GlCoreRhi::update_buffer( rhi::Handle ctx, rhi::Handle handle, uint32_t offset, diff --git a/src/rhi/gl3_core/gl3_core_rhi.hpp b/src/rhi/gl3_core/gl3_core_rhi.hpp index 548045463..200fa1456 100644 --- a/src/rhi/gl3_core/gl3_core_rhi.hpp +++ b/src/rhi/gl3_core/gl3_core_rhi.hpp @@ -192,7 +192,7 @@ public: virtual Handle begin_transfer() override; virtual void end_transfer(Handle handle) override; - virtual void update_buffer_contents( + virtual void update_buffer( Handle ctx, Handle buffer, uint32_t offset, diff --git a/src/rhi/rhi.hpp b/src/rhi/rhi.hpp index 7b8d18065..a23fe5a72 100644 --- a/src/rhi/rhi.hpp +++ b/src/rhi/rhi.hpp @@ -525,7 +525,7 @@ struct Rhi virtual void end_transfer(Handle handle) = 0; // Transfer Context functions - virtual void update_buffer_contents( + virtual void update_buffer( Handle ctx, Handle buffer, uint32_t offset,