diff options
| author | ccummingsNV <ccummings@nvidia.com> | 2024-10-21 14:32:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-21 14:32:57 +0100 |
| commit | 3b8efefb184691acf2a1786810bb67cf0ff9d764 (patch) | |
| tree | 4eaccbf4701443331c507c48d5604939f4721c08 /tools | |
| parent | 6f9c6087ed905bcdf6f923887017559b26eff2e8 (diff) | |
Fix incorrect setting of array information for 1d texture arrays in D3D12 (#5361)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gfx/d3d12/d3d12-device.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp index 6be37b079..271e9f1b0 100644 --- a/tools/gfx/d3d12/d3d12-device.cpp +++ b/tools/gfx/d3d12/d3d12-device.cpp @@ -1523,16 +1523,16 @@ Result DeviceImpl::createTextureView( : D3D12_UAV_DIMENSION_TEXTURE1D; if(isArray) { - d3d12desc.Texture1D.MipSlice = desc.subresourceRange.mipLevel; - } - else - { d3d12desc.Texture1DArray.MipSlice = desc.subresourceRange.mipLevel; d3d12desc.Texture1DArray.ArraySize = desc.subresourceRange.layerCount == 0 ? resourceDesc.arraySize : desc.subresourceRange.layerCount; d3d12desc.Texture1DArray.FirstArraySlice = desc.subresourceRange.baseArrayLayer; } + else + { + d3d12desc.Texture1D.MipSlice = desc.subresourceRange.mipLevel; + } break; case IResource::Type::Texture2D: d3d12desc.ViewDimension = isArray |
