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 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> (cherry picked from commit e71708a6e5e0d9f95682551ca5c4650bd6fa6e74)
This commit is contained in:
parent
fc16215e0a
commit
f03c3055e6
@ -3598,6 +3598,7 @@ ID3D11UnorderedAccessView *QD3D11Texture::unorderedAccessViewForLevel(int level)
|
|||||||
} else if (is3D) {
|
} else if (is3D) {
|
||||||
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
|
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE3D;
|
||||||
desc.Texture3D.MipSlice = UINT(level);
|
desc.Texture3D.MipSlice = UINT(level);
|
||||||
|
desc.Texture3D.WSize = UINT(m_depth);
|
||||||
} else {
|
} else {
|
||||||
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2D;
|
desc.ViewDimension = D3D11_UAV_DIMENSION_TEXTURE2D;
|
||||||
desc.Texture2D.MipSlice = UINT(level);
|
desc.Texture2D.MipSlice = UINT(level);
|
||||||
|
@ -990,6 +990,7 @@ void QD3D12CommandBuffer::visitStorageImage(QD3D12Stage s,
|
|||||||
} else if (is3D) {
|
} else if (is3D) {
|
||||||
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE3D;
|
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE3D;
|
||||||
uavDesc.Texture3D.MipSlice = UINT(d.level);
|
uavDesc.Texture3D.MipSlice = UINT(d.level);
|
||||||
|
uavDesc.Texture3D.WSize = UINT(-1);
|
||||||
} else {
|
} else {
|
||||||
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D;
|
uavDesc.ViewDimension = D3D12_UAV_DIMENSION_TEXTURE2D;
|
||||||
uavDesc.Texture2D.MipSlice = UINT(d.level);
|
uavDesc.Texture2D.MipSlice = UINT(d.level);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user