[naga] Update naga with new struct members separator

This commit is contained in:
Igor Shaposhnik 2022-03-13 14:12:07 +03:00 committed by Dzmitry Malyshau
parent ba07db90c8
commit c5d5dbc7eb
15 changed files with 68 additions and 68 deletions

2
Cargo.lock generated
View File

@ -1045,7 +1045,7 @@ dependencies = [
[[package]] [[package]]
name = "naga" name = "naga"
version = "0.8.0" version = "0.8.0"
source = "git+https://github.com/gfx-rs/naga?rev=a45b9a6#a45b9a6cc691a671aa24a32114b51c5acae02420" source = "git+https://github.com/gfx-rs/naga?rev=f90e563#f90e563c281cfc71c794e0426ebcced9e3999202"
dependencies = [ dependencies = [
"bit-set", "bit-set",
"bitflags", "bitflags",

View File

@ -40,7 +40,7 @@ thiserror = "1"
[dependencies.naga] [dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
rev = "a45b9a6" rev = "f90e563"
#version = "0.8" #version = "0.8"
features = ["span", "validate", "wgsl-in"] features = ["span", "validate", "wgsl-in"]

View File

@ -90,14 +90,14 @@ js-sys = { version = "0.3" }
[dependencies.naga] [dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
rev = "a45b9a6" rev = "f90e563"
#version = "0.8" #version = "0.8"
# DEV dependencies # DEV dependencies
[dev-dependencies.naga] [dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
rev = "a45b9a6" rev = "f90e563"
#version = "0.8" #version = "0.8"
features = ["wgsl-in"] features = ["wgsl-in"]

View File

@ -1,12 +1,12 @@
struct Globals { struct Globals {
mvp: mat4x4<f32>; mvp: mat4x4<f32>,
size: vec2<f32>; size: vec2<f32>,
}; };
struct Locals { struct Locals {
position: vec2<f32>; position: vec2<f32>,
velocity: vec2<f32>; velocity: vec2<f32>,
color: u32; color: u32,
}; };
@group(0) @group(0)
@ -18,9 +18,9 @@ var<uniform> globals: Globals;
var<uniform> locals: Locals; var<uniform> locals: Locals;
struct VertexOutput { struct VertexOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) tex_coords: vec2<f32>; @location(0) tex_coords: vec2<f32>,
@location(1) color: vec4<f32>; @location(1) color: vec4<f32>,
}; };
@stage(vertex) @stage(vertex)

View File

@ -139,20 +139,20 @@ env_logger = "0.9"
[dependencies.naga] [dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
rev = "a45b9a6" rev = "f90e563"
#version = "0.8" #version = "0.8"
optional = true optional = true
# used to test all the example shaders # used to test all the example shaders
[dev-dependencies.naga] [dev-dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
rev = "a45b9a6" rev = "f90e563"
#version = "0.8" #version = "0.8"
features = ["wgsl-in"] features = ["wgsl-in"]
[target.'cfg(target_arch = "wasm32")'.dependencies.naga] [target.'cfg(target_arch = "wasm32")'.dependencies.naga]
git = "https://github.com/gfx-rs/naga" git = "https://github.com/gfx-rs/naga"
rev = "a45b9a6" rev = "f90e563"
#version = "0.8" #version = "0.8"
features = ["wgsl-out"] features = ["wgsl-out"]

View File

@ -1,16 +1,16 @@
struct Particle { struct Particle {
pos : vec2<f32>; pos : vec2<f32>,
vel : vec2<f32>; vel : vec2<f32>,
}; };
struct SimParams { struct SimParams {
deltaT : f32; deltaT : f32,
rule1Distance : f32; rule1Distance : f32,
rule2Distance : f32; rule2Distance : f32,
rule3Distance : f32; rule3Distance : f32,
rule1Scale : f32; rule1Scale : f32,
rule2Scale : f32; rule2Scale : f32,
rule3Scale : f32; rule3Scale : f32,
}; };
@group(0) @binding(0) var<uniform> params : SimParams; @group(0) @binding(0) var<uniform> params : SimParams;

View File

@ -1,6 +1,6 @@
struct VertexOutput { struct VertexOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) tex_coords: vec2<f32>; @location(0) tex_coords: vec2<f32>,
}; };
@stage(vertex) @stage(vertex)

View File

@ -1,10 +1,10 @@
struct VertexOutput { struct VertexOutput {
@location(0) tex_coord: vec2<f32>; @location(0) tex_coord: vec2<f32>,
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
}; };
struct Locals { struct Locals {
transform: mat4x4<f32>; transform: mat4x4<f32>
}; };
@group(0) @group(0)
@binding(0) @binding(0)

View File

@ -1,6 +1,6 @@
struct VertexOutput { struct VertexOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) tex_coords: vec2<f32>; @location(0) tex_coords: vec2<f32>,
}; };
@stage(vertex) @stage(vertex)

View File

@ -1,10 +1,10 @@
struct VertexOutput { struct VertexOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) tex_coords: vec2<f32>; @location(0) tex_coords: vec2<f32>,
}; };
struct Locals { struct Locals {
transform: mat4x4<f32>; transform: mat4x4<f32>
}; };
@group(0) @group(0)
@binding(0) @binding(0)

