Skip to content

Implement wgpuDeviceCreateShaderModuleTrusted (fixes #396)#582

Merged
almarklein merged 5 commits into
gfx-rs:trunkfrom
lisyarus:implement-create-shader-module-trusted
Jun 1, 2026
Merged

Implement wgpuDeviceCreateShaderModuleTrusted (fixes #396)#582
almarklein merged 5 commits into
gfx-rs:trunkfrom
lisyarus:implement-create-shader-module-trusted

Conversation

@lisyarus
Copy link
Copy Markdown
Contributor

@lisyarus lisyarus commented Apr 16, 2026

Checklist

  • cargo clippy reports no issues
  • cargo doc reports no issues
  • cargo deny issues have been fixed or added to deny.toml
  • Human-readable change descriptions added to CHANGELOG.md under the "Unreleased" heading.
    • If the change does not affect the user (or is a process change), preface the change with "Internal:"
    • Add credit to yourself for each change: Added new functionality. @githubname

Description

Implemented wgpuDeviceCreateShaderModuleTrusted. It only differs from wgpuDeviceCreateShaderModule by a single runtimeChecks parameter, which takes the values of a new bit flag WGPUShaderRuntimeChecks. It isn't specified as a bitfield in wgpu, but it is a struct containing just bools, so I figured a bitmask on the native side is appropriate.

In the implementation, the two methods only differ in a single line, so I extracted a private create_shader_module function that both methods forward to.

Related Issues

This PR fixes #396

@lisyarus lisyarus force-pushed the implement-create-shader-module-trusted branch from cdbea40 to 14c4bd8 Compare April 16, 2026 14:36
Copy link
Copy Markdown
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM also needs rebasing.

@lisyarus lisyarus force-pushed the implement-create-shader-module-trusted branch from eb340d9 to 376ee27 Compare April 30, 2026 11:49
@lisyarus
Copy link
Copy Markdown
Contributor Author

Rebased to fresh trunk.

@inner-daemons
Copy link
Copy Markdown

This is relevant to #594, I'm considering adding a chain extension instead of this special method.

@almarklein
Copy link
Copy Markdown
Collaborator

I'm considering adding a chain extension instead of this special method.

IIUC you prefer holding off merging?

@inner-daemons
Copy link
Copy Markdown

I'm considering adding a chain extension instead of this special method.

IIUC you prefer holding off merging?

Not necessarily, my thing will take a while to merge. And if @cwfitzgerald thinks this is a fine way to do it then I'm fine to just go with this.

@almarklein
Copy link
Copy Markdown
Collaborator

ok, merging then!

@almarklein almarklein merged commit 3c721aa into gfx-rs:trunk Jun 1, 2026
34 checks passed
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.

Expose create_shader_module_unchecked in wgpu-native?

4 participants