Open 2A5F opened 10 months ago
It looks like we are passing the wrong parameters to D3D12_TEX3D_UAV
.
We should be passing FirstWSlice: 0
and WSize: -1
as there isn't currently a way to specify a specific depth slice in our API.
ref: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ns-d3d12-d3d12_tex3d_uav
@teoxoy: Does this have a relation to https://github.com/gfx-rs/wgpu/issues/4764?
They are related but this one is strictly for UAVs (storage textures) and https://github.com/gfx-rs/wgpu/issues/4764 is concerned with RTVs (render attachments).
I'm encountering this issue and was wondering if there's anything I can do to mitigate it in the meantime while a fix is still pending? Would switching to a texture 2D array be sufficient?
Using a texture 2D array should work.
Code
The texture is treated as 2d, causing only layer 0 to be written
Platform
Other
It is normal on vk
On Vulkan
![image](https://github.com/gfx-rs/wgpu/assets/13982338/6134cc0b-1034-4b4f-8ff0-04374bc3f452)It's normal to use 2d array
Use 2d array
```wgsl @group(0) @binding(0) var chunk: texture_storage_2d_array