Skip to content

Commit

Permalink
subgroup: fixed clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Firestar99 committed Jun 12, 2024
1 parent 18dd346 commit 17ea3c6
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 10 deletions.
5 changes: 4 additions & 1 deletion crates/spirv-std/src/arch/subgroup.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#[cfg(target_arch = "spirv")]
use crate::arch::barrier;
use crate::float::Float;
use crate::integer::{Integer, SignedInteger, UnsignedInteger};
#[cfg(target_arch = "spirv")]
use crate::memory::{Scope, Semantics};
use crate::scalar::VectorOrScalar;
#[cfg(target_arch = "spirv")]
use core::arch::asm;

#[cfg(target_arch = "spirv")]
const SUBGROUP: u32 = Scope::Subgroup as u32;

/// SubgroupMask is a [`glam::UVec4`] representing a bitmask of all invocations within a subgroup.
/// `SubgroupMask` is a [`glam::UVec4`] representing a bitmask of all invocations within a subgroup.
/// Mostly used in group ballot operations.
#[derive(Copy, Clone, Default, Eq, PartialEq)]
pub struct SubgroupMask(pub glam::UVec4);
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/arch/subgroup/subgroup_non_uniform_ballot.stderr
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 376 8
OpLine %6 379 8
%7 = OpGroupNonUniformBallot %8 %9 %4
OpLine %6 412 8
OpLine %6 415 8
%10 = OpGroupNonUniformInverseBallot %2 %9 %7
OpNoLine
OpReturnValue %10
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %5
%6 = OpLabel
OpLine %7 493 8
OpLine %7 496 8
%8 = OpGroupNonUniformBallotBitCount %2 %9 Reduce %4
OpNoLine
OpReturnValue %8
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 343 8
OpLine %6 346 8
%7 = OpGroupNonUniformBroadcastFirst %2 %8 %4
OpNoLine
OpReturnValue %7
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/arch/subgroup/subgroup_non_uniform_elect.stderr
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%1 = OpFunction %2 None %3
%4 = OpLabel
OpLine %5 178 8
OpLine %5 181 8
%6 = OpGroupNonUniformElect %2 %7
OpNoLine
OpReturnValue %6
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 787 8
OpLine %6 790 8
%7 = OpGroupNonUniformIAdd %2 %8 ClusteredReduce %4 %9
OpNoLine
OpReturnValue %7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 746 8
OpLine %6 749 8
%7 = OpGroupNonUniformIAdd %2 %8 ExclusiveScan %4
OpNoLine
OpReturnValue %7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 746 8
OpLine %6 749 8
%7 = OpGroupNonUniformIAdd %2 %8 InclusiveScan %4
OpNoLine
OpReturnValue %7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%1 = OpFunction %2 None %3
%4 = OpFunctionParameter %2
%5 = OpLabel
OpLine %6 746 8
OpLine %6 749 8
%7 = OpGroupNonUniformIAdd %2 %8 Reduce %4
OpNoLine
OpReturnValue %7
Expand Down

0 comments on commit 17ea3c6

Please sign in to comment.