-
Notifications
You must be signed in to change notification settings - Fork 344
Closed
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specification
Milestone
Description
In previous discussion about immediate data, there is a left homework to investigate "push constant range" is unified range or seperated ranges between shader stages.
Here are some findings:
| Backends | Is Unified | Note |
|---|---|---|
| Vulkan | True | According to this validation rule for vkCmdPushConstants, the push constant range is unified |
| D3D12 | True | APIs that update RootConstants don't have shader stage parameter |
| Metal | False | SetVertexBytes()::index : An integer that represents the entry in the fragment shader argument table for buffers that stores a record of the MTLBuffer the method creates from bytes.SetFragmentBytes()::index: An integer that represents the entry in the fragment shader argument table for buffers that stores a record of the MTLBuffer the method creates from bytes. SetBytes()::index: The index the data binds to in the argument table. |
According to above result, I tend to not support per-stage immediate data range. Vulkan and D3D12 use unified "immediate data range". Metal supports per-stage "immediate data range" but doesn't have space limitation (Metal doc suggests "Smaller than 4kB"). And Metal could easily support unified "immediate data range" in implementation by calling setXXBytes multiple times for all stages.
Kangz, mwyrzykowski, kdashg and teoxoy
Metadata
Metadata
Assignees
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specification