Skip to content

Commit

Permalink
mesh shader ext: cargo fmt compiletests
Browse files Browse the repository at this point in the history
  • Loading branch information
Firestar99 committed Feb 7, 2024
1 parent 6ff2cc8 commit 05e8c8d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/ui/arch/mesh_shader_output_lines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ pub fn main(
positions[1] = Vec4::new(0.5, 0.5, 0.0, 1.0);

indices[0] = UVec2::new(0, 1);
}
}
2 changes: 1 addition & 1 deletion tests/ui/arch/mesh_shader_output_points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ pub fn main(
positions[0] = Vec4::new(-0.5, 0.5, 0.0, 1.0);

indices[0] = 0;
}
}
2 changes: 1 addition & 1 deletion tests/ui/arch/mesh_shader_output_triangles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ pub fn main(
positions[2] = Vec4::new(0.0, -0.5, 0.0, 1.0);

indices[0] = UVec3::new(0, 1, 2);
}
}
6 changes: 3 additions & 3 deletions tests/ui/arch/mesh_shader_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use spirv_std::spirv;
pub struct Payload {
pub first: f32,
pub second: f32,
pub third: f32
pub third: f32,
}

#[spirv(mesh_ext(
Expand All @@ -21,7 +21,7 @@ pub struct Payload {
pub fn main(
#[spirv(position)] positions: &mut [Vec4; 3],
#[spirv(primitive_triangle_indices_ext)] indices: &mut [UVec3; 1],
#[spirv(task_payload_workgroup_ext)] payload: &Payload
#[spirv(task_payload_workgroup_ext)] payload: &Payload,
) {
unsafe {
set_mesh_outputs_ext(3, 1);
Expand All @@ -32,4 +32,4 @@ pub fn main(
positions[2] = payload.third * Vec4::new(0.0, -0.5, 0.0, 1.0);

indices[0] = UVec3::new(0, 1, 2);
}
}
4 changes: 2 additions & 2 deletions tests/ui/arch/task_shader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// only-vulkan1.2
// compile-flags: -Ctarget-feature=+MeshShadingEXT,+ext:SPV_EXT_mesh_shader

use spirv_std::spirv;
use spirv_std::arch::emit_mesh_tasks_ext;
use spirv_std::spirv;

#[spirv(task_ext(threads(1)))]
pub fn main() {
unsafe {
emit_mesh_tasks_ext(1, 2, 3);
}
}
}
6 changes: 3 additions & 3 deletions tests/ui/arch/task_shader_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// only-vulkan1.2
// compile-flags: -Ctarget-feature=+MeshShadingEXT,+ext:SPV_EXT_mesh_shader

use spirv_std::spirv;
use spirv_std::arch::emit_mesh_tasks_ext;
use spirv_std::spirv;

pub struct Payload {
pub first: u32,
pub second: i32
pub second: i32,
}

#[spirv(task_ext(threads(1)))]
Expand All @@ -18,4 +18,4 @@ pub fn main(#[spirv(task_payload_workgroup_ext)] payload: &mut Payload) {
unsafe {
emit_mesh_tasks_ext(3, 4, 5);
}
}
}

0 comments on commit 05e8c8d

Please sign in to comment.