diff --git a/Cargo.lock b/Cargo.lock index 8173bd49f8..48f5b9125c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/wgpu-core/Cargo.toml b/wgpu-core/Cargo.toml index 4cd4770927..9d059ea588 100644 --- a/wgpu-core/Cargo.toml +++ b/wgpu-core/Cargo.toml @@ -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"] diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 3022696a04..c15100b50e 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -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"] diff --git a/wgpu-hal/examples/halmark/shader.wgsl b/wgpu-hal/examples/halmark/shader.wgsl index 00341fde0f..960424bb7f 100644 --- a/wgpu-hal/examples/halmark/shader.wgsl +++ b/wgpu-hal/examples/halmark/shader.wgsl @@ -1,12 +1,12 @@ struct Globals { - mvp: mat4x4; - size: vec2; + mvp: mat4x4, + size: vec2, }; struct Locals { - position: vec2; - velocity: vec2; - color: u32; + position: vec2, + velocity: vec2, + color: u32, }; @group(0) @@ -18,9 +18,9 @@ var globals: Globals; var locals: Locals; struct VertexOutput { - @builtin(position) position: vec4; - @location(0) tex_coords: vec2; - @location(1) color: vec4; + @builtin(position) position: vec4, + @location(0) tex_coords: vec2, + @location(1) color: vec4, }; @stage(vertex) diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index ca03d016c6..4f8a51ad80 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -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"] diff --git a/wgpu/examples/boids/compute.wgsl b/wgpu/examples/boids/compute.wgsl index ab1eeaea3f..95c9f17193 100644 --- a/wgpu/examples/boids/compute.wgsl +++ b/wgpu/examples/boids/compute.wgsl @@ -1,16 +1,16 @@ struct Particle { - pos : vec2; - vel : vec2; + pos : vec2, + vel : vec2, }; 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 params : SimParams; diff --git a/wgpu/examples/conservative-raster/upscale.wgsl b/wgpu/examples/conservative-raster/upscale.wgsl index addfbe2701..cbad67e330 100644 --- a/wgpu/examples/conservative-raster/upscale.wgsl +++ b/wgpu/examples/conservative-raster/upscale.wgsl @@ -1,6 +1,6 @@ struct VertexOutput { - @builtin(position) position: vec4; - @location(0) tex_coords: vec2; + @builtin(position) position: vec4, + @location(0) tex_coords: vec2, }; @stage(vertex) diff --git a/wgpu/examples/cube/shader.wgsl b/wgpu/examples/cube/shader.wgsl index 0efe215f08..98ee4dfdfb 100644 --- a/wgpu/examples/cube/shader.wgsl +++ b/wgpu/examples/cube/shader.wgsl @@ -1,10 +1,10 @@ struct VertexOutput { - @location(0) tex_coord: vec2; - @builtin(position) position: vec4; + @location(0) tex_coord: vec2, + @builtin(position) position: vec4, }; struct Locals { - transform: mat4x4; + transform: mat4x4 }; @group(0) @binding(0) diff --git a/wgpu/examples/mipmap/blit.wgsl b/wgpu/examples/mipmap/blit.wgsl index 80f76b1f6e..3f7db594f1 100644 --- a/wgpu/examples/mipmap/blit.wgsl +++ b/wgpu/examples/mipmap/blit.wgsl @@ -1,6 +1,6 @@ struct VertexOutput { - @builtin(position) position: vec4; - @location(0) tex_coords: vec2; + @builtin(position) position: vec4, + @location(0) tex_coords: vec2, }; @stage(vertex) diff --git a/wgpu/examples/mipmap/draw.wgsl b/wgpu/examples/mipmap/draw.wgsl index aa569f1459..e3c6340d3b 100644 --- a/wgpu/examples/mipmap/draw.wgsl +++ b/wgpu/examples/mipmap/draw.wgsl @@ -1,10 +1,10 @@ struct VertexOutput { - @builtin(position) position: vec4; - @location(0) tex_coords: vec2; + @builtin(position) position: vec4, + @location(0) tex_coords: vec2, }; struct Locals { - transform: mat4x4; + transform: mat4x4 }; @group(0) @binding(0) diff --git a/wgpu/examples/msaa-line/shader.wgsl b/wgpu/examples/msaa-line/shader.wgsl index 30f29c905b..4c713fd575 100644 --- a/wgpu/examples/msaa-line/shader.wgsl +++ b/wgpu/examples/msaa-line/shader.wgsl @@ -1,6 +1,6 @@ struct VertexOutput { - @location(0) color: vec4; - @builtin(position) position: vec4; + @location(0) color: vec4, + @builtin(position) position: vec4, }; @stage(vertex) diff --git a/wgpu/examples/shadow/shader.wgsl b/wgpu/examples/shadow/shader.wgsl index 088608378c..040c9c870f 100644 --- a/wgpu/examples/shadow/shader.wgsl +++ b/wgpu/examples/shadow/shader.wgsl @@ -1,6 +1,6 @@ struct Globals { - view_proj: mat4x4; - num_lights: vec4; + view_proj: mat4x4, + num_lights: vec4, }; @group(0) @@ -8,8 +8,8 @@ struct Globals { var u_globals: Globals; struct Entity { - world: mat4x4; - color: vec4; + world: mat4x4, + color: vec4, }; @group(1) @@ -22,9 +22,9 @@ fn vs_bake(@location(0) position: vec4) -> @builtin(position) vec4 { } struct VertexOutput { - @builtin(position) proj_position: vec4; - @location(0) world_normal: vec3; - @location(1) world_position: vec4; + @builtin(position) proj_position: vec4, + @location(0) world_normal: vec3, + @location(1) world_position: vec4 }; @stage(vertex) @@ -44,9 +44,9 @@ fn vs_main( // fragment shader struct Light { - proj: mat4x4; - pos: vec4; - color: vec4; + proj: mat4x4, + pos: vec4, + color: vec4, }; @group(0) diff --git a/wgpu/examples/skybox/shader.wgsl b/wgpu/examples/skybox/shader.wgsl index 6aff11102b..ff8d0dd2da 100644 --- a/wgpu/examples/skybox/shader.wgsl +++ b/wgpu/examples/skybox/shader.wgsl @@ -1,17 +1,17 @@ struct SkyOutput { - @builtin(position) position: vec4; - @location(0) uv: vec3; + @builtin(position) position: vec4, + @location(0) uv: vec3, }; struct Data { // from camera to screen - proj: mat4x4; + proj: mat4x4, // from screen to camera - proj_inv: mat4x4; + proj_inv: mat4x4, // from world to camera - view: mat4x4; + view: mat4x4, // camera position - cam_pos: vec4; + cam_pos: vec4, }; @group(0) @binding(0) @@ -40,9 +40,9 @@ fn vs_sky(@builtin(vertex_index) vertex_index: u32) -> SkyOutput { } struct EntityOutput { - @builtin(position) position: vec4; - @location(1) normal: vec3; - @location(3) view: vec3; + @builtin(position) position: vec4, + @location(1) normal: vec3, + @location(3) view: vec3, }; @stage(vertex) diff --git a/wgpu/examples/water/terrain.wgsl b/wgpu/examples/water/terrain.wgsl index c21685b194..a5d3a0a427 100644 --- a/wgpu/examples/water/terrain.wgsl +++ b/wgpu/examples/water/terrain.wgsl @@ -1,6 +1,6 @@ struct Uniforms { - projection_view: mat4x4; - clipping_plane: vec4; + projection_view: mat4x4, + clipping_plane: vec4, }; @group(0) @@ -12,10 +12,10 @@ let light_colour = vec3(1.0, 0.98, 0.82); let ambient = 0.2; struct VertexOutput { - @builtin(position) position: vec4; - @location(0) colour: vec4; + @builtin(position) position: vec4, + @location(0) colour: vec4, // Comment this out if using user-clipping planes: - @location(1) clip_dist: f32; + @location(1) clip_dist: f32, }; @stage(vertex) diff --git a/wgpu/examples/water/water.wgsl b/wgpu/examples/water/water.wgsl index 6db139039b..b2bfe6b67f 100644 --- a/wgpu/examples/water/water.wgsl +++ b/wgpu/examples/water/water.wgsl @@ -1,8 +1,8 @@ struct Uniforms { - view: mat4x4; - projection: mat4x4; - time_size_width: vec4; - viewport_height: f32; + view: mat4x4, + projection: mat4x4, + time_size_width: vec4, + viewport_height: f32, }; @group(0) @binding(0) var uniforms: Uniforms; @@ -181,10 +181,10 @@ fn calc_specular(eye: vec3, normal: vec3, light: vec3) -> f32 { } struct VertexOutput { - @builtin(position) position: vec4; - @location(0) f_WaterScreenPos: vec2; - @location(1) f_Fresnel: f32; - @location(2) f_Light: vec3; + @builtin(position) position: vec4, + @location(0) f_WaterScreenPos: vec2, + @location(1) f_Fresnel: f32, + @location(2) f_Light: vec3, }; @stage(vertex)