Remove block decorations (#2292)

This commit is contained in:
Dzmitry Malyshau 2021-12-15 12:29:37 -05:00 committed by GitHub
parent 0e5892fa04
commit 3960658529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 8 additions and 28 deletions

2
Cargo.lock generated
View File

@ -871,7 +871,7 @@ dependencies = [
[[package]]
name = "naga"
version = "0.7.1"
source = "git+https://github.com/gfx-rs/naga?rev=3867ef4#3867ef4f6cba6af0bbeec330c9379d7ade14e4ef"
source = "git+https://github.com/gfx-rs/naga?rev=8ffd6ba#8ffd6ba929b4b93c9564f08fe8bb34b23fa72a6f"
dependencies = [
"bit-set",
"bitflags",

View File

@ -1,4 +1,3 @@
[[block]]
struct InOutBuffer {
data: [[stride(4)]] array<u32>;
};

View File

@ -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"]

View File

@ -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 {

View File

@ -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"]

View File

@ -1,10 +1,8 @@
[[block]]
struct Globals {
mvp: mat4x4<f32>;
size: vec2<f32>;
};
[[block]]
struct Locals {
position: vec2<f32>;
velocity: vec2<f32>;

View File

@ -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"]

View File

@ -3,7 +3,6 @@ struct Particle {
vel : vec2<f32>;
};
[[block]]
struct SimParams {
deltaT : f32;
rule1Distance : f32;
@ -14,7 +13,6 @@ struct SimParams {
rule3Scale : f32;
};
[[block]]
struct Particles {
particles : [[stride(16)]] array<Particle>;
};

View File

@ -3,7 +3,6 @@ struct VertexOutput {
[[builtin(position)]] position: vec4<f32>;
};
[[block]]
struct Locals {
transform: mat4x4<f32>;
};

View File

@ -1,4 +1,3 @@
[[block]]
struct PrimeIndices {
data: [[stride(4)]] array<u32>;
}; // this is used as both input and output for convenience

View File

@ -3,7 +3,6 @@ struct VertexOutput {
[[location(0)]] tex_coords: vec2<f32>;
};
[[block]]
struct Locals {
transform: mat4x4<f32>;
};

View File

@ -1,4 +1,3 @@
[[block]]
struct Globals {
view_proj: mat4x4<f32>;
num_lights: vec4<u32>;
@ -7,7 +6,6 @@ struct Globals {
[[group(0), binding(0)]]
var<uniform> u_globals: Globals;
[[block]]
struct Entity {
world: mat4x4<f32>;
color: vec4<f32>;
@ -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>;
};

View File

@ -3,7 +3,6 @@ struct SkyOutput {
[[location(0)]] uv: vec3<f32>;
};
[[block]]
struct Data {
// from camera to screen
proj: mat4x4<f32>;

View File

@ -1,4 +1,3 @@
[[block]]
struct Uniforms {
projection_view: mat4x4<f32>;
clipping_plane: vec4<f32>;

View File

@ -1,4 +1,3 @@
[[block]]
struct Uniforms {
view: mat4x4<f32>;
projection: mat4x4<f32>;

View File

@ -1,4 +1,3 @@
[[block]]
struct Indices {
arr: array<u32>;
}; // this is used as both input and output for convenience