From 64a32ecdf5d71a6059c82229a9c31ee5f2903bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 3 Mar 2015 15:16:17 -0800 Subject: [PATCH] D3D11: Fixed crash with RenderDoc. --- src/renderer_d3d11.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 42899053..81831b51 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -2392,6 +2392,14 @@ namespace bgfx ID3D11Buffer* ptr; DX_CHECK(device->CreateBuffer(&desc, &srd, &ptr) ); + D3D11_BOX box; + box.left = 0; + box.top = 0; + box.front = 0; + box.right = _size; + box.bottom = 1; + box.back = 1; + deviceCtx->CopySubresourceRegion(m_ptr , 0 , _offset @@ -2399,7 +2407,7 @@ namespace bgfx , 0 , ptr , 0 - , NULL + , &box ); DX_RELEASE(ptr, 0);