From acedbf0af0ae083a863bd3d95ee8350a6aaa093b Mon Sep 17 00:00:00 2001 From: pourtheworld <1052019421@qq.com> Date: Sun, 11 Dec 2022 00:49:12 +0800 Subject: [PATCH] renderer_d3d11 fix compute shader input image cubemap format transformation (#2983) --- src/renderer_d3d11.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index ebfb07902..b15f0a128 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -3255,22 +3255,10 @@ namespace bgfx { namespace d3d11 break; case TextureD3D11::TextureCube: - if (_compute) - { - desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2DARRAY; - desc.Texture2DArray.MostDetailedMip = _mip; - desc.Texture2DArray.MipLevels = 1; - desc.Texture2DArray.FirstArraySlice = 0; - desc.Texture2DArray.ArraySize = 6; - } - else - { - desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; - desc.TextureCube.MostDetailedMip = _mip; - desc.TextureCube.MipLevels = 1; - } + desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURECUBE; + desc.TextureCube.MostDetailedMip = _mip; + desc.TextureCube.MipLevels = 1; break; - case TextureD3D11::Texture3D: desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE3D; desc.Texture3D.MostDetailedMip = _mip;