mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
[naga] Update naga with new struct members separator
This commit is contained in:
parent
ba07db90c8
commit
c5d5dbc7eb
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1045,7 +1045,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "naga"
|
||||
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 = [
|
||||
"bit-set",
|
||||
"bitflags",
|
||||
|
||||
@ -40,7 +40,7 @@ thiserror = "1"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "a45b9a6"
|
||||
rev = "f90e563"
|
||||
#version = "0.8"
|
||||
features = ["span", "validate", "wgsl-in"]
|
||||
|
||||
|
||||
@ -90,14 +90,14 @@ js-sys = { version = "0.3" }
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "a45b9a6"
|
||||
rev = "f90e563"
|
||||
#version = "0.8"
|
||||
|
||||
# DEV dependencies
|
||||
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "a45b9a6"
|
||||
rev = "f90e563"
|
||||
#version = "0.8"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
struct Globals {
|
||||
mvp: mat4x4<f32>;
|
||||
size: vec2<f32>;
|
||||
mvp: mat4x4<f32>,
|
||||
size: vec2<f32>,
|
||||
};
|
||||
|
||||
struct Locals {
|
||||
position: vec2<f32>;
|
||||
velocity: vec2<f32>;
|
||||
color: u32;
|
||||
position: vec2<f32>,
|
||||
velocity: vec2<f32>,
|
||||
color: u32,
|
||||
};
|
||||
|
||||
@group(0)
|
||||
@ -18,9 +18,9 @@ var<uniform> globals: Globals;
|
||||
var<uniform> locals: Locals;
|
||||
|
||||
struct VertexOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) tex_coords: vec2<f32>;
|
||||
@location(1) color: vec4<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) tex_coords: vec2<f32>,
|
||||
@location(1) color: vec4<f32>,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
@ -139,20 +139,20 @@ env_logger = "0.9"
|
||||
|
||||
[dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "a45b9a6"
|
||||
rev = "f90e563"
|
||||
#version = "0.8"
|
||||
optional = true
|
||||
|
||||
# used to test all the example shaders
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "a45b9a6"
|
||||
rev = "f90e563"
|
||||
#version = "0.8"
|
||||
features = ["wgsl-in"]
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "a45b9a6"
|
||||
rev = "f90e563"
|
||||
#version = "0.8"
|
||||
features = ["wgsl-out"]
|
||||
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
struct Particle {
|
||||
pos : vec2<f32>;
|
||||
vel : vec2<f32>;
|
||||
pos : vec2<f32>,
|
||||
vel : vec2<f32>,
|
||||
};
|
||||
|
||||
struct SimParams {
|
||||
deltaT : f32;
|
||||
rule1Distance : f32;
|
||||
rule2Distance : f32;
|
||||
rule3Distance : f32;
|
||||
rule1Scale : f32;
|
||||
rule2Scale : f32;
|
||||
rule3Scale : f32;
|
||||
deltaT : f32,
|
||||
rule1Distance : f32,
|
||||
rule2Distance : f32,
|
||||
rule3Distance : f32,
|
||||
rule1Scale : f32,
|
||||
rule2Scale : f32,
|
||||
rule3Scale : f32,
|
||||
};
|
||||
|
||||
@group(0) @binding(0) var<uniform> params : SimParams;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
struct VertexOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) tex_coords: vec2<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) tex_coords: vec2<f32>,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
struct VertexOutput {
|
||||
@location(0) tex_coord: vec2<f32>;
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) tex_coord: vec2<f32>,
|
||||
@builtin(position) position: vec4<f32>,
|
||||
};
|
||||
|
||||
struct Locals {
|
||||
transform: mat4x4<f32>;
|
||||
transform: mat4x4<f32>
|
||||
};
|
||||
@group(0)
|
||||
@binding(0)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
struct VertexOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) tex_coords: vec2<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) tex_coords: vec2<f32>,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
struct VertexOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) tex_coords: vec2<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) tex_coords: vec2<f32>,
|
||||
};
|
||||
|
||||
struct Locals {
|
||||
transform: mat4x4<f32>;
|
||||
transform: mat4x4<f32>
|
||||
};
|
||||
@group(0)
|
||||
@binding(0)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
struct VertexOutput {
|
||||
@location(0) color: vec4<f32>;
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) color: vec4<f32>,
|
||||
@builtin(position) position: vec4<f32>,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
struct Globals {
|
||||
view_proj: mat4x4<f32>;
|
||||
num_lights: vec4<u32>;
|
||||
view_proj: mat4x4<f32>,
|
||||
num_lights: vec4<u32>,
|
||||
};
|
||||
|
||||
@group(0)
|
||||
@ -8,8 +8,8 @@ struct Globals {
|
||||
var<uniform> u_globals: Globals;
|
||||
|
||||
struct Entity {
|
||||
world: mat4x4<f32>;
|
||||
color: vec4<f32>;
|
||||
world: mat4x4<f32>,
|
||||
color: vec4<f32>,
|
||||
};
|
||||
|
||||
@group(1)
|
||||
@ -22,9 +22,9 @@ fn vs_bake(@location(0) position: vec4<i32>) -> @builtin(position) vec4<f32> {
|
||||
}
|
||||
|
||||
struct VertexOutput {
|
||||
@builtin(position) proj_position: vec4<f32>;
|
||||
@location(0) world_normal: vec3<f32>;
|
||||
@location(1) world_position: vec4<f32>;
|
||||
@builtin(position) proj_position: vec4<f32>,
|
||||
@location(0) world_normal: vec3<f32>,
|
||||
@location(1) world_position: vec4<f32>
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
@ -44,9 +44,9 @@ fn vs_main(
|
||||
// fragment shader
|
||||
|
||||
struct Light {
|
||||
proj: mat4x4<f32>;
|
||||
pos: vec4<f32>;
|
||||
color: vec4<f32>;
|
||||
proj: mat4x4<f32>,
|
||||
pos: vec4<f32>,
|
||||
color: vec4<f32>,
|
||||
};
|
||||
|
||||
@group(0)
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
struct SkyOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) uv: vec3<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) uv: vec3<f32>,
|
||||
};
|
||||
|
||||
struct Data {
|
||||
// from camera to screen
|
||||
proj: mat4x4<f32>;
|
||||
proj: mat4x4<f32>,
|
||||
// from screen to camera
|
||||
proj_inv: mat4x4<f32>;
|
||||
proj_inv: mat4x4<f32>,
|
||||
// from world to camera
|
||||
view: mat4x4<f32>;
|
||||
view: mat4x4<f32>,
|
||||
// camera position
|
||||
cam_pos: vec4<f32>;
|
||||
cam_pos: vec4<f32>,
|
||||
};
|
||||
@group(0)
|
||||
@binding(0)
|
||||
@ -40,9 +40,9 @@ fn vs_sky(@builtin(vertex_index) vertex_index: u32) -> SkyOutput {
|
||||
}
|
||||
|
||||
struct EntityOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(1) normal: vec3<f32>;
|
||||
@location(3) view: vec3<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(1) normal: vec3<f32>,
|
||||
@location(3) view: vec3<f32>,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
struct Uniforms {
|
||||
projection_view: mat4x4<f32>;
|
||||
clipping_plane: vec4<f32>;
|
||||
projection_view: mat4x4<f32>,
|
||||
clipping_plane: vec4<f32>,
|
||||
};
|
||||
|
||||
@group(0)
|
||||
@ -12,10 +12,10 @@ let light_colour = vec3<f32>(1.0, 0.98, 0.82);
|
||||
let ambient = 0.2;
|
||||
|
||||
struct VertexOutput {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) colour: vec4<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) colour: vec4<f32>,
|
||||
// Comment this out if using user-clipping planes:
|
||||
@location(1) clip_dist: f32;
|
||||
@location(1) clip_dist: f32,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
struct Uniforms {
|
||||
view: mat4x4<f32>;
|
||||
projection: mat4x4<f32>;
|
||||
time_size_width: vec4<f32>;
|
||||
viewport_height: f32;
|
||||
view: mat4x4<f32>,
|
||||
projection: mat4x4<f32>,
|
||||
time_size_width: vec4<f32>,
|
||||
viewport_height: f32,
|
||||
};
|
||||
@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 {
|
||||
@builtin(position) position: vec4<f32>;
|
||||
@location(0) f_WaterScreenPos: vec2<f32>;
|
||||
@location(1) f_Fresnel: f32;
|
||||
@location(2) f_Light: vec3<f32>;
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) f_WaterScreenPos: vec2<f32>,
|
||||
@location(1) f_Fresnel: f32,
|
||||
@location(2) f_Light: vec3<f32>,
|
||||
};
|
||||
|
||||
@stage(vertex)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user