From b9c75a25267c095f3110b72f6852b61bfdc88185 Mon Sep 17 00:00:00 2001 From: tntube Date: Thu, 27 Nov 2025 10:39:13 -0300 Subject: [PATCH] MiniEngine: Fix CopyBufferRegion inconsistent call in ModelInstance::Upate --- MiniEngine/Model/Model.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MiniEngine/Model/Model.cpp b/MiniEngine/Model/Model.cpp index fae1aa674..ab737dca6 100644 --- a/MiniEngine/Model/Model.cpp +++ b/MiniEngine/Model/Model.cpp @@ -241,8 +241,7 @@ void ModelInstance::Update(GraphicsContext& gfxContext, float deltaTime) m_MeshConstantsCPU.Unmap(); - gfxContext.TransitionResource(m_MeshConstantsGPU, D3D12_RESOURCE_STATE_COPY_DEST, true); - gfxContext.GetCommandList()->CopyBufferRegion(m_MeshConstantsGPU.GetResource(), 0, m_MeshConstantsCPU.GetResource(), 0, m_MeshConstantsCPU.GetBufferSize()); + gfxContext.CopyBufferRegion(m_MeshConstantsGPU, 0, m_MeshConstantsCPU, 0, m_MeshConstantsCPU.GetBufferSize()); gfxContext.TransitionResource(m_MeshConstantsGPU, D3D12_RESOURCE_STATE_GENERIC_READ); }