-
Notifications
You must be signed in to change notification settings - Fork 1.3k
WebGPU spec update: Enable 3D textures to be rendered #6040
Copy link
Copy link
Closed
Labels
area: correctnessWe're behaving incorrectlyWe're behaving incorrectly
Milestone
Description
Is your feature request related to a problem? Please describe.
Hi! The WebGPU spec (from ~Oct 2023) now allows for a GPUTexture with a 3D dimension attribute to contain the usage RENDER_ATTACHMENT, but the current wgpu implementation does not yet support this.
Describe the solution you'd like
To allow for a 3D texture to be rendered, the renderPassDescriptor needs to contain a new attribute in colorAttachment (https://www.w3.org/TR/webgpu/#dom-gpucommandencoder-beginrenderpass). It must come with a colorAttachment.depthSlice (and this must not be included in renderpasses for textures with other dimensions). This new attribute would also need to be implemented.
Additional context
- A couple of checks need to be updated in: wgpu-core/src/device/resource.rs in the function
create_texture(line 731 and line 922) - A new check would be needed to make sure that only 3D textures in renderpasses include
colorAttachment.depthSlice - A unit test has been suggested in Allow 3D textures to be renderable #6004 (thanks wumpf!) - I'm happy to help write this and additional unit tests but unfortunately the backend implementation to support 3D textures to be rendered is a bit out of my depth right now
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: correctnessWe're behaving incorrectlyWe're behaving incorrectly
Type
Projects
Status
Done