From 1a94d2eb1ceea7ca10dc211f3aa63188d3d6ddc9 Mon Sep 17 00:00:00 2001 From: Hugo Amnov Date: Sun, 15 Apr 2018 01:47:24 +0200 Subject: [PATCH] Fix blit to 2D texture layer on D3D11 (#1371) --- src/renderer_d3d11.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 68a5c4c5b..c9e0879f5 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -5397,14 +5397,8 @@ namespace bgfx { namespace d3d11 box.bottom = blit.m_srcY + height; box.back = 1; - const uint32_t srcZ = TextureD3D11::TextureCube == src.m_type - ? blit.m_srcZ - : 0 - ; - const uint32_t dstZ = TextureD3D11::TextureCube == dst.m_type - ? blit.m_dstZ - : 0 - ; + const uint32_t srcZ = blit.m_srcZ; + const uint32_t dstZ = blit.m_dstZ; deviceCtx->CopySubresourceRegion(dst.m_ptr , dstZ*dst.m_numMips+blit.m_dstMip