From aa35fd0cabe219135f5464e1020c052cc866db46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=A3=8E?= Date: Tue, 5 Dec 2017 12:44:11 +0800 Subject: [PATCH] fix warning in mingw gcc (#1286) --- src/renderer_d3d11.cpp | 2 +- src/renderer_d3d12.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 40bf354be..eb79ea87e 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -4623,7 +4623,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); deviceCtx->CopyResource(m_texture3d, *_gpuTexture3d); D3D11_MAPPED_SUBRESOURCE mappedResource; - deviceCtx->Map(m_texture3d, 0, D3D11_MAP_WRITE, NULL, &mappedResource); + deviceCtx->Map(m_texture3d, 0, D3D11_MAP_WRITE, 0, &mappedResource); m_descriptor = reinterpret_cast(mappedResource.pData); return m_descriptor->ptr; diff --git a/src/renderer_d3d12.cpp b/src/renderer_d3d12.cpp index f23b5abf8..c38eddc24 100644 --- a/src/renderer_d3d12.cpp +++ b/src/renderer_d3d12.cpp @@ -4966,8 +4966,8 @@ data.NumQualityLevels = 0; box.bottom = blit.m_srcY + height;; box.back = blit.m_srcZ + bx::uint32_imax(1, depth); - D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{}} }; - D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{}} }; + D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{0,{DXGI_FORMAT_UNKNOWN,0,0,0,0}}} }; + D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{0,{DXGI_FORMAT_UNKNOWN,0,0,0,0}}} }; m_commandList->CopyTextureRegion(&dstLocation , blit.m_dstX , blit.m_dstY