Skip to content

Commit

Permalink
Remove block decorations (#2292)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark authored Dec 15, 2021
1 parent 0e5892f commit 3960658
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

1 change: 0 additions & 1 deletion player/tests/data/zero-init-buffer-for-binding.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct InOutBuffer {
data: [[stride(4)]] array<u32>;
};
Expand Down
2 changes: 1 addition & 1 deletion wgpu-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ thiserror = "1"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "3867ef4"
rev = "8ffd6ba"
#version = "0.7"
features = ["span", "validate", "wgsl-in"]

Expand Down
6 changes: 1 addition & 5 deletions wgpu-core/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -892,11 +892,7 @@ impl Interface {
_ => continue,
};
let ty = match module.types[var.ty].inner {
naga::TypeInner::Struct {
top_level: true,
members: _,
span,
} => ResourceType::Buffer {
naga::TypeInner::Struct { members: _, span } => ResourceType::Buffer {
size: wgt::BufferSize::new(span as u64).unwrap(),
},
naga::TypeInner::Image {
Expand Down
4 changes: 2 additions & 2 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ js-sys = { version = "0.3" }

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "3867ef4"
rev = "8ffd6ba"
#version = "0.7"

[dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "3867ef4"
rev = "8ffd6ba"
#version = "0.7"
features = ["wgsl-in"]

Expand Down
2 changes: 0 additions & 2 deletions wgpu-hal/examples/halmark/shader.wgsl
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
[[block]]
struct Globals {
mvp: mat4x4<f32>;
size: vec2<f32>;
};

[[block]]
struct Locals {
position: vec2<f32>;
velocity: vec2<f32>;
Expand Down
6 changes: 3 additions & 3 deletions wgpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,20 @@ env_logger = "0.8"

[dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "3867ef4"
rev = "8ffd6ba"
#version = "0.7"
optional = true

# used to test all the example shaders
[dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "3867ef4"
rev = "8ffd6ba"
#version = "0.7"
features = ["wgsl-in"]

[target.'cfg(target_arch = "wasm32")'.dependencies.naga]
git = "https://github.com/gfx-rs/naga"
rev = "3867ef4"
rev = "8ffd6ba"
#version = "0.7"
features = ["wgsl-out"]

Expand Down
2 changes: 0 additions & 2 deletions wgpu/examples/boids/compute.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ struct Particle {
vel : vec2<f32>;
};

[[block]]
struct SimParams {
deltaT : f32;
rule1Distance : f32;
Expand All @@ -14,7 +13,6 @@ struct SimParams {
rule3Scale : f32;
};

[[block]]
struct Particles {
particles : [[stride(16)]] array<Particle>;
};
Expand Down
1 change: 0 additions & 1 deletion wgpu/examples/cube/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ struct VertexOutput {
[[builtin(position)]] position: vec4<f32>;
};

[[block]]
struct Locals {
transform: mat4x4<f32>;
};
Expand Down
1 change: 0 additions & 1 deletion wgpu/examples/hello-compute/shader.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct PrimeIndices {
data: [[stride(4)]] array<u32>;
}; // this is used as both input and output for convenience
Expand Down
1 change: 0 additions & 1 deletion wgpu/examples/mipmap/draw.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ struct VertexOutput {
[[location(0)]] tex_coords: vec2<f32>;
};

[[block]]
struct Locals {
transform: mat4x4<f32>;
};
Expand Down
4 changes: 0 additions & 4 deletions wgpu/examples/shadow/shader.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct Globals {
view_proj: mat4x4<f32>;
num_lights: vec4<u32>;
Expand All @@ -7,7 +6,6 @@ struct Globals {
[[group(0), binding(0)]]
var<uniform> u_globals: Globals;

[[block]]
struct Entity {
world: mat4x4<f32>;
color: vec4<f32>;
Expand Down Expand Up @@ -49,13 +47,11 @@ struct Light {
color: vec4<f32>;
};

[[block]]
struct Lights {
data: [[stride(96)]] array<Light>;
};

// Used when storage types are not supported
[[block]]
struct LightsWithoutStorage {
data: array<Light, 10>;
};
Expand Down
1 change: 0 additions & 1 deletion wgpu/examples/skybox/shader.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ struct SkyOutput {
[[location(0)]] uv: vec3<f32>;
};

[[block]]
struct Data {
// from camera to screen
proj: mat4x4<f32>;
Expand Down
1 change: 0 additions & 1 deletion wgpu/examples/water/terrain.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct Uniforms {
projection_view: mat4x4<f32>;
clipping_plane: vec4<f32>;
Expand Down
1 change: 0 additions & 1 deletion wgpu/examples/water/water.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct Uniforms {
view: mat4x4<f32>;
projection: mat4x4<f32>;
Expand Down
1 change: 0 additions & 1 deletion wgpu/tests/vertex_indices/draw.vert.wgsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[block]]
struct Indices {
arr: array<u32>;
}; // this is used as both input and output for convenience
Expand Down

0 comments on commit 3960658

Please sign in to comment.