From 3c9ddb67b10554147aae0d2e9675fcc3b161eb0d Mon Sep 17 00:00:00 2001 From: Laura Hermanns Date: Mon, 15 Jul 2024 21:45:48 -0400 Subject: [PATCH] [D3D11] Also reset cbuffer pool when SetConstants() is used in CopyBufferFromTexture/CopyTextureFromBuffer. --- .../Renderer/Direct3D11/Command/D3D11PrimaryCommandBuffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sources/Renderer/Direct3D11/Command/D3D11PrimaryCommandBuffer.cpp b/sources/Renderer/Direct3D11/Command/D3D11PrimaryCommandBuffer.cpp index 4617fef00a..5fadbb95b3 100644 --- a/sources/Renderer/Direct3D11/Command/D3D11PrimaryCommandBuffer.cpp +++ b/sources/Renderer/Direct3D11/Command/D3D11PrimaryCommandBuffer.cpp @@ -380,6 +380,8 @@ void D3D11PrimaryCommandBuffer::CopyBufferFromTexture( const D3D11_BOX srcBox{ 0, 0, 0, copySize, 1, 1 }; GetNative()->CopySubresourceRegion(dstBufferD3D.GetNative(), 0, dstOffsetU32, 0, 0, intermediateBuffer.Get(), 0, &srcBox); } + + GetStateManager().ResetCbufferPool(); } void D3D11PrimaryCommandBuffer::FillBuffer( @@ -658,6 +660,8 @@ void D3D11PrimaryCommandBuffer::CopyTextureFromBuffer( ); } } + + GetStateManager().ResetCbufferPool(); } void D3D11PrimaryCommandBuffer::CopyTextureFromFramebuffer(