Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Rename WGPUProgrammableStageDescriptor -> WGPUComputeStage #413

Merged

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Nov 14, 2024

In JS, WGPUProgrammableStage (no Descriptor, it was renamed) is the base dictionary for vertex/fragment/compute. But in C we don't use it for that, we only use it for compute because compute doesn't add any other members. So we should name it accordingly. Since the JS type is WGPUProgrammableStage, I've called it WGPUComputeStage.

Both WGPUComputePipelineDescriptor and WGPUComputeStage are still both extensible, which makes reasonable sense and matches WGPURenderPipelineDescriptor/WGPUVertexState/WGPUFragmentState.

(Note naming: State vs Stage. This could be WGPUComputeState but that didn't make as much sense to me. Not sure if it's better for it to match.)

Fixes #409
(dawn bug https://crbug.com/379059434)

In JS, `WGPUProgrammableStage` (no `Descriptor`, it was renamed) is the
base dictionary for vertex/fragment/compute. But in C we don't use it
for that, we only use it for compute because compute doesn't add any
other members. So we should name it accordingly. Since the JS type is
`WGPUProgrammableStage`, I've called it `WGPUComputeStage`.

Both `WGPUComputePipelineDescriptor` and `WGPUComputeStage` are still
both extensible, which makes reasonable sense and matches
`WGPURenderPipelineDescriptor`/`WGPUVertexState`/`WGPUFragmentState`.

Fixes 409
@kainino0x kainino0x requested a review from Kangz November 14, 2024 03:35
@Kangz Kangz merged commit d831ac5 into webgpu-native:main Nov 14, 2024
5 checks passed
@kainino0x kainino0x deleted the rename-programmablestagedescriptor branch November 14, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WGPUProgrammableStageDescriptor is actually for compute only
2 participants