summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Jim Eckerlein <jim.eckerlein@icloud.com>2023-09-24 15:12:32 +0200
committerLibravatar Jim Eckerlein <jim.eckerlein@icloud.com>2023-09-24 15:12:32 +0200
commitbcc55e6036df0a2f9bdc7a21bf6ac98c03dd29ae (patch)
tree039146cac6d6d1f7f9deba4aa1dad64adfc11462 /wgpu
parent3f467d121229142177ef1b2f417fe87c7bf7fdf2 (diff)
downloadiced-bcc55e6036df0a2f9bdc7a21bf6ac98c03dd29ae.tar.gz
iced-bcc55e6036df0a2f9bdc7a21bf6ac98c03dd29ae.tar.bz2
iced-bcc55e6036df0a2f9bdc7a21bf6ac98c03dd29ae.zip
Reassign attribute locations
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/quad/gradient.rs20
-rw-r--r--wgpu/src/quad/solid.rs12
-rw-r--r--wgpu/src/shader/quad/gradient.wgsl20
-rw-r--r--wgpu/src/shader/quad/solid.wgsl12
4 files changed, 32 insertions, 32 deletions
diff --git a/wgpu/src/quad/gradient.rs b/wgpu/src/quad/gradient.rs
index 312408b7..ff30f78f 100644
--- a/wgpu/src/quad/gradient.rs
+++ b/wgpu/src/quad/gradient.rs
@@ -111,25 +111,25 @@ impl Pipeline {
step_mode: wgpu::VertexStepMode::Instance,
attributes: &wgpu::vertex_attr_array!(
// Colors 1-2
- 1 => Uint32x4,
+ 0 => Uint32x4,
// Colors 3-4
- 2 => Uint32x4,
+ 1 => Uint32x4,
// Colors 5-6
- 3 => Uint32x4,
+ 2 => Uint32x4,
// Colors 7-8
- 4 => Uint32x4,
+ 3 => Uint32x4,
// Offsets 1-8
- 5 => Uint32x4,
+ 4 => Uint32x4,
// Direction
- 6 => Float32x4,
+ 5 => Float32x4,
// Position & Scale
- 7 => Float32x4,
+ 6 => Float32x4,
// Border color
- 8 => Float32x4,
+ 7 => Float32x4,
// Border radius
- 9 => Float32x4,
+ 8 => Float32x4,
// Border width
- 10 => Float32
+ 9 => Float32
),
}],
},
diff --git a/wgpu/src/quad/solid.rs b/wgpu/src/quad/solid.rs
index bab7367d..96e73ba8 100644
--- a/wgpu/src/quad/solid.rs
+++ b/wgpu/src/quad/solid.rs
@@ -92,17 +92,17 @@ impl Pipeline {
step_mode: wgpu::VertexStepMode::Instance,
attributes: &wgpu::vertex_attr_array!(
// Color
- 1 => Float32x4,
+ 0 => Float32x4,
// Position
- 2 => Float32x2,
+ 1 => Float32x2,
// Size
- 3 => Float32x2,
+ 2 => Float32x2,
// Border color
- 4 => Float32x4,
+ 3 => Float32x4,
// Border radius
- 5 => Float32x4,
+ 4 => Float32x4,
// Border width
- 6 => Float32,
+ 5 => Float32,
),
}],
},
diff --git a/wgpu/src/shader/quad/gradient.wgsl b/wgpu/src/shader/quad/gradient.wgsl
index 36cae61c..4ad2fea8 100644
--- a/wgpu/src/shader/quad/gradient.wgsl
+++ b/wgpu/src/shader/quad/gradient.wgsl
@@ -1,15 +1,15 @@
struct GradientVertexInput {
@builtin(vertex_index) vertex_index: u32,
- @location(1) @interpolate(flat) colors_1: vec4<u32>,
- @location(2) @interpolate(flat) colors_2: vec4<u32>,
- @location(3) @interpolate(flat) colors_3: vec4<u32>,
- @location(4) @interpolate(flat) colors_4: vec4<u32>,
- @location(5) @interpolate(flat) offsets: vec4<u32>,
- @location(6) direction: vec4<f32>,
- @location(7) position_and_scale: vec4<f32>,
- @location(8) border_color: vec4<f32>,
- @location(9) border_radius: vec4<f32>,
- @location(10) border_width: f32,
+ @location(0) @interpolate(flat) colors_1: vec4<u32>,
+ @location(1) @interpolate(flat) colors_2: vec4<u32>,
+ @location(2) @interpolate(flat) colors_3: vec4<u32>,
+ @location(3) @interpolate(flat) colors_4: vec4<u32>,
+ @location(4) @interpolate(flat) offsets: vec4<u32>,
+ @location(5) direction: vec4<f32>,
+ @location(6) position_and_scale: vec4<f32>,
+ @location(7) border_color: vec4<f32>,
+ @location(8) border_radius: vec4<f32>,
+ @location(9) border_width: f32,
}
struct GradientVertexOutput {
diff --git a/wgpu/src/shader/quad/solid.wgsl b/wgpu/src/shader/quad/solid.wgsl
index 5fc5b13a..f84dd7ab 100644
--- a/wgpu/src/shader/quad/solid.wgsl
+++ b/wgpu/src/shader/quad/solid.wgsl
@@ -1,11 +1,11 @@
struct SolidVertexInput {
@builtin(vertex_index) vertex_index: u32,
- @location(1) color: vec4<f32>,
- @location(2) pos: vec2<f32>,
- @location(3) scale: vec2<f32>,
- @location(4) border_color: vec4<f32>,
- @location(5) border_radius: vec4<f32>,
- @location(6) border_width: f32,
+ @location(0) color: vec4<f32>,
+ @location(1) pos: vec2<f32>,
+ @location(2) scale: vec2<f32>,
+ @location(3) border_color: vec4<f32>,
+ @location(4) border_radius: vec4<f32>,
+ @location(5) border_width: f32,
}
struct SolidVertexOutput {