View File

@ -1,6 +1,6 @@
struct VertexOutput { struct VertexOutput {
@location(0) color: vec4<f32>; @location(0) color: vec4<f32>,
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
}; };
@stage(vertex) @stage(vertex)

View File

@ -1,6 +1,6 @@
struct Globals { struct Globals {
view_proj: mat4x4<f32>; view_proj: mat4x4<f32>,
num_lights: vec4<u32>; num_lights: vec4<u32>,
}; };
@group(0) @group(0)
@ -8,8 +8,8 @@ struct Globals {
var<uniform> u_globals: Globals; var<uniform> u_globals: Globals;
struct Entity { struct Entity {
world: mat4x4<f32>; world: mat4x4<f32>,
color: vec4<f32>; color: vec4<f32>,
}; };
@group(1) @group(1)
@ -22,9 +22,9 @@ fn vs_bake(@location(0) position: vec4<i32>) -> @builtin(position) vec4<f32> {
} }
struct VertexOutput { struct VertexOutput {
@builtin(position) proj_position: vec4<f32>; @builtin(position) proj_position: vec4<f32>,
@location(0) world_normal: vec3<f32>; @location(0) world_normal: vec3<f32>,
@location(1) world_position: vec4<f32>; @location(1) world_position: vec4<f32>
}; };
@stage(vertex) @stage(vertex)
@ -44,9 +44,9 @@ fn vs_main(
// fragment shader // fragment shader
struct Light { struct Light {
proj: mat4x4<f32>; proj: mat4x4<f32>,
pos: vec4<f32>; pos: vec4<f32>,
color: vec4<f32>; color: vec4<f32>,
}; };
@group(0) @group(0)

View File

@ -1,17 +1,17 @@
struct SkyOutput { struct SkyOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) uv: vec3<f32>; @location(0) uv: vec3<f32>,
}; };
struct Data { struct Data {
// from camera to screen // from camera to screen
proj: mat4x4<f32>; proj: mat4x4<f32>,
// from screen to camera // from screen to camera
proj_inv: mat4x4<f32>; proj_inv: mat4x4<f32>,
// from world to camera // from world to camera
view: mat4x4<f32>; view: mat4x4<f32>,
// camera position // camera position
cam_pos: vec4<f32>; cam_pos: vec4<f32>,
}; };
@group(0) @group(0)
@binding(0) @binding(0)
@ -40,9 +40,9 @@ fn vs_sky(@builtin(vertex_index) vertex_index: u32) -> SkyOutput {
} }
struct EntityOutput { struct EntityOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(1) normal: vec3<f32>; @location(1) normal: vec3<f32>,
@location(3) view: vec3<f32>; @location(3) view: vec3<f32>,
}; };
@stage(vertex) @stage(vertex)

View File

@ -1,6 +1,6 @@
struct Uniforms { struct Uniforms {
projection_view: mat4x4<f32>; projection_view: mat4x4<f32>,
clipping_plane: vec4<f32>; clipping_plane: vec4<f32>,
}; };
@group(0) @group(0)
@ -12,10 +12,10 @@ let light_colour = vec3<f32>(1.0, 0.98, 0.82);
let ambient = 0.2; let ambient = 0.2;
struct VertexOutput { struct VertexOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) colour: vec4<f32>; @location(0) colour: vec4<f32>,
// Comment this out if using user-clipping planes: // Comment this out if using user-clipping planes:
@location(1) clip_dist: f32; @location(1) clip_dist: f32,
}; };
@stage(vertex) @stage(vertex)

View File

@ -1,8 +1,8 @@
struct Uniforms { struct Uniforms {
view: mat4x4<f32>; view: mat4x4<f32>,
projection: mat4x4<f32>; projection: mat4x4<f32>,
time_size_width: vec4<f32>; time_size_width: vec4<f32>,
viewport_height: f32; viewport_height: f32,
}; };
@group(0) @binding(0) var<uniform> uniforms: Uniforms; @group(0) @binding(0) var<uniform> uniforms: Uniforms;
@ -181,10 +181,10 @@ fn calc_specular(eye: vec3<f32>, normal: vec3<f32>, light: vec3<f32>) -> f32 {
} }
struct VertexOutput { struct VertexOutput {
@builtin(position) position: vec4<f32>; @builtin(position) position: vec4<f32>,
@location(0) f_WaterScreenPos: vec2<f32>; @location(0) f_WaterScreenPos: vec2<f32>,
@location(1) f_Fresnel: f32; @location(1) f_Fresnel: f32,
@location(2) f_Light: vec3<f32>; @location(2) f_Light: vec3<f32>,
}; };
@stage(vertex) @stage(vertex)