Reduce duplicate GPU buffer uploads (#3577)

Co-authored-by: “Malcolm <“mtoon@atlasprogramming.com”>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
AtlasProgramming
2025-06-25 16:09:11 -04:00
committed by GitHub
parent 753b7ae795
commit 779b893468
4 changed files with 24 additions and 3 deletions

View File

@@ -41,6 +41,9 @@ public:
/// Set the sampler for a texture binding
void setFragmentSamplerState(const MTLSamplerStatePtr&, int32_t location);
/// Set the render pipeline state
void setRenderPipelineState(const MTLRenderPipelineStatePtr&);
void endEncoding();
/// Resets the states and bindings of the render pass to deal
@@ -69,6 +72,8 @@ private:
mtl::CommandEncoder& commandEncoder;
MTLRenderCommandEncoderPtr encoder;
MTLDepthStencilStatePtr currentDepthStencilState;
MTLRenderPipelineStatePtr currentPipelineState;
int32_t currentStencilReferenceValue = 0;
std::vector<gfx::DebugGroup<gfx::RenderPass>> debugGroups;