rhi: d3d: Fix 3D textures exposed via UAV
The docs for D3D11_TEX3D_UAV do not mention accepting -1 as WSize, unlike D3D12_TEX3D_UAV. Hence passing in m_depth for D3D11. Fixes: QTBUG-129300 Pick-to: 6.8 Change-Id: I517d23e076039543361d2bca1b91cddd47abcfaa Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> (cherry picked from commit 6f89357f59b507c0dcdc177bc1ecfbbc94d6fed3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
d561d864eb
commit
e71708a6e5
@ -3651,6 +3651,7 @@ ID3D11UnorderedAccessView *QD3D11Texture::unorderedAccessViewForLevel(int level)
|
||||
} else if (is3D) {
|
||||
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
|
||||
desc.Texture3D.MipSlice = UINT(level);
|
||||
desc.Texture3D.WSize = UINT(m_depth);
|
||||
} else {
|
||||
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2D;
|
||||
desc.Texture2D.MipSlice = UINT(level);
|
||||
|
@ -1061,6 +1061,7 @@ void QD3D12CommandBuffer::visitStorageImage(QD3D12Stage s,
|
||||
} else if (is3D) {
|
||||
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE3D;
|
||||
uavDesc.Texture3D.MipSlice = UINT(d.level);
|
||||
uavDesc.Texture3D.WSize = UINT(-1);
|
||||
} else {
|
||||
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D;
|
||||
uavDesc.Texture2D.MipSlice = UINT(d.level);
|
||||
|
Loading…
x
Reference in New Issue
Block a user