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

Implement Clone for ShaderModuleDescriptor #2902

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ smallvec = "1"
thiserror = "1"

[dependencies.naga]
#git = "https://github.com/gfx-rs/naga"
#rev = "27d38aae"
version = "0.9"
git = "https://github.com/gfx-rs/naga"
rev = "48e79388"
#version = "0.9"
features = ["span", "validate", "wgsl-in"]

[dependencies.wgt]
Expand Down
12 changes: 6 additions & 6 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ js-sys = { version = "0.3" }
android_system_properties = "0.1.1"

[dependencies.naga]
#git = "https://github.com/gfx-rs/naga"
#rev = "27d38aae"
version = "0.9"
git = "https://github.com/gfx-rs/naga"
rev = "48e79388"
#version = "0.9"

# DEV dependencies

[dev-dependencies.naga]
#git = "https://github.com/gfx-rs/naga"
#rev = "27d38aae"
version = "0.9"
git = "https://github.com/gfx-rs/naga"
rev = "48e79388"
#version = "0.9"
features = ["wgsl-in"]

[dev-dependencies]
Expand Down
19 changes: 10 additions & 9 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,23 @@ pollster = "0.2"
env_logger = "0.9"

[dependencies.naga]
#git = "https://github.com/gfx-rs/naga"
#rev = "27d38aae"
version = "0.9"
git = "https://github.com/gfx-rs/naga"
rev = "48e79388"
#version = "0.9"
features = ["clone"]
optional = true

# used to test all the example shaders
[dev-dependencies.naga]
#git = "https://github.com/gfx-rs/naga"
#rev = "27d38aae"
version = "0.9"
git = "https://github.com/gfx-rs/naga"
rev = "48e79388"
#version = "0.9"
features = ["wgsl-in"]

[target.'cfg(target_arch = "wasm32")'.dependencies.naga]
#git = "https://github.com/gfx-rs/naga"
#rev = "27d38aae"
version = "0.9"
git = "https://github.com/gfx-rs/naga"
rev = "48e79388"
#version = "0.9"
features = ["wgsl-out"]

[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
2 changes: 2 additions & 0 deletions wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,7 @@ impl Drop for ShaderModule {
///
/// Any necessary shader translation (e.g. from WGSL to SPIR-V or vice versa)
/// will be done internally by wgpu.
#[derive(Clone)]
#[non_exhaustive]
pub enum ShaderSource<'a> {
/// SPIR-V module represented as a slice of words.
Expand Down Expand Up @@ -847,6 +848,7 @@ pub enum ShaderSource<'a> {
///
/// Corresponds to [WebGPU `GPUShaderModuleDescriptor`](
/// https://gpuweb.github.io/gpuweb/#dictdef-gpushadermoduledescriptor).
#[derive(Clone)]
pub struct ShaderModuleDescriptor<'a> {
/// Debug label of the shader module. This will show up in graphics debuggers for easy identification.
pub label: Label<'a>,
Expand Down