diff --git a/naga/src/non_max_u32.rs b/naga/src/non_max_u32.rs index 6c4e067e36..2ad402e497 100644 --- a/naga/src/non_max_u32.rs +++ b/naga/src/non_max_u32.rs @@ -28,23 +28,28 @@ use std::num::NonZeroU32; /// Since zero is a very useful value in indexing, `NonMaxU32` is more useful /// for representing indices than [`NonZeroU32`]. /// +/// `NonMaxU32` values and `Option` values both occupy 32 bits. +/// +/// # Serialization and Deserialization +/// +/// When the appropriate Cargo features are enabled, `NonMaxU32` implements +/// [`serde::Serialize`] and [`serde::Deserialize`] in the natural way, as the +/// integer value it represents. For example, serializing +/// `NonMaxU32::new(0).unwrap()` as JSON or RON yields the string `"0"`. This is +/// the case despite `NonMaxU32`'s implementation, described below. +/// /// # Implementation /// -/// A `NonMaxU32` whose value is `n` is a newtype around a [`NonZeroU32`] whose -/// value is `n + 1`. This way, the range of values `NonMaxU32` can represent, -/// `0..=u32::MAX - 1`, is mapped to the range `1..=u32::MAX`, which is the -/// range that [`NonZeroU32`] can represent. (And conversely, since [`u32`] -/// addition wraps around, the unrepresentable value [`u32::MAX`] becomes the -/// unrepresentable value `0`.) +/// Although this should not be observable to its users, a `NonMaxU32` whose +/// value is `n` is a newtype around a [`NonZeroU32`] whose value is `n + 1`. +/// This way, the range of values that `NonMaxU32` can represent, `0..=u32::MAX +/// - 1`, is mapped to the range `1..=u32::MAX`, which is the range that +/// [`NonZeroU32`] can represent. (And conversely, since [`u32`] addition wraps +/// around, the value unrepresentable in `NonMaxU32`, [`u32::MAX`], becomes the +/// value unrepresentable in [`NonZeroU32`], `0`.) /// /// [`NonZeroU32`]: std::num::NonZeroU32 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] -#[cfg_attr(feature = "serialize", derive(serde::Serialize))] -#[cfg_attr(feature = "deserialize", derive(serde::Deserialize))] -#[cfg_attr( - any(feature = "serialize", feature = "deserialize"), - serde(transparent) -)] #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct NonMaxU32(NonZeroU32); @@ -104,6 +109,35 @@ impl std::fmt::Display for NonMaxU32 { } } +#[cfg(feature = "serialize")] +impl serde::Serialize for NonMaxU32 { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_u32(self.get()) + } +} + +#[cfg(feature = "deserialize")] +impl<'de> serde::Deserialize<'de> for NonMaxU32 { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + // Defer to `u32`'s `Deserialize` implementation. + let n = ::deserialize(deserializer)?; + + // Constrain the range of the value further. + NonMaxU32::new(n).ok_or_else(|| { + ::invalid_value( + serde::de::Unexpected::Unsigned(n as u64), + &"a value no less than 0 and no greater than 4294967294 (2^32 - 2)", + ) + }) + } +} + #[test] fn size() { use core::mem::size_of; diff --git a/naga/tests/out/analysis/access.info.ron b/naga/tests/out/analysis/access.info.ron index d59fb2a509..52b0c020eb 100644 --- a/naga/tests/out/analysis/access.info.ron +++ b/naga/tests/out/analysis/access.info.ron @@ -62,13 +62,13 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 14, assignable_global: None, ty: Value(Pointer( - base: 3, + base: 2, space: Function, )), ), @@ -86,21 +86,21 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -108,9 +108,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -120,9 +120,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), @@ -133,7 +133,7 @@ ), ref_count: 0, assignable_global: None, - ty: Handle(15), + ty: Handle(14), ), ( uniformity: ( @@ -141,9 +141,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -153,9 +153,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), @@ -165,7 +165,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -196,9 +196,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -208,28 +208,28 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -241,7 +241,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -260,9 +260,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -272,9 +272,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), @@ -284,7 +284,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -300,7 +300,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: None, scalar: ( @@ -328,9 +328,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -340,9 +340,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), @@ -352,7 +352,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -364,20 +364,20 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: None, scalar: ( @@ -389,7 +389,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -405,9 +405,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -417,28 +417,28 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -450,11 +450,11 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: None, scalar: ( @@ -466,7 +466,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -482,9 +482,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 16, + base: 15, space: Uniform, )), ), @@ -494,28 +494,28 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 15, + base: 14, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -527,20 +527,20 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: None, scalar: ( @@ -552,7 +552,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -650,7 +650,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(15), + ty: Handle(14), ), ( uniformity: ( @@ -659,17 +659,17 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(16), + ty: Handle(15), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 7, assignable_global: None, ty: Value(Pointer( - base: 16, + base: 15, space: Function, )), ), @@ -687,31 +687,31 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), @@ -803,23 +803,23 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(15), + ty: Handle(14), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -862,28 +862,28 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -926,19 +926,19 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -954,7 +954,7 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -982,19 +982,19 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -1010,16 +1010,16 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -1047,28 +1047,28 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -1084,7 +1084,7 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -1112,28 +1112,28 @@ ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 15, + base: 14, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -1149,16 +1149,16 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(50), + non_uniform_result: Some(49), requirements: (""), ), ref_count: 1, @@ -1219,13 +1219,13 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 14, assignable_global: None, ty: Value(Pointer( - base: 3, + base: 2, space: Function, )), ), @@ -1243,21 +1243,21 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -1265,9 +1265,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1277,9 +1277,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1290,7 +1290,7 @@ ), ref_count: 0, assignable_global: None, - ty: Handle(19), + ty: Handle(18), ), ( uniformity: ( @@ -1298,9 +1298,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1310,9 +1310,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1322,9 +1322,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), @@ -1335,7 +1335,7 @@ ), ref_count: 0, assignable_global: None, - ty: Handle(18), + ty: Handle(17), ), ( uniformity: ( @@ -1343,9 +1343,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1355,9 +1355,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1367,9 +1367,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), @@ -1379,7 +1379,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -1410,9 +1410,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1422,9 +1422,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1434,28 +1434,28 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -1467,7 +1467,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -1486,9 +1486,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1498,9 +1498,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1510,9 +1510,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), @@ -1522,7 +1522,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -1538,7 +1538,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1566,9 +1566,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1578,9 +1578,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1590,9 +1590,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), @@ -1602,7 +1602,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -1614,20 +1614,20 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1639,7 +1639,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -1655,9 +1655,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1667,9 +1667,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1679,28 +1679,28 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -1712,11 +1712,11 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1728,7 +1728,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -1744,9 +1744,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 20, + base: 19, space: Uniform, )), ), @@ -1756,9 +1756,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 19, + base: 18, space: Uniform, )), ), @@ -1768,28 +1768,28 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 18, + base: 17, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: Some(Bi), scalar: ( @@ -1801,20 +1801,20 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1826,7 +1826,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 0, @@ -1843,7 +1843,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(19), + ty: Handle(18), ), ( uniformity: ( @@ -1852,17 +1852,17 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(20), + ty: Handle(19), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 8, assignable_global: None, ty: Value(Pointer( - base: 20, + base: 19, space: Function, )), ), @@ -1880,31 +1880,31 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), @@ -1915,29 +1915,29 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(19), + ty: Handle(18), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), @@ -2056,35 +2056,35 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(18), + ty: Handle(17), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2127,40 +2127,40 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2203,31 +2203,31 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2243,7 +2243,7 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2271,31 +2271,31 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2311,16 +2311,16 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2348,40 +2348,40 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2397,7 +2397,7 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2425,40 +2425,40 @@ ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 19, + base: 18, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 18, + base: 17, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2474,16 +2474,16 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(54), + non_uniform_result: Some(53), requirements: (""), ), ref_count: 1, @@ -2517,7 +2517,7 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), may_kill: false, @@ -2532,21 +2532,21 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(22), + ty: Handle(21), ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(21), + ty: Handle(20), ), ], sampling: [], @@ -2556,7 +2556,7 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), may_kill: false, @@ -2571,30 +2571,30 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(24), + ty: Handle(23), ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(23), + ty: Handle(22), ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(21), + ty: Handle(20), ), ], sampling: [], @@ -2619,12 +2619,12 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(27), + ty: Handle(26), ), ( uniformity: ( @@ -2661,12 +2661,12 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(29), + ty: Handle(28), ), ( uniformity: ( @@ -2729,7 +2729,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(28), + ty: Handle(27), ), ], sampling: [], @@ -2741,7 +2741,7 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), may_kill: false, @@ -2756,12 +2756,12 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 2, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -2777,24 +2777,24 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 3, assignable_global: None, ty: Value(Pointer( - base: 21, + base: 20, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 0, assignable_global: None, - ty: Handle(21), + ty: Handle(20), ), ( uniformity: ( @@ -2810,13 +2810,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -2824,13 +2824,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 6, + base: 5, space: Storage( access: ("LOAD | STORE"), ), @@ -2838,22 +2838,22 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(6), + ty: Handle(5), ), ( uniformity: ( - non_uniform_result: Some(9), + non_uniform_result: Some(8), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -2861,13 +2861,13 @@ ), ( uniformity: ( - non_uniform_result: Some(9), + non_uniform_result: Some(8), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD | STORE"), ), @@ -2875,12 +2875,12 @@ ), ( uniformity: ( - non_uniform_result: Some(9), + non_uniform_result: Some(8), requirements: (""), ), ref_count: 0, assignable_global: None, - ty: Handle(12), + ty: Handle(11), ), ( uniformity: ( @@ -2896,13 +2896,13 @@ ), ( uniformity: ( - non_uniform_result: Some(13), + non_uniform_result: Some(12), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -2910,13 +2910,13 @@ ), ( uniformity: ( - non_uniform_result: Some(13), + non_uniform_result: Some(12), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 6, + base: 5, space: Storage( access: ("LOAD | STORE"), ), @@ -2924,11 +2924,11 @@ ), ( uniformity: ( - non_uniform_result: Some(13), + non_uniform_result: Some(12), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(ValuePointer( size: Some(Tri), scalar: ( @@ -2942,11 +2942,11 @@ ), ( uniformity: ( - non_uniform_result: Some(13), + non_uniform_result: Some(12), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(ValuePointer( size: None, scalar: ( @@ -2960,7 +2960,7 @@ ), ( uniformity: ( - non_uniform_result: Some(13), + non_uniform_result: Some(12), requirements: (""), ), ref_count: 1, @@ -2972,13 +2972,13 @@ ), ( uniformity: ( - non_uniform_result: Some(18), + non_uniform_result: Some(17), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -2986,13 +2986,13 @@ ), ( uniformity: ( - non_uniform_result: Some(18), + non_uniform_result: Some(17), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 13, + base: 12, space: Storage( access: ("LOAD | STORE"), ), @@ -3000,13 +3000,13 @@ ), ( uniformity: ( - non_uniform_result: Some(20), + non_uniform_result: Some(19), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -3014,13 +3014,13 @@ ), ( uniformity: ( - non_uniform_result: Some(20), + non_uniform_result: Some(19), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 13, + base: 12, space: Storage( access: ("LOAD | STORE"), ), @@ -3028,7 +3028,7 @@ ), ( uniformity: ( - non_uniform_result: Some(20), + non_uniform_result: Some(19), requirements: (""), ), ref_count: 1, @@ -3052,7 +3052,7 @@ ), ( uniformity: ( - non_uniform_result: Some(20), + non_uniform_result: Some(19), requirements: (""), ), ref_count: 1, @@ -3064,13 +3064,13 @@ ), ( uniformity: ( - non_uniform_result: Some(18), + non_uniform_result: Some(17), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 5, + base: 4, space: Storage( access: ("LOAD | STORE"), ), @@ -3078,13 +3078,13 @@ ), ( uniformity: ( - non_uniform_result: Some(18), + non_uniform_result: Some(17), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 3, + base: 2, space: Storage( access: ("LOAD | STORE"), ), @@ -3092,22 +3092,22 @@ ), ( uniformity: ( - non_uniform_result: Some(18), + non_uniform_result: Some(17), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(28), + non_uniform_result: Some(27), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 17, + base: 16, space: Storage( access: ("LOAD | STORE"), ), @@ -3115,22 +3115,22 @@ ), ( uniformity: ( - non_uniform_result: Some(28), + non_uniform_result: Some(27), requirements: (""), ), ref_count: 0, assignable_global: None, - ty: Handle(17), + ty: Handle(16), ), ( uniformity: ( - non_uniform_result: Some(30), + non_uniform_result: Some(29), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -3138,13 +3138,13 @@ ), ( uniformity: ( - non_uniform_result: Some(30), + non_uniform_result: Some(29), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 13, + base: 12, space: Storage( access: ("LOAD | STORE"), ), @@ -3152,13 +3152,13 @@ ), ( uniformity: ( - non_uniform_result: Some(30), + non_uniform_result: Some(29), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 5, + base: 4, space: Storage( access: ("LOAD | STORE"), ), @@ -3166,13 +3166,13 @@ ), ( uniformity: ( - non_uniform_result: Some(30), + non_uniform_result: Some(29), requirements: (""), ), ref_count: 0, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 3, + base: 2, space: Storage( access: ("LOAD | STORE"), ), @@ -3180,16 +3180,16 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 0, assignable_global: None, - ty: Handle(21), + ty: Handle(20), ), ( uniformity: ( - non_uniform_result: Some(13), + non_uniform_result: Some(12), requirements: (""), ), ref_count: 1, @@ -3237,22 +3237,22 @@ ), ( uniformity: ( - non_uniform_result: Some(18), + non_uniform_result: Some(17), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(26), + ty: Handle(25), ), ( uniformity: ( - non_uniform_result: Some(40), + non_uniform_result: Some(39), requirements: (""), ), ref_count: 3, assignable_global: None, ty: Value(Pointer( - base: 26, + base: 25, space: Function, )), ), @@ -3270,22 +3270,22 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(40), + non_uniform_result: Some(39), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 3, + base: 2, space: Function, )), ), @@ -3303,24 +3303,24 @@ ), ( uniformity: ( - non_uniform_result: Some(40), + non_uniform_result: Some(39), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 3, + base: 2, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(40), + non_uniform_result: Some(39), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -3329,20 +3329,20 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(24), + ty: Handle(23), ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 0, assignable_global: None, - ty: Handle(21), + ty: Handle(20), ), ( uniformity: ( - non_uniform_result: Some(40), + non_uniform_result: Some(39), requirements: (""), ), ref_count: 1, @@ -3357,7 +3357,7 @@ ), ( uniformity: ( - non_uniform_result: Some(40), + non_uniform_result: Some(39), requirements: (""), ), ref_count: 1, @@ -3372,7 +3372,7 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, @@ -3399,12 +3399,12 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(25), + ty: Handle(24), ), ], sampling: [], @@ -3429,13 +3429,13 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -3443,13 +3443,13 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 6, + base: 5, space: Storage( access: ("LOAD | STORE"), ), @@ -3457,11 +3457,11 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(ValuePointer( size: Some(Tri), scalar: ( @@ -3475,11 +3475,11 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(ValuePointer( size: None, scalar: ( @@ -3505,13 +3505,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -3519,13 +3519,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 6, + base: 5, space: Storage( access: ("LOAD | STORE"), ), @@ -3646,17 +3646,17 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(6), + ty: Handle(5), ), ( uniformity: ( - non_uniform_result: Some(17), + non_uniform_result: Some(16), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -3664,13 +3664,13 @@ ), ( uniformity: ( - non_uniform_result: Some(17), + non_uniform_result: Some(16), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD | STORE"), ), @@ -3737,17 +3737,17 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(12), + ty: Handle(11), ), ( uniformity: ( - non_uniform_result: Some(24), + non_uniform_result: Some(23), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 14, + base: 13, space: Storage( access: ("LOAD | STORE"), ), @@ -3755,13 +3755,13 @@ ), ( uniformity: ( - non_uniform_result: Some(24), + non_uniform_result: Some(23), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 13, + base: 12, space: Storage( access: ("LOAD | STORE"), ), @@ -3769,13 +3769,13 @@ ), ( uniformity: ( - non_uniform_result: Some(24), + non_uniform_result: Some(23), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 5, + base: 4, space: Storage( access: ("LOAD | STORE"), ), @@ -3783,13 +3783,13 @@ ), ( uniformity: ( - non_uniform_result: Some(24), + non_uniform_result: Some(23), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 3, + base: 2, space: Storage( access: ("LOAD | STORE"), ), @@ -3809,13 +3809,13 @@ ), ( uniformity: ( - non_uniform_result: Some(29), + non_uniform_result: Some(28), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 17, + base: 16, space: Storage( access: ("LOAD | STORE"), ), @@ -3828,7 +3828,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(17), + ty: Handle(16), ), ( uniformity: ( @@ -3892,13 +3892,13 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 1, + base: 0, space: Function, )), ), @@ -3963,17 +3963,17 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(28), + ty: Handle(27), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 28, + base: 27, space: Function, )), ), @@ -3999,11 +3999,11 @@ kind: Uint, width: 4, ))), - Handle(2), + Handle(1), Value(Scalar(( kind: Sint, width: 4, ))), - Handle(4), + Handle(3), ], ) \ No newline at end of file diff --git a/naga/tests/out/analysis/collatz.info.ron b/naga/tests/out/analysis/collatz.info.ron index 040e71c7e7..94b879fcb8 100644 --- a/naga/tests/out/analysis/collatz.info.ron +++ b/naga/tests/out/analysis/collatz.info.ron @@ -10,7 +10,7 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), may_kill: false, @@ -21,22 +21,22 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 7, assignable_global: None, ty: Value(Pointer( - base: 1, + base: 0, space: Function, )), ), @@ -54,24 +54,24 @@ ), ( uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), ref_count: 3, assignable_global: None, ty: Value(Pointer( - base: 1, + base: 0, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -87,7 +87,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, @@ -99,12 +99,12 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -120,12 +120,12 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -141,7 +141,7 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, @@ -153,12 +153,12 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -174,12 +174,12 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -195,21 +195,21 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -225,21 +225,21 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -255,21 +255,21 @@ ), ( uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ], sampling: [], @@ -281,7 +281,7 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), may_kill: false, @@ -292,22 +292,22 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 2, assignable_global: None, - ty: Handle(4), + ty: Handle(3), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 3, + base: 2, space: Storage( access: ("LOAD | STORE"), ), @@ -315,13 +315,13 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 2, + base: 1, space: Storage( access: ("LOAD | STORE"), ), @@ -329,7 +329,7 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, @@ -341,13 +341,13 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 1, + base: 0, space: Storage( access: ("LOAD | STORE"), ), @@ -355,13 +355,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 3, + base: 2, space: Storage( access: ("LOAD | STORE"), ), @@ -369,13 +369,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 2, + base: 1, space: Storage( access: ("LOAD | STORE"), ), @@ -383,7 +383,7 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, @@ -395,13 +395,13 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 1, + base: 0, space: Storage( access: ("LOAD | STORE"), ), @@ -409,21 +409,21 @@ ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ], sampling: [], diff --git a/naga/tests/out/analysis/overrides.info.ron b/naga/tests/out/analysis/overrides.info.ron index 12fa4b339f..848d1780ed 100644 --- a/naga/tests/out/analysis/overrides.info.ron +++ b/naga/tests/out/analysis/overrides.info.ron @@ -26,7 +26,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( @@ -59,7 +59,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -68,40 +68,40 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(6), + non_uniform_result: Some(5), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 1, + base: 0, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(7), + non_uniform_result: Some(6), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), + assignable_global: Some(0), ty: Value(Pointer( - base: 2, + base: 1, space: Private, )), ), ( uniformity: ( - non_uniform_result: Some(7), + non_uniform_result: Some(6), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( @@ -117,7 +117,7 @@ ), ( uniformity: ( - non_uniform_result: Some(7), + non_uniform_result: Some(6), requirements: (""), ), ref_count: 1, @@ -129,25 +129,25 @@ ), ( uniformity: ( - non_uniform_result: Some(11), + non_uniform_result: Some(10), requirements: (""), ), ref_count: 1, assignable_global: None, ty: Value(Pointer( - base: 2, + base: 1, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(12), + non_uniform_result: Some(11), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), + assignable_global: Some(1), ty: Value(Pointer( - base: 2, + base: 1, space: Private, )), ), @@ -158,7 +158,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ], sampling: [], @@ -178,17 +178,17 @@ kind: Float, width: 4, ))), - Handle(2), + Handle(1), Value(Scalar(( kind: Float, width: 4, ))), - Handle(2), + Handle(1), Value(Scalar(( kind: Float, width: 4, ))), - Handle(2), + Handle(1), Value(Scalar(( kind: Float, width: 4, diff --git a/naga/tests/out/analysis/shadow.info.ron b/naga/tests/out/analysis/shadow.info.ron index bd46d9187f..fb14beb1cb 100644 --- a/naga/tests/out/analysis/shadow.info.ron +++ b/naga/tests/out/analysis/shadow.info.ron @@ -20,14 +20,14 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), may_kill: false, sampling_set: [ ( - image: 1, - sampler: 2, + image: 0, + sampler: 1, ), ], global_uses: [ @@ -42,21 +42,21 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, - assignable_global: Some(1), - ty: Handle(6), + assignable_global: Some(0), + ty: Handle(5), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(2), - ty: Handle(14), + assignable_global: Some(1), + ty: Handle(13), ), ( uniformity: ( @@ -65,7 +65,7 @@ ), ref_count: 2, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -74,7 +74,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -83,7 +83,7 @@ ), ref_count: 3, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -92,29 +92,29 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(7), + non_uniform_result: Some(6), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 6, assignable_global: None, - ty: Handle(4), + ty: Handle(3), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -126,7 +126,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -138,7 +138,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -150,7 +150,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -162,12 +162,12 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(5), + ty: Handle(4), ), ( uniformity: ( @@ -176,20 +176,20 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(5), + ty: Handle(4), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(5), + ty: Handle(4), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -201,21 +201,21 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(5), + ty: Handle(4), ), ( uniformity: ( @@ -234,16 +234,16 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 2, assignable_global: None, - ty: Handle(5), + ty: Handle(4), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -255,7 +255,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -267,7 +267,7 @@ ), ( uniformity: ( - non_uniform_result: Some(7), + non_uniform_result: Some(6), requirements: (""), ), ref_count: 1, @@ -279,7 +279,7 @@ ), ( uniformity: ( - non_uniform_result: Some(7), + non_uniform_result: Some(6), requirements: (""), ), ref_count: 1, @@ -291,16 +291,16 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 3, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -312,7 +312,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -324,25 +324,25 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -354,7 +354,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -366,16 +366,16 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(5), + ty: Handle(4), ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -387,7 +387,7 @@ ), ( uniformity: ( - non_uniform_result: Some(8), + non_uniform_result: Some(7), requirements: (""), ), ref_count: 1, @@ -399,7 +399,7 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, @@ -417,14 +417,14 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), may_kill: false, sampling_set: [ ( - image: 1, - sampler: 2, + image: 0, + sampler: 1, ), ], global_uses: [ @@ -443,33 +443,33 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 9, + base: 8, space: Uniform, )), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(6), + assignable_global: Some(5), ty: Value(Pointer( - base: 2, + base: 1, space: Private, )), ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 4, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 4, + base: 3, space: Private, )), ), @@ -479,9 +479,9 @@ requirements: (""), ), ref_count: 7, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 13, + base: 12, space: Storage( access: ("LOAD"), ), @@ -489,13 +489,13 @@ ), ( uniformity: ( - non_uniform_result: Some(5), + non_uniform_result: Some(4), requirements: (""), ), ref_count: 1, - assignable_global: Some(7), + assignable_global: Some(6), ty: Value(Pointer( - base: 4, + base: 3, space: Private, )), ), @@ -506,7 +506,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -515,7 +515,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -524,7 +524,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -533,7 +533,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -542,7 +542,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -551,7 +551,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -560,7 +560,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -569,7 +569,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -578,7 +578,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -587,7 +587,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -596,7 +596,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -605,7 +605,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -614,7 +614,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(7), + ty: Handle(6), ), ( uniformity: ( @@ -623,7 +623,7 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -632,17 +632,17 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(21), + non_uniform_result: Some(20), requirements: (""), ), ref_count: 3, assignable_global: None, ty: Value(Pointer( - base: 2, + base: 1, space: Function, )), ), @@ -653,28 +653,28 @@ ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 11, assignable_global: None, ty: Value(Pointer( - base: 3, + base: 2, space: Function, )), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -682,9 +682,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(Pointer( - base: 8, + base: 7, space: Uniform, )), ), @@ -694,7 +694,7 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(3), + assignable_global: Some(2), ty: Value(ValuePointer( size: None, scalar: ( @@ -730,7 +730,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -742,21 +742,21 @@ ), ( uniformity: ( - non_uniform_result: Some(21), + non_uniform_result: Some(20), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( @@ -764,9 +764,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -774,22 +774,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -797,13 +797,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 10, + base: 9, space: Storage( access: ("LOAD"), ), @@ -811,25 +811,25 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(10), + ty: Handle(9), ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(4), + ty: Handle(3), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -844,30 +844,30 @@ ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( @@ -875,9 +875,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -885,22 +885,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -908,13 +908,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD"), ), @@ -922,11 +922,11 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(ValuePointer( size: None, scalar: ( @@ -940,7 +940,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -956,9 +956,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -966,22 +966,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -989,13 +989,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD"), ), @@ -1003,11 +1003,11 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(ValuePointer( size: None, scalar: ( @@ -1021,7 +1021,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -1037,9 +1037,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -1047,22 +1047,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -1070,13 +1070,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD"), ), @@ -1084,11 +1084,11 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(ValuePointer( size: None, scalar: ( @@ -1102,7 +1102,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -1114,20 +1114,20 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1139,7 +1139,7 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, @@ -1151,11 +1151,11 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1167,7 +1167,7 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, @@ -1179,11 +1179,11 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(ValuePointer( size: None, scalar: ( @@ -1195,7 +1195,7 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, @@ -1207,34 +1207,34 @@ ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, @@ -1246,21 +1246,21 @@ ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(1), + ty: Handle(0), ), ( uniformity: ( @@ -1268,9 +1268,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -1278,22 +1278,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -1301,13 +1301,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD"), ), @@ -1315,11 +1315,11 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(ValuePointer( size: None, scalar: ( @@ -1333,7 +1333,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -1349,9 +1349,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -1359,22 +1359,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -1382,13 +1382,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD"), ), @@ -1396,11 +1396,11 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(ValuePointer( size: None, scalar: ( @@ -1414,7 +1414,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -1430,9 +1430,9 @@ requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 12, + base: 11, space: Storage( access: ("LOAD"), ), @@ -1440,22 +1440,22 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 11, + base: 10, space: Storage( access: ("LOAD"), ), @@ -1463,13 +1463,13 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD"), ), @@ -1477,11 +1477,11 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, - assignable_global: Some(4), + assignable_global: Some(3), ty: Value(ValuePointer( size: None, scalar: ( @@ -1495,7 +1495,7 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, @@ -1507,66 +1507,66 @@ ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(21), + non_uniform_result: Some(20), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(23), + non_uniform_result: Some(22), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(3), + ty: Handle(2), ), ( uniformity: ( - non_uniform_result: Some(21), + non_uniform_result: Some(20), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(21), + non_uniform_result: Some(20), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(4), + ty: Handle(3), ), ], sampling: [], @@ -1578,14 +1578,14 @@ flags: ("EXPRESSIONS | BLOCKS | CONTROL_FLOW_UNIFORMITY | STRUCT_LAYOUTS | CONSTANTS | BINDINGS"), available_stages: ("VERTEX | FRAGMENT | COMPUTE"), uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), may_kill: false, sampling_set: [ ( - image: 1, - sampler: 2, + image: 0, + sampler: 1, ), ], global_uses: [ @@ -1600,66 +1600,66 @@ expressions: [ ( uniformity: ( - non_uniform_result: Some(1), + non_uniform_result: Some(0), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(2), + ty: Handle(1), ), ( uniformity: ( - non_uniform_result: Some(2), + non_uniform_result: Some(1), requirements: (""), ), ref_count: 1, - assignable_global: Some(6), + assignable_global: Some(5), ty: Value(Pointer( - base: 2, + base: 1, space: Private, )), ), ( uniformity: ( - non_uniform_result: Some(3), + non_uniform_result: Some(2), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(4), + ty: Handle(3), ), ( uniformity: ( - non_uniform_result: Some(4), + non_uniform_result: Some(3), requirements: (""), ), ref_count: 1, - assignable_global: Some(5), + assignable_global: Some(4), ty: Value(Pointer( - base: 4, + base: 3, space: Private, )), ), ( uniformity: ( - non_uniform_result: Some(5), + non_uniform_result: Some(4), requirements: (""), ), ref_count: 1, - assignable_global: Some(7), + assignable_global: Some(6), ty: Value(Pointer( - base: 4, + base: 3, space: Private, )), ), ( uniformity: ( - non_uniform_result: Some(5), + non_uniform_result: Some(4), requirements: (""), ), ref_count: 1, assignable_global: None, - ty: Handle(4), + ty: Handle(3), ), ], sampling: [], @@ -1687,10 +1687,10 @@ kind: Float, width: 4, ))), + Handle(0), + Handle(0), + Handle(0), Handle(1), - Handle(1), - Handle(1), - Handle(2), Value(Scalar(( kind: Uint, width: 4, diff --git a/naga/tests/out/ir/access.compact.ron b/naga/tests/out/ir/access.compact.ron index 4bae535e64..fd9405f2d0 100644 --- a/naga/tests/out/ir/access.compact.ron +++ b/naga/tests/out/ir/access.compact.ron @@ -30,19 +30,19 @@ members: [ ( name: Some("a"), - ty: 1, + ty: 0, binding: None, offset: 0, ), ( name: Some("b"), - ty: 2, + ty: 1, binding: None, offset: 16, ), ( name: Some("c"), - ty: 3, + ty: 2, binding: None, offset: 28, ), @@ -56,7 +56,7 @@ members: [ ( name: Some("value"), - ty: 3, + ty: 2, binding: None, offset: 0, ), @@ -89,7 +89,7 @@ ( name: None, inner: Array( - base: 7, + base: 6, size: Constant(2), stride: 16, ), @@ -104,7 +104,7 @@ ( name: None, inner: Array( - base: 9, + base: 8, size: Constant(10), stride: 4, ), @@ -122,7 +122,7 @@ ( name: None, inner: Array( - base: 11, + base: 10, size: Constant(2), stride: 8, ), @@ -130,7 +130,7 @@ ( name: None, inner: Array( - base: 5, + base: 4, size: Dynamic, stride: 8, ), @@ -141,37 +141,37 @@ members: [ ( name: Some("_matrix"), - ty: 6, + ty: 5, binding: None, offset: 0, ), ( name: Some("matrix_array"), - ty: 8, + ty: 7, binding: None, offset: 64, ), ( name: Some("atom"), - ty: 9, + ty: 8, binding: None, offset: 96, ), ( name: Some("atom_arr"), - ty: 10, + ty: 9, binding: None, offset: 100, ), ( name: Some("arr"), - ty: 12, + ty: 11, binding: None, offset: 144, ), ( name: Some("data"), - ty: 13, + ty: 12, binding: None, offset: 160, ), @@ -196,7 +196,7 @@ members: [ ( name: Some("m"), - ty: 15, + ty: 14, binding: None, offset: 0, ), @@ -228,7 +228,7 @@ ( name: None, inner: Array( - base: 18, + base: 17, size: Constant(2), stride: 32, ), @@ -239,7 +239,7 @@ members: [ ( name: Some("am"), - ty: 19, + ty: 18, binding: None, offset: 0, ), @@ -257,14 +257,14 @@ ( name: None, inner: Pointer( - base: 21, + base: 20, space: Function, ), ), ( name: None, inner: Array( - base: 21, + base: 20, size: Constant(10), stride: 4, ), @@ -272,7 +272,7 @@ ( name: None, inner: Array( - base: 23, + base: 22, size: Constant(5), stride: 40, ), @@ -290,7 +290,7 @@ ( name: None, inner: Array( - base: 3, + base: 2, size: Constant(5), stride: 4, ), @@ -298,14 +298,14 @@ ( name: None, inner: Pointer( - base: 1, + base: 0, space: Function, ), ), ( name: None, inner: Array( - base: 25, + base: 24, size: Constant(2), stride: 16, ), @@ -313,7 +313,7 @@ ( name: None, inner: Pointer( - base: 28, + base: 27, space: Function, ), ), @@ -330,8 +330,8 @@ name: Some("global_const"), space: Private, binding: None, - ty: 4, - init: Some(7), + ty: 3, + init: Some(6), ), ( name: Some("bar"), @@ -342,7 +342,7 @@ group: 0, binding: 0, )), - ty: 14, + ty: 13, init: None, ), ( @@ -352,7 +352,7 @@ group: 0, binding: 1, )), - ty: 16, + ty: 15, init: None, ), ( @@ -364,7 +364,7 @@ group: 0, binding: 2, )), - ty: 17, + ty: 16, init: None, ), ( @@ -374,7 +374,7 @@ group: 0, binding: 3, )), - ty: 20, + ty: 19, init: None, ), ], @@ -384,20 +384,20 @@ Literal(U32(0)), Literal(U32(0)), Compose( - ty: 2, + ty: 1, components: [ + 1, 2, 3, - 4, ], ), Literal(I32(0)), Compose( - ty: 4, + ty: 3, components: [ - 1, + 0, + 4, 5, - 6, ], ), ], @@ -409,306 +409,306 @@ local_variables: [ ( name: Some("idx"), - ty: 3, - init: Some(1), + ty: 2, + init: Some(0), ), ( name: Some("t"), - ty: 16, - init: Some(49), + ty: 15, + init: Some(48), ), ], expressions: [ Literal(I32(1)), - LocalVariable(1), + LocalVariable(0), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Subtract, - left: 4, - right: 3, + left: 3, + right: 2, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 7, + pointer: 6, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 9, + base: 8, index: 0, ), AccessIndex( - base: 10, + base: 9, index: 0, ), Load( - pointer: 11, + pointer: 10, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 13, + base: 12, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 14, - index: 15, + base: 13, + index: 14, ), Load( - pointer: 16, + pointer: 15, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 18, + base: 17, index: 0, ), AccessIndex( - base: 19, + base: 18, index: 0, ), AccessIndex( - base: 20, + base: 19, index: 1, ), Load( - pointer: 21, + pointer: 20, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 23, + base: 22, index: 0, ), AccessIndex( - base: 24, + base: 23, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 25, - index: 26, + base: 24, + index: 25, ), Load( - pointer: 27, + pointer: 26, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 29, + base: 28, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 30, - index: 31, + base: 29, + index: 30, ), AccessIndex( - base: 32, + base: 31, index: 1, ), Load( - pointer: 33, + pointer: 32, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 35, + base: 34, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 36, - index: 37, + base: 35, + index: 36, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 38, - index: 39, + base: 37, + index: 38, ), Load( - pointer: 40, + pointer: 39, ), Literal(F32(1.0)), Splat( size: Bi, - value: 42, + value: 41, ), Literal(F32(2.0)), Splat( size: Bi, - value: 44, + value: 43, ), Literal(F32(3.0)), Splat( size: Bi, - value: 46, + value: 45, ), Compose( - ty: 15, + ty: 14, components: [ - 43, - 45, - 47, + 42, + 44, + 46, ], ), Compose( - ty: 16, + ty: 15, components: [ - 48, + 47, ], ), - LocalVariable(2), + LocalVariable(1), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Add, - left: 52, - right: 51, + left: 51, + right: 50, ), AccessIndex( - base: 50, + base: 49, index: 0, ), Literal(F32(6.0)), Splat( size: Bi, - value: 55, + value: 54, ), Literal(F32(5.0)), Splat( size: Bi, - value: 57, + value: 56, ), Literal(F32(4.0)), Splat( size: Bi, - value: 59, + value: 58, ), Compose( - ty: 15, + ty: 14, components: [ - 56, - 58, - 60, + 55, + 57, + 59, ], ), AccessIndex( - base: 50, + base: 49, index: 0, ), AccessIndex( - base: 62, + base: 61, index: 0, ), Literal(F32(9.0)), Splat( size: Bi, - value: 64, + value: 63, ), AccessIndex( - base: 50, + base: 49, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 66, - index: 67, + base: 65, + index: 66, ), Literal(F32(90.0)), Splat( size: Bi, - value: 69, + value: 68, ), AccessIndex( - base: 50, + base: 49, index: 0, ), AccessIndex( - base: 71, + base: 70, index: 0, ), AccessIndex( - base: 72, + base: 71, index: 1, ), Literal(F32(10.0)), AccessIndex( - base: 50, + base: 49, index: 0, ), AccessIndex( - base: 75, + base: 74, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 76, - index: 77, + base: 75, + index: 76, ), Literal(F32(20.0)), AccessIndex( - base: 50, + base: 49, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 80, - index: 81, + base: 79, + index: 80, ), AccessIndex( - base: 82, + base: 81, index: 1, ), Literal(F32(30.0)), AccessIndex( - base: 50, + base: 49, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 85, - index: 86, + base: 84, + index: 85, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 87, - index: 88, + base: 86, + index: 87, ), Literal(F32(40.0)), ], named_expressions: { - 8: "l0", - 12: "l1", - 17: "l2", - 22: "l3", - 28: "l4", - 34: "l5", - 41: "l6", + 7: "l0", + 11: "l1", + 16: "l2", + 21: "l3", + 27: "l4", + 33: "l5", + 40: "l6", }, body: [ Emit(( @@ -716,8 +716,8 @@ end: 5, )), Store( - pointer: 2, - value: 5, + pointer: 1, + value: 4, ), Emit(( start: 6, @@ -784,8 +784,8 @@ end: 53, )), Store( - pointer: 2, - value: 53, + pointer: 1, + value: 52, ), Emit(( start: 53, @@ -804,8 +804,8 @@ end: 61, )), Store( - pointer: 54, - value: 61, + pointer: 53, + value: 60, ), Emit(( start: 61, @@ -820,8 +820,8 @@ end: 65, )), Store( - pointer: 63, - value: 65, + pointer: 62, + value: 64, ), Emit(( start: 65, @@ -832,8 +832,8 @@ end: 70, )), Store( - pointer: 68, - value: 70, + pointer: 67, + value: 69, ), Emit(( start: 70, @@ -848,8 +848,8 @@ end: 73, )), Store( - pointer: 73, - value: 74, + pointer: 72, + value: 73, ), Emit(( start: 74, @@ -860,8 +860,8 @@ end: 78, )), Store( - pointer: 78, - value: 79, + pointer: 77, + value: 78, ), Emit(( start: 79, @@ -872,16 +872,16 @@ end: 83, )), Store( - pointer: 83, - value: 84, + pointer: 82, + value: 83, ), Emit(( start: 84, end: 89, )), Store( - pointer: 89, - value: 90, + pointer: 88, + value: 89, ), Return( value: None, @@ -895,360 +895,360 @@ local_variables: [ ( name: Some("idx"), - ty: 3, - init: Some(1), + ty: 2, + init: Some(0), ), ( name: Some("t"), - ty: 20, - init: Some(53), + ty: 19, + init: Some(52), ), ], expressions: [ Literal(I32(1)), - LocalVariable(1), + LocalVariable(0), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Subtract, - left: 4, - right: 3, + left: 3, + right: 2, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 7, + pointer: 6, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 9, + base: 8, index: 0, ), AccessIndex( - base: 10, + base: 9, index: 0, ), Load( - pointer: 11, + pointer: 10, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 13, + base: 12, index: 0, ), AccessIndex( - base: 14, + base: 13, index: 0, ), AccessIndex( - base: 15, + base: 14, index: 0, ), Load( - pointer: 16, + pointer: 15, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 18, + base: 17, index: 0, ), AccessIndex( - base: 19, + base: 18, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 20, - index: 21, + base: 19, + index: 20, ), Load( - pointer: 22, + pointer: 21, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 24, + base: 23, index: 0, ), AccessIndex( - base: 25, + base: 24, index: 0, ), AccessIndex( - base: 26, + base: 25, index: 0, ), AccessIndex( - base: 27, + base: 26, index: 1, ), Load( - pointer: 28, + pointer: 27, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 30, + base: 29, index: 0, ), AccessIndex( - base: 31, + base: 30, index: 0, ), AccessIndex( - base: 32, + base: 31, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 33, - index: 34, + base: 32, + index: 33, ), Load( - pointer: 35, + pointer: 34, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 37, + base: 36, index: 0, ), AccessIndex( - base: 38, + base: 37, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 39, - index: 40, + base: 38, + index: 39, ), AccessIndex( - base: 41, + base: 40, index: 1, ), Load( - pointer: 42, + pointer: 41, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 44, + base: 43, index: 0, ), AccessIndex( - base: 45, + base: 44, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 46, - index: 47, + base: 45, + index: 46, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 48, - index: 49, + base: 47, + index: 48, ), Load( - pointer: 50, + pointer: 49, ), - ZeroValue(19), + ZeroValue(18), Compose( - ty: 20, + ty: 19, components: [ - 52, + 51, ], ), - LocalVariable(2), + LocalVariable(1), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Add, - left: 56, - right: 55, + left: 55, + right: 54, ), AccessIndex( - base: 54, + base: 53, index: 0, ), - ZeroValue(19), + ZeroValue(18), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 60, + base: 59, index: 0, ), Literal(F32(8.0)), Splat( size: Bi, - value: 62, + value: 61, ), Literal(F32(7.0)), Splat( size: Bi, - value: 64, + value: 63, ), Literal(F32(6.0)), Splat( size: Bi, - value: 66, + value: 65, ), Literal(F32(5.0)), Splat( size: Bi, - value: 68, + value: 67, ), Compose( - ty: 18, + ty: 17, components: [ - 63, - 65, - 67, - 69, + 62, + 64, + 66, + 68, ], ), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 71, + base: 70, index: 0, ), AccessIndex( - base: 72, + base: 71, index: 0, ), Literal(F32(9.0)), Splat( size: Bi, - value: 74, + value: 73, ), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 76, + base: 75, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 77, - index: 78, + base: 76, + index: 77, ), Literal(F32(90.0)), Splat( size: Bi, - value: 80, + value: 79, ), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 82, + base: 81, index: 0, ), AccessIndex( - base: 83, + base: 82, index: 0, ), AccessIndex( - base: 84, + base: 83, index: 1, ), Literal(F32(10.0)), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 87, + base: 86, index: 0, ), AccessIndex( - base: 88, + base: 87, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 89, - index: 90, + base: 88, + index: 89, ), Literal(F32(20.0)), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 93, + base: 92, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 94, - index: 95, + base: 93, + index: 94, ), AccessIndex( - base: 96, + base: 95, index: 1, ), Literal(F32(30.0)), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 99, + base: 98, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 100, - index: 101, + base: 99, + index: 100, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 102, - index: 103, + base: 101, + index: 102, ), Literal(F32(40.0)), ], named_expressions: { - 8: "l0", - 12: "l1", - 17: "l2", - 23: "l3", - 29: "l4", - 36: "l5", - 43: "l6", - 51: "l7", + 7: "l0", + 11: "l1", + 16: "l2", + 22: "l3", + 28: "l4", + 35: "l5", + 42: "l6", + 50: "l7", }, body: [ Emit(( @@ -1256,8 +1256,8 @@ end: 5, )), Store( - pointer: 2, - value: 5, + pointer: 1, + value: 4, ), Emit(( start: 6, @@ -1348,16 +1348,16 @@ end: 57, )), Store( - pointer: 2, - value: 57, + pointer: 1, + value: 56, ), Emit(( start: 57, end: 58, )), Store( - pointer: 58, - value: 59, + pointer: 57, + value: 58, ), Emit(( start: 59, @@ -1384,8 +1384,8 @@ end: 70, )), Store( - pointer: 61, - value: 70, + pointer: 60, + value: 69, ), Emit(( start: 70, @@ -1404,8 +1404,8 @@ end: 75, )), Store( - pointer: 73, - value: 75, + pointer: 72, + value: 74, ), Emit(( start: 75, @@ -1420,8 +1420,8 @@ end: 81, )), Store( - pointer: 79, - value: 81, + pointer: 78, + value: 80, ), Emit(( start: 81, @@ -1440,8 +1440,8 @@ end: 85, )), Store( - pointer: 85, - value: 86, + pointer: 84, + value: 85, ), Emit(( start: 86, @@ -1456,8 +1456,8 @@ end: 91, )), Store( - pointer: 91, - value: 92, + pointer: 90, + value: 91, ), Emit(( start: 92, @@ -1472,8 +1472,8 @@ end: 97, )), Store( - pointer: 97, - value: 98, + pointer: 96, + value: 97, ), Emit(( start: 98, @@ -1484,8 +1484,8 @@ end: 104, )), Store( - pointer: 104, - value: 105, + pointer: 103, + value: 104, ), Return( value: None, @@ -1497,23 +1497,23 @@ arguments: [ ( name: Some("foo"), - ty: 22, + ty: 21, binding: None, ), ], result: Some(( - ty: 21, + ty: 20, binding: None, )), local_variables: [], expressions: [ FunctionArgument(0), Load( - pointer: 1, + pointer: 0, ), ], named_expressions: { - 1: "foo", + 0: "foo", }, body: [ Emit(( @@ -1521,7 +1521,7 @@ end: 2, )), Return( - value: Some(2), + value: Some(1), ), ], ), @@ -1530,28 +1530,28 @@ arguments: [ ( name: Some("a"), - ty: 24, + ty: 23, binding: None, ), ], result: Some(( - ty: 21, + ty: 20, binding: None, )), local_variables: [], expressions: [ FunctionArgument(0), AccessIndex( - base: 1, + base: 0, index: 4, ), AccessIndex( - base: 2, + base: 1, index: 9, ), ], named_expressions: { - 1: "a", + 0: "a", }, body: [ Emit(( @@ -1563,7 +1563,7 @@ end: 3, )), Return( - value: Some(3), + value: Some(2), ), ], ), @@ -1572,7 +1572,7 @@ arguments: [ ( name: Some("p"), - ty: 27, + ty: 26, binding: None, ), ], @@ -1583,12 +1583,12 @@ Literal(U32(42)), ], named_expressions: { - 1: "p", + 0: "p", }, body: [ Store( - pointer: 1, - value: 2, + pointer: 0, + value: 1, ), Return( value: None, @@ -1600,7 +1600,7 @@ arguments: [ ( name: Some("foo"), - ty: 29, + ty: 28, binding: None, ), ], @@ -1611,23 +1611,23 @@ Literal(F32(1.0)), Splat( size: Quad, - value: 2, + value: 1, ), Literal(F32(2.0)), Splat( size: Quad, - value: 4, + value: 3, ), Compose( - ty: 28, + ty: 27, components: [ - 3, - 5, + 2, + 4, ], ), ], named_expressions: { - 1: "foo", + 0: "foo", }, body: [ Emit(( @@ -1647,8 +1647,8 @@ end: 6, )), Store( - pointer: 1, - value: 6, + pointer: 0, + value: 5, ), Return( value: None, @@ -1667,12 +1667,12 @@ arguments: [ ( name: Some("vi"), - ty: 1, + ty: 0, binding: Some(BuiltIn(VertexIndex)), ), ], result: Some(( - ty: 25, + ty: 24, binding: Some(BuiltIn(Position( invariant: false, ))), @@ -1680,104 +1680,104 @@ local_variables: [ ( name: Some("foo"), - ty: 21, - init: Some(2), + ty: 20, + init: Some(1), ), ( name: Some("c2"), - ty: 26, + ty: 25, init: None, ), ], expressions: [ FunctionArgument(0), Literal(F32(0.0)), - LocalVariable(1), + LocalVariable(0), Load( - pointer: 3, + pointer: 2, ), Literal(F32(1.0)), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 7, + pointer: 6, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 9, + base: 8, index: 4, ), Load( - pointer: 10, + pointer: 9, ), Literal(U32(3)), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 13, + base: 12, index: 0, ), Access( - base: 14, - index: 12, + base: 13, + index: 11, ), AccessIndex( - base: 15, + base: 14, index: 0, ), Load( - pointer: 16, + pointer: 15, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 18, + base: 17, index: 5, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 20, + base: 19, index: 5, ), - ArrayLength(21), + ArrayLength(20), Literal(U32(2)), Binary( op: Subtract, - left: 22, - right: 23, + left: 21, + right: 22, ), Access( - base: 19, - index: 24, + base: 18, + index: 23, ), AccessIndex( - base: 25, + base: 24, index: 0, ), Load( - pointer: 26, + pointer: 25, ), - GlobalVariable(4), + GlobalVariable(3), Load( - pointer: 28, + pointer: 27, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 30, + base: 29, index: 5, ), AccessIndex( - base: 31, + base: 30, index: 0, ), AccessIndex( - base: 32, + base: 31, index: 0, ), - CallResult(3), + CallResult(2), As( - expr: 17, + expr: 16, kind: Sint, convert: Some(4), ), @@ -1785,71 +1785,71 @@ Literal(I32(4)), Literal(I32(5)), Compose( - ty: 26, + ty: 25, components: [ - 27, + 26, + 34, 35, 36, 37, - 38, ], ), - LocalVariable(2), + LocalVariable(1), Literal(U32(1)), Binary( op: Add, - left: 1, - right: 41, + left: 0, + right: 40, ), Access( - base: 40, - index: 42, + base: 39, + index: 41, ), Literal(I32(42)), Access( - base: 40, - index: 1, + base: 39, + index: 0, ), Load( - pointer: 45, + pointer: 44, ), - ZeroValue(24), - CallResult(4), + ZeroValue(23), + CallResult(3), Splat( size: Quad, - value: 46, + value: 45, ), As( - expr: 49, + expr: 48, kind: Float, convert: Some(4), ), Binary( op: Multiply, - left: 8, - right: 50, + left: 7, + right: 49, ), Literal(F32(2.0)), Compose( - ty: 25, + ty: 24, components: [ + 50, 51, - 52, ], ), ], named_expressions: { - 1: "vi", - 4: "baz", - 8: "_matrix", - 11: "arr", - 12: "index", - 17: "b", - 27: "a", - 29: "c", - 33: "data_pointer", - 34: "foo_value", - 46: "value", + 0: "vi", + 3: "baz", + 7: "_matrix", + 10: "arr", + 11: "index", + 16: "b", + 26: "a", + 28: "c", + 32: "data_pointer", + 33: "foo_value", + 45: "value", }, body: [ Emit(( @@ -1857,16 +1857,16 @@ end: 4, )), Store( - pointer: 3, - value: 5, + pointer: 2, + value: 4, ), Call( - function: 1, + function: 0, arguments: [], result: None, ), Call( - function: 2, + function: 1, arguments: [], result: None, ), @@ -1907,11 +1907,11 @@ end: 33, )), Call( - function: 3, + function: 2, arguments: [ - 3, + 2, ], - result: Some(34), + result: Some(33), ), Emit(( start: 34, @@ -1922,27 +1922,27 @@ end: 39, )), Store( - pointer: 40, - value: 39, + pointer: 39, + value: 38, ), Emit(( start: 41, end: 43, )), Store( - pointer: 43, - value: 44, + pointer: 42, + value: 43, ), Emit(( start: 44, end: 46, )), Call( - function: 4, + function: 3, arguments: [ - 47, + 46, ], - result: Some(48), + result: Some(47), ), Emit(( start: 48, @@ -1953,7 +1953,7 @@ end: 53, )), Return( - value: Some(53), + value: Some(52), ), ], ), @@ -1967,7 +1967,7 @@ name: Some("foo_frag"), arguments: [], result: Some(( - ty: 25, + ty: 24, binding: Some(Location( location: 0, second_blend_source: false, @@ -1977,96 +1977,96 @@ )), local_variables: [], expressions: [ - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 1, + base: 0, index: 0, ), AccessIndex( - base: 2, + base: 1, index: 1, ), AccessIndex( - base: 3, + base: 2, index: 2, ), Literal(F32(1.0)), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 6, + base: 5, index: 0, ), Literal(F32(0.0)), Splat( size: Tri, - value: 8, + value: 7, ), Literal(F32(1.0)), Splat( size: Tri, - value: 10, + value: 9, ), Literal(F32(2.0)), Splat( size: Tri, - value: 12, + value: 11, ), Literal(F32(3.0)), Splat( size: Tri, - value: 14, + value: 13, ), Compose( - ty: 6, + ty: 5, components: [ - 9, - 11, - 13, - 15, + 8, + 10, + 12, + 14, ], ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 17, + base: 16, index: 4, ), Literal(U32(0)), Splat( size: Bi, - value: 19, + value: 18, ), Literal(U32(1)), Splat( size: Bi, - value: 21, + value: 20, ), Compose( - ty: 12, + ty: 11, components: [ - 20, - 22, + 19, + 21, ], ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 24, + base: 23, index: 5, ), AccessIndex( - base: 25, + base: 24, index: 1, ), AccessIndex( - base: 26, + base: 25, index: 0, ), Literal(I32(1)), - GlobalVariable(4), - ZeroValue(17), + GlobalVariable(3), + ZeroValue(16), Literal(F32(0.0)), Splat( size: Quad, - value: 31, + value: 30, ), ], named_expressions: {}, @@ -2080,8 +2080,8 @@ end: 4, )), Store( - pointer: 4, - value: 5, + pointer: 3, + value: 4, ), Emit(( start: 6, @@ -2104,8 +2104,8 @@ end: 16, )), Store( - pointer: 7, - value: 16, + pointer: 6, + value: 15, ), Emit(( start: 17, @@ -2120,8 +2120,8 @@ end: 23, )), Store( - pointer: 18, - value: 23, + pointer: 17, + value: 22, ), Emit(( start: 24, @@ -2132,19 +2132,19 @@ end: 27, )), Store( - pointer: 27, - value: 28, + pointer: 26, + value: 27, ), Store( - pointer: 29, - value: 30, + pointer: 28, + value: 29, ), Emit(( start: 31, end: 32, )), Return( - value: Some(32), + value: Some(31), ), ], ), @@ -2161,43 +2161,43 @@ local_variables: [ ( name: Some("val"), - ty: 1, - init: Some(1), + ty: 0, + init: Some(0), ), ( name: Some("arr"), - ty: 28, - init: Some(7), + ty: 27, + init: Some(6), ), ], expressions: [ Literal(U32(33)), - LocalVariable(1), + LocalVariable(0), Literal(F32(6.0)), Splat( size: Quad, - value: 3, + value: 2, ), Literal(F32(7.0)), Splat( size: Quad, - value: 5, + value: 4, ), Compose( - ty: 28, + ty: 27, components: [ - 4, - 6, + 3, + 5, ], ), - LocalVariable(2), + LocalVariable(1), ], named_expressions: {}, body: [ Call( - function: 5, + function: 4, arguments: [ - 2, + 1, ], result: None, ), @@ -2218,9 +2218,9 @@ end: 7, )), Call( - function: 6, + function: 5, arguments: [ - 8, + 7, ], result: None, ), diff --git a/naga/tests/out/ir/access.ron b/naga/tests/out/ir/access.ron index 4bae535e64..fd9405f2d0 100644 --- a/naga/tests/out/ir/access.ron +++ b/naga/tests/out/ir/access.ron @@ -30,19 +30,19 @@ members: [ ( name: Some("a"), - ty: 1, + ty: 0, binding: None, offset: 0, ), ( name: Some("b"), - ty: 2, + ty: 1, binding: None, offset: 16, ), ( name: Some("c"), - ty: 3, + ty: 2, binding: None, offset: 28, ), @@ -56,7 +56,7 @@ members: [ ( name: Some("value"), - ty: 3, + ty: 2, binding: None, offset: 0, ), @@ -89,7 +89,7 @@ ( name: None, inner: Array( - base: 7, + base: 6, size: Constant(2), stride: 16, ), @@ -104,7 +104,7 @@ ( name: None, inner: Array( - base: 9, + base: 8, size: Constant(10), stride: 4, ), @@ -122,7 +122,7 @@ ( name: None, inner: Array( - base: 11, + base: 10, size: Constant(2), stride: 8, ), @@ -130,7 +130,7 @@ ( name: None, inner: Array( - base: 5, + base: 4, size: Dynamic, stride: 8, ), @@ -141,37 +141,37 @@ members: [ ( name: Some("_matrix"), - ty: 6, + ty: 5, binding: None, offset: 0, ), ( name: Some("matrix_array"), - ty: 8, + ty: 7, binding: None, offset: 64, ), ( name: Some("atom"), - ty: 9, + ty: 8, binding: None, offset: 96, ), ( name: Some("atom_arr"), - ty: 10, + ty: 9, binding: None, offset: 100, ), ( name: Some("arr"), - ty: 12, + ty: 11, binding: None, offset: 144, ), ( name: Some("data"), - ty: 13, + ty: 12, binding: None, offset: 160, ), @@ -196,7 +196,7 @@ members: [ ( name: Some("m"), - ty: 15, + ty: 14, binding: None, offset: 0, ), @@ -228,7 +228,7 @@ ( name: None, inner: Array( - base: 18, + base: 17, size: Constant(2), stride: 32, ), @@ -239,7 +239,7 @@ members: [ ( name: Some("am"), - ty: 19, + ty: 18, binding: None, offset: 0, ), @@ -257,14 +257,14 @@ ( name: None, inner: Pointer( - base: 21, + base: 20, space: Function, ), ), ( name: None, inner: Array( - base: 21, + base: 20, size: Constant(10), stride: 4, ), @@ -272,7 +272,7 @@ ( name: None, inner: Array( - base: 23, + base: 22, size: Constant(5), stride: 40, ), @@ -290,7 +290,7 @@ ( name: None, inner: Array( - base: 3, + base: 2, size: Constant(5), stride: 4, ), @@ -298,14 +298,14 @@ ( name: None, inner: Pointer( - base: 1, + base: 0, space: Function, ), ), ( name: None, inner: Array( - base: 25, + base: 24, size: Constant(2), stride: 16, ), @@ -313,7 +313,7 @@ ( name: None, inner: Pointer( - base: 28, + base: 27, space: Function, ), ), @@ -330,8 +330,8 @@ name: Some("global_const"), space: Private, binding: None, - ty: 4, - init: Some(7), + ty: 3, + init: Some(6), ), ( name: Some("bar"), @@ -342,7 +342,7 @@ group: 0, binding: 0, )), - ty: 14, + ty: 13, init: None, ), ( @@ -352,7 +352,7 @@ group: 0, binding: 1, )), - ty: 16, + ty: 15, init: None, ), ( @@ -364,7 +364,7 @@ group: 0, binding: 2, )), - ty: 17, + ty: 16, init: None, ), ( @@ -374,7 +374,7 @@ group: 0, binding: 3, )), - ty: 20, + ty: 19, init: None, ), ], @@ -384,20 +384,20 @@ Literal(U32(0)), Literal(U32(0)), Compose( - ty: 2, + ty: 1, components: [ + 1, 2, 3, - 4, ], ), Literal(I32(0)), Compose( - ty: 4, + ty: 3, components: [ - 1, + 0, + 4, 5, - 6, ], ), ], @@ -409,306 +409,306 @@ local_variables: [ ( name: Some("idx"), - ty: 3, - init: Some(1), + ty: 2, + init: Some(0), ), ( name: Some("t"), - ty: 16, - init: Some(49), + ty: 15, + init: Some(48), ), ], expressions: [ Literal(I32(1)), - LocalVariable(1), + LocalVariable(0), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Subtract, - left: 4, - right: 3, + left: 3, + right: 2, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 7, + pointer: 6, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 9, + base: 8, index: 0, ), AccessIndex( - base: 10, + base: 9, index: 0, ), Load( - pointer: 11, + pointer: 10, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 13, + base: 12, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 14, - index: 15, + base: 13, + index: 14, ), Load( - pointer: 16, + pointer: 15, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 18, + base: 17, index: 0, ), AccessIndex( - base: 19, + base: 18, index: 0, ), AccessIndex( - base: 20, + base: 19, index: 1, ), Load( - pointer: 21, + pointer: 20, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 23, + base: 22, index: 0, ), AccessIndex( - base: 24, + base: 23, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 25, - index: 26, + base: 24, + index: 25, ), Load( - pointer: 27, + pointer: 26, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 29, + base: 28, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 30, - index: 31, + base: 29, + index: 30, ), AccessIndex( - base: 32, + base: 31, index: 1, ), Load( - pointer: 33, + pointer: 32, ), - GlobalVariable(3), + GlobalVariable(2), AccessIndex( - base: 35, + base: 34, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 36, - index: 37, + base: 35, + index: 36, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 38, - index: 39, + base: 37, + index: 38, ), Load( - pointer: 40, + pointer: 39, ), Literal(F32(1.0)), Splat( size: Bi, - value: 42, + value: 41, ), Literal(F32(2.0)), Splat( size: Bi, - value: 44, + value: 43, ), Literal(F32(3.0)), Splat( size: Bi, - value: 46, + value: 45, ), Compose( - ty: 15, + ty: 14, components: [ - 43, - 45, - 47, + 42, + 44, + 46, ], ), Compose( - ty: 16, + ty: 15, components: [ - 48, + 47, ], ), - LocalVariable(2), + LocalVariable(1), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Add, - left: 52, - right: 51, + left: 51, + right: 50, ), AccessIndex( - base: 50, + base: 49, index: 0, ), Literal(F32(6.0)), Splat( size: Bi, - value: 55, + value: 54, ), Literal(F32(5.0)), Splat( size: Bi, - value: 57, + value: 56, ), Literal(F32(4.0)), Splat( size: Bi, - value: 59, + value: 58, ), Compose( - ty: 15, + ty: 14, components: [ - 56, - 58, - 60, + 55, + 57, + 59, ], ), AccessIndex( - base: 50, + base: 49, index: 0, ), AccessIndex( - base: 62, + base: 61, index: 0, ), Literal(F32(9.0)), Splat( size: Bi, - value: 64, + value: 63, ), AccessIndex( - base: 50, + base: 49, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 66, - index: 67, + base: 65, + index: 66, ), Literal(F32(90.0)), Splat( size: Bi, - value: 69, + value: 68, ), AccessIndex( - base: 50, + base: 49, index: 0, ), AccessIndex( - base: 71, + base: 70, index: 0, ), AccessIndex( - base: 72, + base: 71, index: 1, ), Literal(F32(10.0)), AccessIndex( - base: 50, + base: 49, index: 0, ), AccessIndex( - base: 75, + base: 74, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 76, - index: 77, + base: 75, + index: 76, ), Literal(F32(20.0)), AccessIndex( - base: 50, + base: 49, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 80, - index: 81, + base: 79, + index: 80, ), AccessIndex( - base: 82, + base: 81, index: 1, ), Literal(F32(30.0)), AccessIndex( - base: 50, + base: 49, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 85, - index: 86, + base: 84, + index: 85, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 87, - index: 88, + base: 86, + index: 87, ), Literal(F32(40.0)), ], named_expressions: { - 8: "l0", - 12: "l1", - 17: "l2", - 22: "l3", - 28: "l4", - 34: "l5", - 41: "l6", + 7: "l0", + 11: "l1", + 16: "l2", + 21: "l3", + 27: "l4", + 33: "l5", + 40: "l6", }, body: [ Emit(( @@ -716,8 +716,8 @@ end: 5, )), Store( - pointer: 2, - value: 5, + pointer: 1, + value: 4, ), Emit(( start: 6, @@ -784,8 +784,8 @@ end: 53, )), Store( - pointer: 2, - value: 53, + pointer: 1, + value: 52, ), Emit(( start: 53, @@ -804,8 +804,8 @@ end: 61, )), Store( - pointer: 54, - value: 61, + pointer: 53, + value: 60, ), Emit(( start: 61, @@ -820,8 +820,8 @@ end: 65, )), Store( - pointer: 63, - value: 65, + pointer: 62, + value: 64, ), Emit(( start: 65, @@ -832,8 +832,8 @@ end: 70, )), Store( - pointer: 68, - value: 70, + pointer: 67, + value: 69, ), Emit(( start: 70, @@ -848,8 +848,8 @@ end: 73, )), Store( - pointer: 73, - value: 74, + pointer: 72, + value: 73, ), Emit(( start: 74, @@ -860,8 +860,8 @@ end: 78, )), Store( - pointer: 78, - value: 79, + pointer: 77, + value: 78, ), Emit(( start: 79, @@ -872,16 +872,16 @@ end: 83, )), Store( - pointer: 83, - value: 84, + pointer: 82, + value: 83, ), Emit(( start: 84, end: 89, )), Store( - pointer: 89, - value: 90, + pointer: 88, + value: 89, ), Return( value: None, @@ -895,360 +895,360 @@ local_variables: [ ( name: Some("idx"), - ty: 3, - init: Some(1), + ty: 2, + init: Some(0), ), ( name: Some("t"), - ty: 20, - init: Some(53), + ty: 19, + init: Some(52), ), ], expressions: [ Literal(I32(1)), - LocalVariable(1), + LocalVariable(0), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Subtract, - left: 4, - right: 3, + left: 3, + right: 2, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 7, + pointer: 6, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 9, + base: 8, index: 0, ), AccessIndex( - base: 10, + base: 9, index: 0, ), Load( - pointer: 11, + pointer: 10, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 13, + base: 12, index: 0, ), AccessIndex( - base: 14, + base: 13, index: 0, ), AccessIndex( - base: 15, + base: 14, index: 0, ), Load( - pointer: 16, + pointer: 15, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 18, + base: 17, index: 0, ), AccessIndex( - base: 19, + base: 18, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 20, - index: 21, + base: 19, + index: 20, ), Load( - pointer: 22, + pointer: 21, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 24, + base: 23, index: 0, ), AccessIndex( - base: 25, + base: 24, index: 0, ), AccessIndex( - base: 26, + base: 25, index: 0, ), AccessIndex( - base: 27, + base: 26, index: 1, ), Load( - pointer: 28, + pointer: 27, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 30, + base: 29, index: 0, ), AccessIndex( - base: 31, + base: 30, index: 0, ), AccessIndex( - base: 32, + base: 31, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 33, - index: 34, + base: 32, + index: 33, ), Load( - pointer: 35, + pointer: 34, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 37, + base: 36, index: 0, ), AccessIndex( - base: 38, + base: 37, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 39, - index: 40, + base: 38, + index: 39, ), AccessIndex( - base: 41, + base: 40, index: 1, ), Load( - pointer: 42, + pointer: 41, ), - GlobalVariable(5), + GlobalVariable(4), AccessIndex( - base: 44, + base: 43, index: 0, ), AccessIndex( - base: 45, + base: 44, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 46, - index: 47, + base: 45, + index: 46, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 48, - index: 49, + base: 47, + index: 48, ), Load( - pointer: 50, + pointer: 49, ), - ZeroValue(19), + ZeroValue(18), Compose( - ty: 20, + ty: 19, components: [ - 52, + 51, ], ), - LocalVariable(2), + LocalVariable(1), Literal(I32(1)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Add, - left: 56, - right: 55, + left: 55, + right: 54, ), AccessIndex( - base: 54, + base: 53, index: 0, ), - ZeroValue(19), + ZeroValue(18), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 60, + base: 59, index: 0, ), Literal(F32(8.0)), Splat( size: Bi, - value: 62, + value: 61, ), Literal(F32(7.0)), Splat( size: Bi, - value: 64, + value: 63, ), Literal(F32(6.0)), Splat( size: Bi, - value: 66, + value: 65, ), Literal(F32(5.0)), Splat( size: Bi, - value: 68, + value: 67, ), Compose( - ty: 18, + ty: 17, components: [ - 63, - 65, - 67, - 69, + 62, + 64, + 66, + 68, ], ), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 71, + base: 70, index: 0, ), AccessIndex( - base: 72, + base: 71, index: 0, ), Literal(F32(9.0)), Splat( size: Bi, - value: 74, + value: 73, ), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 76, + base: 75, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 77, - index: 78, + base: 76, + index: 77, ), Literal(F32(90.0)), Splat( size: Bi, - value: 80, + value: 79, ), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 82, + base: 81, index: 0, ), AccessIndex( - base: 83, + base: 82, index: 0, ), AccessIndex( - base: 84, + base: 83, index: 1, ), Literal(F32(10.0)), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 87, + base: 86, index: 0, ), AccessIndex( - base: 88, + base: 87, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 89, - index: 90, + base: 88, + index: 89, ), Literal(F32(20.0)), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 93, + base: 92, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 94, - index: 95, + base: 93, + index: 94, ), AccessIndex( - base: 96, + base: 95, index: 1, ), Literal(F32(30.0)), AccessIndex( - base: 54, + base: 53, index: 0, ), AccessIndex( - base: 99, + base: 98, index: 0, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 100, - index: 101, + base: 99, + index: 100, ), Load( - pointer: 2, + pointer: 1, ), Access( - base: 102, - index: 103, + base: 101, + index: 102, ), Literal(F32(40.0)), ], named_expressions: { - 8: "l0", - 12: "l1", - 17: "l2", - 23: "l3", - 29: "l4", - 36: "l5", - 43: "l6", - 51: "l7", + 7: "l0", + 11: "l1", + 16: "l2", + 22: "l3", + 28: "l4", + 35: "l5", + 42: "l6", + 50: "l7", }, body: [ Emit(( @@ -1256,8 +1256,8 @@ end: 5, )), Store( - pointer: 2, - value: 5, + pointer: 1, + value: 4, ), Emit(( start: 6, @@ -1348,16 +1348,16 @@ end: 57, )), Store( - pointer: 2, - value: 57, + pointer: 1, + value: 56, ), Emit(( start: 57, end: 58, )), Store( - pointer: 58, - value: 59, + pointer: 57, + value: 58, ), Emit(( start: 59, @@ -1384,8 +1384,8 @@ end: 70, )), Store( - pointer: 61, - value: 70, + pointer: 60, + value: 69, ), Emit(( start: 70, @@ -1404,8 +1404,8 @@ end: 75, )), Store( - pointer: 73, - value: 75, + pointer: 72, + value: 74, ), Emit(( start: 75, @@ -1420,8 +1420,8 @@ end: 81, )), Store( - pointer: 79, - value: 81, + pointer: 78, + value: 80, ), Emit(( start: 81, @@ -1440,8 +1440,8 @@ end: 85, )), Store( - pointer: 85, - value: 86, + pointer: 84, + value: 85, ), Emit(( start: 86, @@ -1456,8 +1456,8 @@ end: 91, )), Store( - pointer: 91, - value: 92, + pointer: 90, + value: 91, ), Emit(( start: 92, @@ -1472,8 +1472,8 @@ end: 97, )), Store( - pointer: 97, - value: 98, + pointer: 96, + value: 97, ), Emit(( start: 98, @@ -1484,8 +1484,8 @@ end: 104, )), Store( - pointer: 104, - value: 105, + pointer: 103, + value: 104, ), Return( value: None, @@ -1497,23 +1497,23 @@ arguments: [ ( name: Some("foo"), - ty: 22, + ty: 21, binding: None, ), ], result: Some(( - ty: 21, + ty: 20, binding: None, )), local_variables: [], expressions: [ FunctionArgument(0), Load( - pointer: 1, + pointer: 0, ), ], named_expressions: { - 1: "foo", + 0: "foo", }, body: [ Emit(( @@ -1521,7 +1521,7 @@ end: 2, )), Return( - value: Some(2), + value: Some(1), ), ], ), @@ -1530,28 +1530,28 @@ arguments: [ ( name: Some("a"), - ty: 24, + ty: 23, binding: None, ), ], result: Some(( - ty: 21, + ty: 20, binding: None, )), local_variables: [], expressions: [ FunctionArgument(0), AccessIndex( - base: 1, + base: 0, index: 4, ), AccessIndex( - base: 2, + base: 1, index: 9, ), ], named_expressions: { - 1: "a", + 0: "a", }, body: [ Emit(( @@ -1563,7 +1563,7 @@ end: 3, )), Return( - value: Some(3), + value: Some(2), ), ], ), @@ -1572,7 +1572,7 @@ arguments: [ ( name: Some("p"), - ty: 27, + ty: 26, binding: None, ), ], @@ -1583,12 +1583,12 @@ Literal(U32(42)), ], named_expressions: { - 1: "p", + 0: "p", }, body: [ Store( - pointer: 1, - value: 2, + pointer: 0, + value: 1, ), Return( value: None, @@ -1600,7 +1600,7 @@ arguments: [ ( name: Some("foo"), - ty: 29, + ty: 28, binding: None, ), ], @@ -1611,23 +1611,23 @@ Literal(F32(1.0)), Splat( size: Quad, - value: 2, + value: 1, ), Literal(F32(2.0)), Splat( size: Quad, - value: 4, + value: 3, ), Compose( - ty: 28, + ty: 27, components: [ - 3, - 5, + 2, + 4, ], ), ], named_expressions: { - 1: "foo", + 0: "foo", }, body: [ Emit(( @@ -1647,8 +1647,8 @@ end: 6, )), Store( - pointer: 1, - value: 6, + pointer: 0, + value: 5, ), Return( value: None, @@ -1667,12 +1667,12 @@ arguments: [ ( name: Some("vi"), - ty: 1, + ty: 0, binding: Some(BuiltIn(VertexIndex)), ), ], result: Some(( - ty: 25, + ty: 24, binding: Some(BuiltIn(Position( invariant: false, ))), @@ -1680,104 +1680,104 @@ local_variables: [ ( name: Some("foo"), - ty: 21, - init: Some(2), + ty: 20, + init: Some(1), ), ( name: Some("c2"), - ty: 26, + ty: 25, init: None, ), ], expressions: [ FunctionArgument(0), Literal(F32(0.0)), - LocalVariable(1), + LocalVariable(0), Load( - pointer: 3, + pointer: 2, ), Literal(F32(1.0)), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 7, + pointer: 6, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 9, + base: 8, index: 4, ), Load( - pointer: 10, + pointer: 9, ), Literal(U32(3)), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 13, + base: 12, index: 0, ), Access( - base: 14, - index: 12, + base: 13, + index: 11, ), AccessIndex( - base: 15, + base: 14, index: 0, ), Load( - pointer: 16, + pointer: 15, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 18, + base: 17, index: 5, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 20, + base: 19, index: 5, ), - ArrayLength(21), + ArrayLength(20), Literal(U32(2)), Binary( op: Subtract, - left: 22, - right: 23, + left: 21, + right: 22, ), Access( - base: 19, - index: 24, + base: 18, + index: 23, ), AccessIndex( - base: 25, + base: 24, index: 0, ), Load( - pointer: 26, + pointer: 25, ), - GlobalVariable(4), + GlobalVariable(3), Load( - pointer: 28, + pointer: 27, ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 30, + base: 29, index: 5, ), AccessIndex( - base: 31, + base: 30, index: 0, ), AccessIndex( - base: 32, + base: 31, index: 0, ), - CallResult(3), + CallResult(2), As( - expr: 17, + expr: 16, kind: Sint, convert: Some(4), ), @@ -1785,71 +1785,71 @@ Literal(I32(4)), Literal(I32(5)), Compose( - ty: 26, + ty: 25, components: [ - 27, + 26, + 34, 35, 36, 37, - 38, ], ), - LocalVariable(2), + LocalVariable(1), Literal(U32(1)), Binary( op: Add, - left: 1, - right: 41, + left: 0, + right: 40, ), Access( - base: 40, - index: 42, + base: 39, + index: 41, ), Literal(I32(42)), Access( - base: 40, - index: 1, + base: 39, + index: 0, ), Load( - pointer: 45, + pointer: 44, ), - ZeroValue(24), - CallResult(4), + ZeroValue(23), + CallResult(3), Splat( size: Quad, - value: 46, + value: 45, ), As( - expr: 49, + expr: 48, kind: Float, convert: Some(4), ), Binary( op: Multiply, - left: 8, - right: 50, + left: 7, + right: 49, ), Literal(F32(2.0)), Compose( - ty: 25, + ty: 24, components: [ + 50, 51, - 52, ], ), ], named_expressions: { - 1: "vi", - 4: "baz", - 8: "_matrix", - 11: "arr", - 12: "index", - 17: "b", - 27: "a", - 29: "c", - 33: "data_pointer", - 34: "foo_value", - 46: "value", + 0: "vi", + 3: "baz", + 7: "_matrix", + 10: "arr", + 11: "index", + 16: "b", + 26: "a", + 28: "c", + 32: "data_pointer", + 33: "foo_value", + 45: "value", }, body: [ Emit(( @@ -1857,16 +1857,16 @@ end: 4, )), Store( - pointer: 3, - value: 5, + pointer: 2, + value: 4, ), Call( - function: 1, + function: 0, arguments: [], result: None, ), Call( - function: 2, + function: 1, arguments: [], result: None, ), @@ -1907,11 +1907,11 @@ end: 33, )), Call( - function: 3, + function: 2, arguments: [ - 3, + 2, ], - result: Some(34), + result: Some(33), ), Emit(( start: 34, @@ -1922,27 +1922,27 @@ end: 39, )), Store( - pointer: 40, - value: 39, + pointer: 39, + value: 38, ), Emit(( start: 41, end: 43, )), Store( - pointer: 43, - value: 44, + pointer: 42, + value: 43, ), Emit(( start: 44, end: 46, )), Call( - function: 4, + function: 3, arguments: [ - 47, + 46, ], - result: Some(48), + result: Some(47), ), Emit(( start: 48, @@ -1953,7 +1953,7 @@ end: 53, )), Return( - value: Some(53), + value: Some(52), ), ], ), @@ -1967,7 +1967,7 @@ name: Some("foo_frag"), arguments: [], result: Some(( - ty: 25, + ty: 24, binding: Some(Location( location: 0, second_blend_source: false, @@ -1977,96 +1977,96 @@ )), local_variables: [], expressions: [ - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 1, + base: 0, index: 0, ), AccessIndex( - base: 2, + base: 1, index: 1, ), AccessIndex( - base: 3, + base: 2, index: 2, ), Literal(F32(1.0)), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 6, + base: 5, index: 0, ), Literal(F32(0.0)), Splat( size: Tri, - value: 8, + value: 7, ), Literal(F32(1.0)), Splat( size: Tri, - value: 10, + value: 9, ), Literal(F32(2.0)), Splat( size: Tri, - value: 12, + value: 11, ), Literal(F32(3.0)), Splat( size: Tri, - value: 14, + value: 13, ), Compose( - ty: 6, + ty: 5, components: [ - 9, - 11, - 13, - 15, + 8, + 10, + 12, + 14, ], ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 17, + base: 16, index: 4, ), Literal(U32(0)), Splat( size: Bi, - value: 19, + value: 18, ), Literal(U32(1)), Splat( size: Bi, - value: 21, + value: 20, ), Compose( - ty: 12, + ty: 11, components: [ - 20, - 22, + 19, + 21, ], ), - GlobalVariable(2), + GlobalVariable(1), AccessIndex( - base: 24, + base: 23, index: 5, ), AccessIndex( - base: 25, + base: 24, index: 1, ), AccessIndex( - base: 26, + base: 25, index: 0, ), Literal(I32(1)), - GlobalVariable(4), - ZeroValue(17), + GlobalVariable(3), + ZeroValue(16), Literal(F32(0.0)), Splat( size: Quad, - value: 31, + value: 30, ), ], named_expressions: {}, @@ -2080,8 +2080,8 @@ end: 4, )), Store( - pointer: 4, - value: 5, + pointer: 3, + value: 4, ), Emit(( start: 6, @@ -2104,8 +2104,8 @@ end: 16, )), Store( - pointer: 7, - value: 16, + pointer: 6, + value: 15, ), Emit(( start: 17, @@ -2120,8 +2120,8 @@ end: 23, )), Store( - pointer: 18, - value: 23, + pointer: 17, + value: 22, ), Emit(( start: 24, @@ -2132,19 +2132,19 @@ end: 27, )), Store( - pointer: 27, - value: 28, + pointer: 26, + value: 27, ), Store( - pointer: 29, - value: 30, + pointer: 28, + value: 29, ), Emit(( start: 31, end: 32, )), Return( - value: Some(32), + value: Some(31), ), ], ), @@ -2161,43 +2161,43 @@ local_variables: [ ( name: Some("val"), - ty: 1, - init: Some(1), + ty: 0, + init: Some(0), ), ( name: Some("arr"), - ty: 28, - init: Some(7), + ty: 27, + init: Some(6), ), ], expressions: [ Literal(U32(33)), - LocalVariable(1), + LocalVariable(0), Literal(F32(6.0)), Splat( size: Quad, - value: 3, + value: 2, ), Literal(F32(7.0)), Splat( size: Quad, - value: 5, + value: 4, ), Compose( - ty: 28, + ty: 27, components: [ - 4, - 6, + 3, + 5, ], ), - LocalVariable(2), + LocalVariable(1), ], named_expressions: {}, body: [ Call( - function: 5, + function: 4, arguments: [ - 2, + 1, ], result: None, ), @@ -2218,9 +2218,9 @@ end: 7, )), Call( - function: 6, + function: 5, arguments: [ - 8, + 7, ], result: None, ), diff --git a/naga/tests/out/ir/atomic_i_increment.compact.ron b/naga/tests/out/ir/atomic_i_increment.compact.ron index 65bab83357..bbeb9c2a7f 100644 --- a/naga/tests/out/ir/atomic_i_increment.compact.ron +++ b/naga/tests/out/ir/atomic_i_increment.compact.ron @@ -13,7 +13,7 @@ members: [ ( name: None, - ty: 1, + ty: 0, binding: None, offset: 0, ), @@ -39,7 +39,7 @@ group: 0, binding: 0, )), - ty: 2, + ty: 1, init: None, ), ], @@ -51,13 +51,13 @@ result: None, local_variables: [], expressions: [ - GlobalVariable(1), + GlobalVariable(0), AccessIndex( - base: 1, + base: 0, index: 0, ), AtomicResult( - ty: 1, + ty: 0, comparison: false, ), Literal(U32(1)), @@ -69,10 +69,10 @@ end: 3, )), Atomic( - pointer: 2, + pointer: 1, fun: Add, - value: 4, - result: Some(3), + value: 3, + result: Some(2), ), Return( value: None, @@ -95,7 +95,7 @@ named_expressions: {}, body: [ Call( - function: 1, + function: 0, arguments: [], result: None, ), diff --git a/naga/tests/out/ir/atomic_i_increment.ron b/naga/tests/out/ir/atomic_i_increment.ron index f2071398f3..09ef4d8a2c 100644 --- a/naga/tests/out/ir/atomic_i_increment.ron +++ b/naga/tests/out/ir/atomic_i_increment.ron @@ -13,7 +13,7 @@ members: [ ( name: None, - ty: 1, + ty: 0, binding: None, offset: 0, ), @@ -24,7 +24,7 @@ ( name: None, inner: Pointer( - base: 2, + base: 1, space: Storage( access: ("LOAD | STORE"), ), @@ -33,7 +33,7 @@ ( name: None, inner: Pointer( - base: 1, + base: 0, space: Storage( access: ("LOAD | STORE"), ), @@ -48,13 +48,13 @@ constants: [ ( name: None, - ty: 1, - init: 1, + ty: 0, + init: 0, ), ( name: None, - ty: 1, - init: 2, + ty: 0, + init: 1, ), ], overrides: [], @@ -68,7 +68,7 @@ group: 0, binding: 0, )), - ty: 2, + ty: 1, init: None, ), ], @@ -83,15 +83,15 @@ result: None, local_variables: [], expressions: [ - GlobalVariable(1), - Constant(2), + GlobalVariable(0), Constant(1), + Constant(0), AccessIndex( - base: 1, + base: 0, index: 0, ), AtomicResult( - ty: 1, + ty: 0, comparison: false, ), Literal(U32(1)), @@ -103,10 +103,10 @@ end: 5, )), Atomic( - pointer: 4, + pointer: 3, fun: Add, - value: 6, - result: Some(5), + value: 5, + result: Some(4), ), Return( value: None, @@ -129,7 +129,7 @@ named_expressions: {}, body: [ Call( - function: 1, + function: 0, arguments: [], result: None, ), diff --git a/naga/tests/out/ir/collatz.compact.ron b/naga/tests/out/ir/collatz.compact.ron index 3312ddbf77..5999cf85a2 100644 --- a/naga/tests/out/ir/collatz.compact.ron +++ b/naga/tests/out/ir/collatz.compact.ron @@ -10,7 +10,7 @@ ( name: None, inner: Array( - base: 1, + base: 0, size: Dynamic, stride: 4, ), @@ -21,7 +21,7 @@ members: [ ( name: Some("data"), - ty: 2, + ty: 1, binding: None, offset: 0, ), @@ -57,7 +57,7 @@ group: 0, binding: 0, )), - ty: 3, + ty: 2, init: None, ), ], @@ -68,99 +68,99 @@ arguments: [ ( name: Some("n_base"), - ty: 1, + ty: 0, binding: None, ), ], result: Some(( - ty: 1, + ty: 0, binding: None, )), local_variables: [ ( name: Some("n"), - ty: 1, + ty: 0, init: None, ), ( name: Some("i"), - ty: 1, - init: Some(3), + ty: 0, + init: Some(2), ), ], expressions: [ FunctionArgument(0), - LocalVariable(1), + LocalVariable(0), Literal(U32(0)), - LocalVariable(2), + LocalVariable(1), Load( - pointer: 2, + pointer: 1, ), Literal(U32(1)), Binary( op: Greater, - left: 5, - right: 6, + left: 4, + right: 5, ), Load( - pointer: 2, + pointer: 1, ), Literal(U32(2)), Binary( op: Modulo, - left: 8, - right: 9, + left: 7, + right: 8, ), Literal(U32(0)), Binary( op: Equal, - left: 10, - right: 11, + left: 9, + right: 10, ), Load( - pointer: 2, + pointer: 1, ), Literal(U32(2)), Binary( op: Divide, - left: 13, - right: 14, + left: 12, + right: 13, ), Literal(U32(3)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Multiply, - left: 16, - right: 17, + left: 15, + right: 16, ), Literal(U32(1)), Binary( op: Add, - left: 18, - right: 19, + left: 17, + right: 18, ), Load( - pointer: 4, + pointer: 3, ), Literal(U32(1)), Binary( op: Add, - left: 21, - right: 22, + left: 20, + right: 21, ), Load( - pointer: 4, + pointer: 3, ), ], named_expressions: { - 1: "n_base", + 0: "n_base", }, body: [ Store( - pointer: 2, - value: 1, + pointer: 1, + value: 0, ), Loop( body: [ @@ -173,7 +173,7 @@ end: 7, )), If( - condition: 7, + condition: 6, accept: [], reject: [ Break, @@ -193,7 +193,7 @@ end: 12, )), If( - condition: 12, + condition: 11, accept: [ Emit(( start: 12, @@ -204,8 +204,8 @@ end: 15, )), Store( - pointer: 2, - value: 15, + pointer: 1, + value: 14, ), ], reject: [ @@ -218,8 +218,8 @@ end: 20, )), Store( - pointer: 2, - value: 20, + pointer: 1, + value: 19, ), ], ), @@ -232,8 +232,8 @@ end: 23, )), Store( - pointer: 4, - value: 23, + pointer: 3, + value: 22, ), ]), ], @@ -245,7 +245,7 @@ end: 24, )), Return( - value: Some(24), + value: Some(23), ), ], ), @@ -261,7 +261,7 @@ arguments: [ ( name: Some("global_id"), - ty: 4, + ty: 3, binding: Some(BuiltIn(GlobalInvocationId)), ), ], @@ -269,39 +269,39 @@ local_variables: [], expressions: [ FunctionArgument(0), - GlobalVariable(1), + GlobalVariable(0), AccessIndex( - base: 2, + base: 1, index: 0, ), AccessIndex( - base: 1, + base: 0, index: 0, ), Access( - base: 3, - index: 4, + base: 2, + index: 3, ), - GlobalVariable(1), + GlobalVariable(0), AccessIndex( - base: 6, + base: 5, index: 0, ), AccessIndex( - base: 1, + base: 0, index: 0, ), Access( - base: 7, - index: 8, + base: 6, + index: 7, ), Load( - pointer: 9, + pointer: 8, ), - CallResult(1), + CallResult(0), ], named_expressions: { - 1: "global_id", + 0: "global_id", }, body: [ Emit(( @@ -313,15 +313,15 @@ end: 10, )), Call( - function: 1, + function: 0, arguments: [ - 10, + 9, ], - result: Some(11), + result: Some(10), ), Store( - pointer: 5, - value: 11, + pointer: 4, + value: 10, ), Return( value: None, diff --git a/naga/tests/out/ir/collatz.ron b/naga/tests/out/ir/collatz.ron index 3312ddbf77..5999cf85a2 100644 --- a/naga/tests/out/ir/collatz.ron +++ b/naga/tests/out/ir/collatz.ron @@ -10,7 +10,7 @@ ( name: None, inner: Array( - base: 1, + base: 0, size: Dynamic, stride: 4, ), @@ -21,7 +21,7 @@ members: [ ( name: Some("data"), - ty: 2, + ty: 1, binding: None, offset: 0, ), @@ -57,7 +57,7 @@ group: 0, binding: 0, )), - ty: 3, + ty: 2, init: None, ), ], @@ -68,99 +68,99 @@ arguments: [ ( name: Some("n_base"), - ty: 1, + ty: 0, binding: None, ), ], result: Some(( - ty: 1, + ty: 0, binding: None, )), local_variables: [ ( name: Some("n"), - ty: 1, + ty: 0, init: None, ), ( name: Some("i"), - ty: 1, - init: Some(3), + ty: 0, + init: Some(2), ), ], expressions: [ FunctionArgument(0), - LocalVariable(1), + LocalVariable(0), Literal(U32(0)), - LocalVariable(2), + LocalVariable(1), Load( - pointer: 2, + pointer: 1, ), Literal(U32(1)), Binary( op: Greater, - left: 5, - right: 6, + left: 4, + right: 5, ), Load( - pointer: 2, + pointer: 1, ), Literal(U32(2)), Binary( op: Modulo, - left: 8, - right: 9, + left: 7, + right: 8, ), Literal(U32(0)), Binary( op: Equal, - left: 10, - right: 11, + left: 9, + right: 10, ), Load( - pointer: 2, + pointer: 1, ), Literal(U32(2)), Binary( op: Divide, - left: 13, - right: 14, + left: 12, + right: 13, ), Literal(U32(3)), Load( - pointer: 2, + pointer: 1, ), Binary( op: Multiply, - left: 16, - right: 17, + left: 15, + right: 16, ), Literal(U32(1)), Binary( op: Add, - left: 18, - right: 19, + left: 17, + right: 18, ), Load( - pointer: 4, + pointer: 3, ), Literal(U32(1)), Binary( op: Add, - left: 21, - right: 22, + left: 20, + right: 21, ), Load( - pointer: 4, + pointer: 3, ), ], named_expressions: { - 1: "n_base", + 0: "n_base", }, body: [ Store( - pointer: 2, - value: 1, + pointer: 1, + value: 0, ), Loop( body: [ @@ -173,7 +173,7 @@ end: 7, )), If( - condition: 7, + condition: 6, accept: [], reject: [ Break, @@ -193,7 +193,7 @@ end: 12, )), If( - condition: 12, + condition: 11, accept: [ Emit(( start: 12, @@ -204,8 +204,8 @@ end: 15, )), Store( - pointer: 2, - value: 15, + pointer: 1, + value: 14, ), ], reject: [ @@ -218,8 +218,8 @@ end: 20, )), Store( - pointer: 2, - value: 20, + pointer: 1, + value: 19, ), ], ), @@ -232,8 +232,8 @@ end: 23, )), Store( - pointer: 4, - value: 23, + pointer: 3, + value: 22, ), ]), ], @@ -245,7 +245,7 @@ end: 24, )), Return( - value: Some(24), + value: Some(23), ), ], ), @@ -261,7 +261,7 @@ arguments: [ ( name: Some("global_id"), - ty: 4, + ty: 3, binding: Some(BuiltIn(GlobalInvocationId)), ), ], @@ -269,39 +269,39 @@ local_variables: [], expressions: [ FunctionArgument(0), - GlobalVariable(1), + GlobalVariable(0), AccessIndex( - base: 2, + base: 1, index: 0, ), AccessIndex( - base: 1, + base: 0, index: 0, ), Access( - base: 3, - index: 4, + base: 2, + index: 3, ), - GlobalVariable(1), + GlobalVariable(0), AccessIndex( - base: 6, + base: 5, index: 0, ), AccessIndex( - base: 1, + base: 0, index: 0, ), Access( - base: 7, - index: 8, + base: 6, + index: 7, ), Load( - pointer: 9, + pointer: 8, ), - CallResult(1), + CallResult(0), ], named_expressions: { - 1: "global_id", + 0: "global_id", }, body: [ Emit(( @@ -313,15 +313,15 @@ end: 10, )), Call( - function: 1, + function: 0, arguments: [ - 10, + 9, ], - result: Some(11), + result: Some(10), ), Store( - pointer: 5, - value: 11, + pointer: 4, + value: 10, ), Return( value: None, diff --git a/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.compact.ron b/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.compact.ron index 9d4e82fd88..33846ef305 100644 --- a/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.compact.ron +++ b/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.compact.ron @@ -34,13 +34,13 @@ members: [ ( name: Some("old_value"), - ty: 3, + ty: 2, binding: None, offset: 0, ), ( name: Some("exchanged"), - ty: 4, + ty: 3, binding: None, offset: 4, ), @@ -56,7 +56,7 @@ AtomicCompareExchangeWeakResult(( kind: Uint, width: 4, - )): 5, + )): 4, }, ), constants: [], @@ -64,7 +64,7 @@ ( name: Some("o"), id: None, - ty: 1, + ty: 0, init: None, ), ], @@ -73,7 +73,7 @@ name: Some("a"), space: WorkGroup, binding: None, - ty: 2, + ty: 1, init: None, ), ], @@ -91,16 +91,16 @@ result: None, local_variables: [], expressions: [ - GlobalVariable(1), - Override(1), + GlobalVariable(0), + Override(0), As( - expr: 2, + expr: 1, kind: Uint, convert: Some(4), ), Literal(U32(1)), AtomicResult( - ty: 5, + ty: 4, comparison: true, ), ], @@ -111,12 +111,12 @@ end: 3, )), Atomic( - pointer: 1, + pointer: 0, fun: Exchange( - compare: Some(3), + compare: Some(2), ), - value: 4, - result: Some(5), + value: 3, + result: Some(4), ), Return( value: None, diff --git a/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.ron b/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.ron index 9d4e82fd88..33846ef305 100644 --- a/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.ron +++ b/naga/tests/out/ir/overrides-atomicCompareExchangeWeak.ron @@ -34,13 +34,13 @@ members: [ ( name: Some("old_value"), - ty: 3, + ty: 2, binding: None, offset: 0, ), ( name: Some("exchanged"), - ty: 4, + ty: 3, binding: None, offset: 4, ), @@ -56,7 +56,7 @@ AtomicCompareExchangeWeakResult(( kind: Uint, width: 4, - )): 5, + )): 4, }, ), constants: [], @@ -64,7 +64,7 @@ ( name: Some("o"), id: None, - ty: 1, + ty: 0, init: None, ), ], @@ -73,7 +73,7 @@ name: Some("a"), space: WorkGroup, binding: None, - ty: 2, + ty: 1, init: None, ), ], @@ -91,16 +91,16 @@ result: None, local_variables: [], expressions: [ - GlobalVariable(1), - Override(1), + GlobalVariable(0), + Override(0), As( - expr: 2, + expr: 1, kind: Uint, convert: Some(4), ), Literal(U32(1)), AtomicResult( - ty: 5, + ty: 4, comparison: true, ), ], @@ -111,12 +111,12 @@ end: 3, )), Atomic( - pointer: 1, + pointer: 0, fun: Exchange( - compare: Some(3), + compare: Some(2), ), - value: 4, - result: Some(5), + value: 3, + result: Some(4), ), Return( value: None, diff --git a/naga/tests/out/ir/overrides-ray-query.compact.ron b/naga/tests/out/ir/overrides-ray-query.compact.ron index b127259bbb..544f63ede9 100644 --- a/naga/tests/out/ir/overrides-ray-query.compact.ron +++ b/naga/tests/out/ir/overrides-ray-query.compact.ron @@ -38,37 +38,37 @@ members: [ ( name: Some("flags"), - ty: 4, + ty: 3, binding: None, offset: 0, ), ( name: Some("cull_mask"), - ty: 4, + ty: 3, binding: None, offset: 4, ), ( name: Some("tmin"), - ty: 1, + ty: 0, binding: None, offset: 8, ), ( name: Some("tmax"), - ty: 1, + ty: 0, binding: None, offset: 12, ), ( name: Some("origin"), - ty: 5, + ty: 4, binding: None, offset: 16, ), ( name: Some("dir"), - ty: 5, + ty: 4, binding: None, offset: 32, ), @@ -78,7 +78,7 @@ ), ], special_types: ( - ray_desc: Some(6), + ray_desc: Some(5), ray_intersection: None, predeclared_types: {}, ), @@ -87,7 +87,7 @@ ( name: Some("o"), id: None, - ty: 1, + ty: 0, init: None, ), ], @@ -99,7 +99,7 @@ group: 0, binding: 0, )), - ty: 2, + ty: 1, init: None, ), ], @@ -118,84 +118,84 @@ local_variables: [ ( name: Some("rq"), - ty: 3, + ty: 2, init: None, ), ], expressions: [ - LocalVariable(1), + LocalVariable(0), Literal(U32(4)), Literal(U32(255)), - Override(1), + Override(0), Literal(F32(17.0)), Binary( op: Multiply, - left: 4, - right: 5, + left: 3, + right: 4, ), - Override(1), + Override(0), Literal(F32(19.0)), Binary( op: Multiply, - left: 7, - right: 8, + left: 6, + right: 7, ), - Override(1), + Override(0), Literal(F32(23.0)), Binary( op: Multiply, - left: 10, - right: 11, + left: 9, + right: 10, ), Splat( size: Tri, - value: 12, + value: 11, ), - Override(1), + Override(0), Literal(F32(29.0)), Binary( op: Multiply, - left: 14, - right: 15, + left: 13, + right: 14, ), - Override(1), + Override(0), Literal(F32(31.0)), Binary( op: Multiply, - left: 17, - right: 18, + left: 16, + right: 17, ), - Override(1), + Override(0), Literal(F32(37.0)), Binary( op: Multiply, - left: 20, - right: 21, + left: 19, + right: 20, ), Compose( - ty: 5, + ty: 4, components: [ - 16, - 19, - 22, + 15, + 18, + 21, ], ), Compose( - ty: 6, + ty: 5, components: [ + 1, 2, - 3, - 6, - 9, - 13, - 23, + 5, + 8, + 12, + 22, ], ), - GlobalVariable(1), + GlobalVariable(0), RayQueryProceedResult, ], named_expressions: { - 24: "desc", + 23: "desc", }, body: [ Emit(( @@ -223,22 +223,22 @@ end: 24, )), RayQuery( - query: 1, + query: 0, fun: Initialize( - acceleration_structure: 25, - descriptor: 24, + acceleration_structure: 24, + descriptor: 23, ), ), Loop( body: [ RayQuery( - query: 1, + query: 0, fun: Proceed( - result: 26, + result: 25, ), ), If( - condition: 26, + condition: 25, accept: [], reject: [ Break, diff --git a/naga/tests/out/ir/overrides-ray-query.ron b/naga/tests/out/ir/overrides-ray-query.ron index b127259bbb..544f63ede9 100644 --- a/naga/tests/out/ir/overrides-ray-query.ron +++ b/naga/tests/out/ir/overrides-ray-query.ron @@ -38,37 +38,37 @@ members: [ ( name: Some("flags"), - ty: 4, + ty: 3, binding: None, offset: 0, ), ( name: Some("cull_mask"), - ty: 4, + ty: 3, binding: None, offset: 4, ), ( name: Some("tmin"), - ty: 1, + ty: 0, binding: None, offset: 8, ), ( name: Some("tmax"), - ty: 1, + ty: 0, binding: None, offset: 12, ), ( name: Some("origin"), - ty: 5, + ty: 4, binding: None, offset: 16, ), ( name: Some("dir"), - ty: 5, + ty: 4, binding: None, offset: 32, ), @@ -78,7 +78,7 @@ ), ], special_types: ( - ray_desc: Some(6), + ray_desc: Some(5), ray_intersection: None, predeclared_types: {}, ), @@ -87,7 +87,7 @@ ( name: Some("o"), id: None, - ty: 1, + ty: 0, init: None, ), ], @@ -99,7 +99,7 @@ group: 0, binding: 0, )), - ty: 2, + ty: 1, init: None, ), ], @@ -118,84 +118,84 @@ local_variables: [ ( name: Some("rq"), - ty: 3, + ty: 2, init: None, ), ], expressions: [ - LocalVariable(1), + LocalVariable(0), Literal(U32(4)), Literal(U32(255)), - Override(1), + Override(0), Literal(F32(17.0)), Binary( op: Multiply, - left: 4, - right: 5, + left: 3, + right: 4, ), - Override(1), + Override(0), Literal(F32(19.0)), Binary( op: Multiply, - left: 7, - right: 8, + left: 6, + right: 7, ), - Override(1), + Override(0), Literal(F32(23.0)), Binary( op: Multiply, - left: 10, - right: 11, + left: 9, + right: 10, ), Splat( size: Tri, - value: 12, + value: 11, ), - Override(1), + Override(0), Literal(F32(29.0)), Binary( op: Multiply, - left: 14, - right: 15, + left: 13, + right: 14, ), - Override(1), + Override(0), Literal(F32(31.0)), Binary( op: Multiply, - left: 17, - right: 18, + left: 16, + right: 17, ), - Override(1), + Override(0), Literal(F32(37.0)), Binary( op: Multiply, - left: 20, - right: 21, + left: 19, + right: 20, ), Compose( - ty: 5, + ty: 4, components: [ - 16, - 19, - 22, + 15, + 18, + 21, ], ), Compose( - ty: 6, + ty: 5, components: [ + 1, 2, - 3, - 6, - 9, - 13, - 23, + 5, + 8, + 12, + 22, ], ), - GlobalVariable(1), + GlobalVariable(0), RayQueryProceedResult, ], named_expressions: { - 24: "desc", + 23: "desc", }, body: [ Emit(( @@ -223,22 +223,22 @@ end: 24, )), RayQuery( - query: 1, + query: 0, fun: Initialize( - acceleration_structure: 25, - descriptor: 24, + acceleration_structure: 24, + descriptor: 23, ), ), Loop( body: [ RayQuery( - query: 1, + query: 0, fun: Proceed( - result: 26, + result: 25, ), ), If( - condition: 26, + condition: 25, accept: [], reject: [ Break, diff --git a/naga/tests/out/ir/overrides.compact.ron b/naga/tests/out/ir/overrides.compact.ron index 111a134890..e7921e7325 100644 --- a/naga/tests/out/ir/overrides.compact.ron +++ b/naga/tests/out/ir/overrides.compact.ron @@ -25,44 +25,44 @@ ( name: Some("has_point_light"), id: Some(0), - ty: 1, - init: Some(1), + ty: 0, + init: Some(0), ), ( name: Some("specular_param"), id: Some(1200), - ty: 2, - init: Some(2), + ty: 1, + init: Some(1), ), ( name: Some("gain"), id: Some(1300), - ty: 2, + ty: 1, init: None, ), ( name: Some("width"), id: None, - ty: 2, - init: Some(3), + ty: 1, + init: Some(2), ), ( name: Some("depth"), id: None, - ty: 2, + ty: 1, init: None, ), ( name: Some("height"), id: None, - ty: 2, - init: Some(6), + ty: 1, + init: Some(5), ), ( name: Some("inferred_f32"), id: None, - ty: 2, - init: Some(7), + ty: 1, + init: Some(6), ), ], global_variables: [ @@ -70,14 +70,14 @@ name: Some("gain_x_10"), space: Private, binding: None, - ty: 2, - init: Some(10), + ty: 1, + init: Some(9), ), ( name: Some("store_override"), space: Private, binding: None, - ty: 2, + ty: 1, init: None, ), ], @@ -85,20 +85,20 @@ Literal(Bool(true)), Literal(F32(2.3)), Literal(F32(0.0)), - Override(5), + Override(4), Literal(F32(2.0)), Binary( op: Multiply, - left: 5, - right: 4, + left: 4, + right: 3, ), Literal(F32(2.718)), - Override(3), + Override(2), Literal(F32(10.0)), Binary( op: Multiply, - left: 8, - right: 9, + left: 7, + right: 8, ), ], functions: [], @@ -115,50 +115,50 @@ local_variables: [ ( name: Some("t"), - ty: 2, - init: Some(3), + ty: 1, + init: Some(2), ), ( name: Some("x"), - ty: 1, + ty: 0, init: None, ), ( name: Some("gain_x_100"), - ty: 2, + ty: 1, init: None, ), ], expressions: [ - Override(6), + Override(5), Literal(F32(5.0)), Binary( op: Multiply, - left: 1, - right: 2, + left: 0, + right: 1, ), - Override(1), + Override(0), Unary( op: LogicalNot, - expr: 4, + expr: 3, ), - LocalVariable(2), - GlobalVariable(1), + LocalVariable(1), + GlobalVariable(0), Load( - pointer: 7, + pointer: 6, ), Literal(F32(10.0)), Binary( op: Multiply, - left: 8, - right: 9, + left: 7, + right: 8, ), - LocalVariable(3), - GlobalVariable(2), - Override(3), + LocalVariable(2), + GlobalVariable(1), + Override(2), ], named_expressions: { - 5: "a", + 4: "a", }, body: [ Emit(( @@ -170,8 +170,8 @@ end: 5, )), Store( - pointer: 6, - value: 5, + pointer: 5, + value: 4, ), Emit(( start: 7, @@ -182,12 +182,12 @@ end: 10, )), Store( - pointer: 11, - value: 10, + pointer: 10, + value: 9, ), Store( - pointer: 12, - value: 13, + pointer: 11, + value: 12, ), Return( value: None, diff --git a/naga/tests/out/ir/overrides.ron b/naga/tests/out/ir/overrides.ron index 111a134890..e7921e7325 100644 --- a/naga/tests/out/ir/overrides.ron +++ b/naga/tests/out/ir/overrides.ron @@ -25,44 +25,44 @@ ( name: Some("has_point_light"), id: Some(0), - ty: 1, - init: Some(1), + ty: 0, + init: Some(0), ), ( name: Some("specular_param"), id: Some(1200), - ty: 2, - init: Some(2), + ty: 1, + init: Some(1), ), ( name: Some("gain"), id: Some(1300), - ty: 2, + ty: 1, init: None, ), ( name: Some("width"), id: None, - ty: 2, - init: Some(3), + ty: 1, + init: Some(2), ), ( name: Some("depth"), id: None, - ty: 2, + ty: 1, init: None, ), ( name: Some("height"), id: None, - ty: 2, - init: Some(6), + ty: 1, + init: Some(5), ), ( name: Some("inferred_f32"), id: None, - ty: 2, - init: Some(7), + ty: 1, + init: Some(6), ), ], global_variables: [ @@ -70,14 +70,14 @@ name: Some("gain_x_10"), space: Private, binding: None, - ty: 2, - init: Some(10), + ty: 1, + init: Some(9), ), ( name: Some("store_override"), space: Private, binding: None, - ty: 2, + ty: 1, init: None, ), ], @@ -85,20 +85,20 @@ Literal(Bool(true)), Literal(F32(2.3)), Literal(F32(0.0)), - Override(5), + Override(4), Literal(F32(2.0)), Binary( op: Multiply, - left: 5, - right: 4, + left: 4, + right: 3, ), Literal(F32(2.718)), - Override(3), + Override(2), Literal(F32(10.0)), Binary( op: Multiply, - left: 8, - right: 9, + left: 7, + right: 8, ), ], functions: [], @@ -115,50 +115,50 @@ local_variables: [ ( name: Some("t"), - ty: 2, - init: Some(3), + ty: 1, + init: Some(2), ), ( name: Some("x"), - ty: 1, + ty: 0, init: None, ), ( name: Some("gain_x_100"), - ty: 2, + ty: 1, init: None, ), ], expressions: [ - Override(6), + Override(5), Literal(F32(5.0)), Binary( op: Multiply, - left: 1, - right: 2, + left: 0, + right: 1, ), - Override(1), + Override(0), Unary( op: LogicalNot, - expr: 4, + expr: 3, ), - LocalVariable(2), - GlobalVariable(1), + LocalVariable(1), + GlobalVariable(0), Load( - pointer: 7, + pointer: 6, ), Literal(F32(10.0)), Binary( op: Multiply, - left: 8, - right: 9, + left: 7, + right: 8, ), - LocalVariable(3), - GlobalVariable(2), - Override(3), + LocalVariable(2), + GlobalVariable(1), + Override(2), ], named_expressions: { - 5: "a", + 4: "a", }, body: [ Emit(( @@ -170,8 +170,8 @@ end: 5, )), Store( - pointer: 6, - value: 5, + pointer: 5, + value: 4, ), Emit(( start: 7, @@ -182,12 +182,12 @@ end: 10, )), Store( - pointer: 11, - value: 10, + pointer: 10, + value: 9, ), Store( - pointer: 12, - value: 13, + pointer: 11, + value: 12, ), Return( value: None, diff --git a/naga/tests/out/ir/shadow.compact.ron b/naga/tests/out/ir/shadow.compact.ron index 45d819b9e0..a33b7d9968 100644 --- a/naga/tests/out/ir/shadow.compact.ron +++ b/naga/tests/out/ir/shadow.compact.ron @@ -77,7 +77,7 @@ members: [ ( name: Some("num_lights"), - ty: 8, + ty: 7, binding: None, offset: 0, ), @@ -102,19 +102,19 @@ members: [ ( name: Some("proj"), - ty: 10, + ty: 9, binding: None, offset: 0, ), ( name: Some("pos"), - ty: 4, + ty: 3, binding: None, offset: 64, ), ( name: Some("color"), - ty: 4, + ty: 3, binding: None, offset: 80, ), @@ -125,7 +125,7 @@ ( name: None, inner: Array( - base: 11, + base: 10, size: Dynamic, stride: 96, ), @@ -136,7 +136,7 @@ members: [ ( name: Some("data"), - ty: 12, + ty: 11, binding: None, offset: 0, ), @@ -159,28 +159,33 @@ constants: [ ( name: None, - ty: 1, + ty: 0, + init: 0, + ), + ( + name: None, + ty: 0, init: 1, ), ( name: None, - ty: 1, + ty: 0, init: 2, ), ( name: None, - ty: 1, + ty: 0, init: 3, ), ( name: None, - ty: 1, + ty: 0, init: 4, ), ( name: None, ty: 1, - init: 5, + init: 8, ), ( name: None, @@ -189,69 +194,64 @@ ), ( name: None, - ty: 3, + ty: 2, init: 10, ), ( name: None, - ty: 3, + ty: 2, init: 11, ), ( name: None, - ty: 3, + ty: 6, init: 12, ), ( name: None, - ty: 7, + ty: 6, init: 13, ), ( name: None, - ty: 7, + ty: 6, init: 14, ), ( name: None, - ty: 7, + ty: 6, init: 15, ), ( name: None, - ty: 7, + ty: 6, init: 16, ), ( name: None, - ty: 7, + ty: 6, init: 17, ), ( name: None, - ty: 7, + ty: 6, init: 18, ), ( name: None, - ty: 7, + ty: 6, init: 19, ), ( name: None, - ty: 7, + ty: 6, init: 20, ), ( name: None, - ty: 7, + ty: 6, init: 21, ), - ( - name: None, - ty: 7, - init: 22, - ), ], overrides: [], global_variables: [ @@ -262,7 +262,7 @@ group: 0, binding: 2, )), - ty: 6, + ty: 5, init: None, ), ( @@ -272,7 +272,7 @@ group: 0, binding: 3, )), - ty: 14, + ty: 13, init: None, ), ( @@ -282,7 +282,7 @@ group: 0, binding: 0, )), - ty: 9, + ty: 8, init: None, ), ( @@ -294,28 +294,28 @@ group: 0, binding: 1, )), - ty: 13, + ty: 12, init: None, ), ( name: Some("in_position_fs"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ( name: Some("in_normal_fs"), space: Private, binding: None, - ty: 2, + ty: 1, init: None, ), ( name: Some("out_color_fs"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ], @@ -325,15 +325,15 @@ Literal(F32(0.5)), Literal(F32(-0.5)), Literal(F32(0.05)), - Constant(5), - Constant(5), - Constant(5), + Constant(4), + Constant(4), + Constant(4), Compose( - ty: 2, + ty: 1, components: [ + 5, 6, 7, - 8, ], ), Literal(U32(10)), @@ -356,165 +356,165 @@ arguments: [ ( name: None, - ty: 3, + ty: 2, binding: None, ), ( name: None, - ty: 4, + ty: 3, binding: None, ), ], result: Some(( - ty: 1, + ty: 0, binding: None, )), local_variables: [], expressions: [ + GlobalVariable(0), GlobalVariable(1), - GlobalVariable(2), - Constant(3), - Constant(4), Constant(2), + Constant(3), Constant(1), + Constant(0), FunctionArgument(0), FunctionArgument(1), AccessIndex( - base: 8, + base: 7, index: 3, ), Binary( op: LessEqual, - left: 9, - right: 6, + left: 8, + right: 5, ), AccessIndex( - base: 8, + base: 7, index: 0, ), AccessIndex( - base: 8, + base: 7, index: 1, ), Compose( - ty: 5, + ty: 4, components: [ + 10, 11, - 12, ], ), Compose( - ty: 5, + ty: 4, components: [ + 2, 3, - 4, ], ), Binary( op: Multiply, - left: 13, - right: 14, + left: 12, + right: 13, ), AccessIndex( - base: 8, + base: 7, index: 3, ), Binary( op: Divide, - left: 5, - right: 16, + left: 4, + right: 15, ), Binary( op: Multiply, - left: 15, - right: 17, + left: 14, + right: 16, ), Splat( size: Bi, - value: 3, + value: 2, ), Binary( op: Add, - left: 18, - right: 19, + left: 17, + right: 18, ), AccessIndex( - base: 20, + base: 19, index: 0, ), AccessIndex( - base: 20, + base: 19, index: 1, ), As( - expr: 7, + expr: 6, kind: Sint, convert: None, ), As( - expr: 23, + expr: 22, kind: Float, convert: Some(4), ), Compose( - ty: 2, + ty: 1, components: [ + 20, 21, - 22, - 24, + 23, ], ), AccessIndex( - base: 8, + base: 7, index: 2, ), AccessIndex( - base: 8, + base: 7, index: 3, ), Binary( op: Divide, - left: 5, - right: 27, + left: 4, + right: 26, ), Binary( op: Multiply, - left: 26, - right: 28, + left: 25, + right: 27, ), AccessIndex( - base: 25, + base: 24, index: 0, ), AccessIndex( - base: 25, + base: 24, index: 1, ), Compose( - ty: 5, + ty: 4, components: [ + 29, 30, - 31, ], ), AccessIndex( - base: 25, + base: 24, index: 2, ), As( - expr: 33, + expr: 32, kind: Sint, convert: Some(4), ), ImageSample( - image: 1, - sampler: 2, + image: 0, + sampler: 1, gather: None, - coordinate: 32, - array_index: Some(34), + coordinate: 31, + array_index: Some(33), offset: None, level: Zero, - depth_ref: Some(29), + depth_ref: Some(28), ), ], named_expressions: {}, @@ -524,10 +524,10 @@ end: 10, )), If( - condition: 10, + condition: 9, accept: [ Return( - value: Some(5), + value: Some(4), ), ], reject: [], @@ -537,7 +537,7 @@ end: 35, )), Return( - value: Some(35), + value: Some(34), ), ], ), @@ -548,342 +548,342 @@ local_variables: [ ( name: Some("color"), - ty: 2, - init: Some(20), + ty: 1, + init: Some(19), ), ( name: Some("i"), - ty: 3, - init: Some(22), + ty: 2, + init: Some(21), ), ], expressions: [ - GlobalVariable(3), - GlobalVariable(6), + GlobalVariable(2), GlobalVariable(5), GlobalVariable(4), - GlobalVariable(7), + GlobalVariable(3), + GlobalVariable(6), + Constant(16), + Constant(14), + Constant(12), Constant(17), Constant(15), - Constant(13), Constant(18), - Constant(16), - Constant(19), + Constant(8), + Constant(6), + Constant(1), + Constant(10), + Constant(13), Constant(9), - Constant(7), - Constant(2), Constant(11), - Constant(14), - Constant(10), - Constant(12), - Constant(1), - Constant(6), + Constant(0), + Constant(5), + LocalVariable(0), + Constant(7), LocalVariable(1), - Constant(8), - LocalVariable(2), Load( - pointer: 23, + pointer: 22, ), AccessIndex( - base: 1, + base: 0, index: 0, ), Access( - base: 25, - index: 17, + base: 24, + index: 16, ), Load( - pointer: 26, + pointer: 25, ), Math( fun: Min, - arg: 27, - arg1: Some(13), + arg: 26, + arg1: Some(12), arg2: None, arg3: None, ), Binary( op: GreaterEqual, - left: 24, - right: 28, + left: 23, + right: 27, ), Load( - pointer: 21, + pointer: 20, ), Load( - pointer: 23, + pointer: 22, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 32, - index: 33, + base: 31, + index: 32, ), AccessIndex( - base: 34, + base: 33, index: 0, ), Load( - pointer: 35, + pointer: 34, ), Load( - pointer: 3, + pointer: 2, ), Binary( op: Multiply, - left: 36, - right: 37, + left: 35, + right: 36, ), - CallResult(1), + CallResult(0), Load( - pointer: 2, + pointer: 1, ), Math( fun: Normalize, - arg: 40, + arg: 39, arg1: None, arg2: None, arg3: None, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 42, - index: 43, + base: 41, + index: 42, ), AccessIndex( - base: 44, + base: 43, index: 1, ), Access( - base: 45, - index: 15, + base: 44, + index: 14, ), Load( - pointer: 46, + pointer: 45, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 48, - index: 49, + base: 47, + index: 48, ), AccessIndex( - base: 50, + base: 49, index: 1, ), Access( - base: 51, - index: 18, + base: 50, + index: 17, ), Load( - pointer: 52, + pointer: 51, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 54, - index: 55, + base: 53, + index: 54, ), AccessIndex( - base: 56, + base: 55, index: 1, ), Access( - base: 57, - index: 8, + base: 56, + index: 7, ), Load( - pointer: 58, + pointer: 57, ), Compose( - ty: 2, + ty: 1, components: [ - 47, - 53, - 59, + 46, + 52, + 58, ], ), Access( - base: 3, - index: 16, + base: 2, + index: 15, ), Load( - pointer: 61, + pointer: 60, ), Access( - base: 3, - index: 7, + base: 2, + index: 6, ), Load( - pointer: 63, + pointer: 62, ), Access( - base: 3, - index: 10, + base: 2, + index: 9, ), Load( - pointer: 65, + pointer: 64, ), Compose( - ty: 2, + ty: 1, components: [ - 62, - 64, - 66, + 61, + 63, + 65, ], ), Binary( op: Subtract, - left: 60, - right: 67, + left: 59, + right: 66, ), Math( fun: Normalize, - arg: 68, + arg: 67, arg1: None, arg2: None, arg3: None, ), Math( fun: Dot, - arg: 41, - arg1: Some(69), + arg: 40, + arg1: Some(68), arg2: None, arg3: None, ), Math( fun: Max, - arg: 19, - arg1: Some(70), + arg: 18, + arg1: Some(69), arg2: None, arg3: None, ), Binary( op: Multiply, - left: 39, - right: 71, + left: 38, + right: 70, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 73, - index: 74, + base: 72, + index: 73, ), AccessIndex( - base: 75, + base: 74, index: 2, ), Access( - base: 76, - index: 6, + base: 75, + index: 5, ), Load( - pointer: 77, + pointer: 76, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 79, - index: 80, + base: 78, + index: 79, ), AccessIndex( - base: 81, + base: 80, index: 2, ), Access( - base: 82, - index: 9, + base: 81, + index: 8, ), Load( - pointer: 83, + pointer: 82, ), AccessIndex( - base: 4, + base: 3, index: 0, ), Load( - pointer: 23, + pointer: 22, ), Access( - base: 85, - index: 86, + base: 84, + index: 85, ), AccessIndex( - base: 87, + base: 86, index: 2, ), Access( - base: 88, - index: 11, + base: 87, + index: 10, ), Load( - pointer: 89, + pointer: 88, ), Compose( - ty: 2, + ty: 1, components: [ - 78, - 84, - 90, + 77, + 83, + 89, ], ), Binary( op: Multiply, - left: 91, - right: 72, + left: 90, + right: 71, ), Binary( op: Add, - left: 30, - right: 92, + left: 29, + right: 91, ), Load( - pointer: 23, + pointer: 22, ), Binary( op: Add, - left: 94, - right: 12, + left: 93, + right: 11, ), Load( - pointer: 21, + pointer: 20, ), Compose( - ty: 4, + ty: 3, components: [ - 96, - 14, + 95, + 13, ], ), ], @@ -896,7 +896,7 @@ end: 29, )), If( - condition: 29, + condition: 28, accept: [ Break, ], @@ -907,20 +907,20 @@ end: 38, )), Call( - function: 1, + function: 0, arguments: [ - 31, - 38, + 30, + 37, ], - result: Some(39), + result: Some(38), ), Emit(( start: 39, end: 93, )), Store( - pointer: 21, - value: 93, + pointer: 20, + value: 92, ), Continue, ], @@ -930,8 +930,8 @@ end: 95, )), Store( - pointer: 23, - value: 95, + pointer: 22, + value: 94, ), ], break_if: None, @@ -941,8 +941,8 @@ end: 97, )), Store( - pointer: 5, - value: 97, + pointer: 4, + value: 96, ), Return( value: None, @@ -961,7 +961,7 @@ arguments: [ ( name: Some("in_normal_fs"), - ty: 2, + ty: 1, binding: Some(Location( location: 0, second_blend_source: false, @@ -971,7 +971,7 @@ ), ( name: Some("in_position_fs"), - ty: 4, + ty: 3, binding: Some(Location( location: 1, second_blend_source: false, @@ -981,7 +981,7 @@ ), ], result: Some(( - ty: 4, + ty: 3, binding: Some(Location( location: 0, second_blend_source: false, @@ -992,26 +992,26 @@ local_variables: [], expressions: [ FunctionArgument(0), - GlobalVariable(6), - FunctionArgument(1), GlobalVariable(5), - GlobalVariable(7), + FunctionArgument(1), + GlobalVariable(4), + GlobalVariable(6), Load( - pointer: 5, + pointer: 4, ), ], named_expressions: {}, body: [ Store( - pointer: 2, - value: 1, + pointer: 1, + value: 0, ), Store( - pointer: 4, - value: 3, + pointer: 3, + value: 2, ), Call( - function: 2, + function: 1, arguments: [], result: None, ), @@ -1020,7 +1020,7 @@ end: 6, )), Return( - value: Some(6), + value: Some(5), ), ], ), diff --git a/naga/tests/out/ir/shadow.ron b/naga/tests/out/ir/shadow.ron index 523c6d4192..7662f586f1 100644 --- a/naga/tests/out/ir/shadow.ron +++ b/naga/tests/out/ir/shadow.ron @@ -77,14 +77,14 @@ ( name: None, inner: Pointer( - base: 2, + base: 1, space: Function, ), ), ( name: None, inner: Pointer( - base: 3, + base: 2, space: Function, ), ), @@ -104,7 +104,7 @@ members: [ ( name: Some("num_lights"), - ty: 12, + ty: 11, binding: None, offset: 0, ), @@ -115,21 +115,21 @@ ( name: None, inner: Pointer( - base: 13, + base: 12, space: Uniform, ), ), ( name: None, inner: Pointer( - base: 12, + base: 11, space: Uniform, ), ), ( name: None, inner: Pointer( - base: 3, + base: 2, space: Uniform, ), ), @@ -150,19 +150,19 @@ members: [ ( name: Some("proj"), - ty: 17, + ty: 16, binding: None, offset: 0, ), ( name: Some("pos"), - ty: 4, + ty: 3, binding: None, offset: 64, ), ( name: Some("color"), - ty: 4, + ty: 3, binding: None, offset: 80, ), @@ -173,7 +173,7 @@ ( name: None, inner: Array( - base: 18, + base: 17, size: Dynamic, stride: 96, ), @@ -184,7 +184,7 @@ members: [ ( name: Some("data"), - ty: 19, + ty: 18, binding: None, offset: 0, ), @@ -195,7 +195,7 @@ ( name: None, inner: Pointer( - base: 20, + base: 19, space: Storage( access: (""), ), @@ -204,7 +204,7 @@ ( name: None, inner: Pointer( - base: 19, + base: 18, space: Storage( access: ("LOAD | STORE"), ), @@ -213,7 +213,7 @@ ( name: None, inner: Pointer( - base: 18, + base: 17, space: Storage( access: ("LOAD | STORE"), ), @@ -222,7 +222,7 @@ ( name: None, inner: Pointer( - base: 17, + base: 16, space: Storage( access: ("LOAD | STORE"), ), @@ -231,21 +231,21 @@ ( name: None, inner: Pointer( - base: 4, + base: 3, space: Private, ), ), ( name: None, inner: Pointer( - base: 2, + base: 1, space: Private, ), ), ( name: None, inner: Pointer( - base: 4, + base: 3, space: Storage( access: ("LOAD | STORE"), ), @@ -254,7 +254,7 @@ ( name: None, inner: Pointer( - base: 1, + base: 0, space: Storage( access: ("LOAD | STORE"), ), @@ -263,7 +263,7 @@ ( name: None, inner: Pointer( - base: 1, + base: 0, space: Private, ), ), @@ -282,28 +282,33 @@ constants: [ ( name: None, - ty: 1, + ty: 0, + init: 0, + ), + ( + name: None, + ty: 0, init: 1, ), ( name: None, - ty: 1, + ty: 0, init: 2, ), ( name: None, - ty: 1, + ty: 0, init: 3, ), ( name: None, - ty: 1, + ty: 0, init: 4, ), ( name: None, ty: 1, - init: 5, + init: 8, ), ( name: None, @@ -312,149 +317,144 @@ ), ( name: None, - ty: 3, + ty: 2, init: 10, ), ( name: None, - ty: 3, + ty: 2, init: 11, ), ( name: None, - ty: 3, + ty: 0, init: 12, ), ( name: None, - ty: 1, + ty: 8, init: 13, ), ( name: None, - ty: 9, + ty: 8, init: 14, ), ( name: None, - ty: 9, + ty: 8, init: 15, ), ( name: None, - ty: 9, + ty: 8, init: 16, ), ( name: None, - ty: 9, + ty: 8, init: 17, ), ( name: None, - ty: 9, + ty: 8, init: 18, ), ( name: None, - ty: 9, + ty: 8, init: 19, ), ( name: None, - ty: 9, + ty: 8, init: 20, ), ( name: None, - ty: 9, + ty: 8, init: 21, ), ( name: None, - ty: 9, + ty: 8, init: 22, ), ( name: None, - ty: 9, + ty: 8, init: 23, ), ( name: None, - ty: 9, + ty: 8, init: 24, ), ( name: None, - ty: 9, + ty: 8, init: 25, ), ( name: None, - ty: 9, + ty: 8, init: 26, ), ( name: None, - ty: 9, + ty: 8, init: 27, ), ( name: None, - ty: 9, + ty: 8, init: 28, ), ( name: None, - ty: 9, + ty: 8, init: 29, ), ( name: None, - ty: 9, + ty: 8, init: 30, ), ( name: None, - ty: 9, + ty: 8, init: 31, ), ( name: None, - ty: 9, + ty: 8, init: 32, ), ( name: None, - ty: 9, + ty: 8, init: 33, ), ( name: None, - ty: 9, + ty: 8, init: 34, ), ( name: None, - ty: 9, + ty: 8, init: 35, ), ( name: None, - ty: 9, + ty: 8, init: 36, ), ( name: None, - ty: 9, + ty: 8, init: 37, ), - ( - name: None, - ty: 9, - init: 38, - ), ], overrides: [], global_variables: [ @@ -465,7 +465,7 @@ group: 0, binding: 2, )), - ty: 7, + ty: 6, init: None, ), ( @@ -475,7 +475,7 @@ group: 0, binding: 3, )), - ty: 30, + ty: 29, init: None, ), ( @@ -485,7 +485,7 @@ group: 0, binding: 0, )), - ty: 13, + ty: 12, init: None, ), ( @@ -497,28 +497,28 @@ group: 0, binding: 1, )), - ty: 20, + ty: 19, init: None, ), ( name: Some("in_position_fs"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ( name: Some("in_normal_fs"), space: Private, binding: None, - ty: 2, + ty: 1, init: None, ), ( name: Some("out_color_fs"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ], @@ -528,15 +528,15 @@ Literal(F32(0.5)), Literal(F32(-0.5)), Literal(F32(0.05)), - Constant(5), - Constant(5), - Constant(5), + Constant(4), + Constant(4), + Constant(4), Compose( - ty: 2, + ty: 1, components: [ + 5, 6, 7, - 8, ], ), Literal(U32(10)), @@ -575,201 +575,201 @@ arguments: [ ( name: None, - ty: 3, + ty: 2, binding: None, ), ( name: None, - ty: 4, + ty: 3, binding: None, ), ], result: Some(( - ty: 1, + ty: 0, binding: None, )), local_variables: [], expressions: [ - GlobalVariable(3), - GlobalVariable(6), - GlobalVariable(5), - GlobalVariable(1), GlobalVariable(2), + GlobalVariable(5), GlobalVariable(4), - GlobalVariable(7), - Constant(16), + GlobalVariable(0), + GlobalVariable(1), + GlobalVariable(3), + GlobalVariable(6), + Constant(15), + Constant(2), + Constant(28), + Constant(26), + Constant(24), + Constant(22), + Constant(20), + Constant(10), + Constant(7), + Constant(18), Constant(3), + Constant(31), Constant(29), + Constant(9), Constant(27), Constant(25), - Constant(23), + Constant(12), Constant(21), - Constant(11), + Constant(34), Constant(8), - Constant(19), + Constant(6), Constant(4), - Constant(32), + Constant(1), + Constant(16), Constant(30), - Constant(10), - Constant(28), - Constant(26), + Constant(14), + Constant(32), Constant(13), - Constant(22), - Constant(35), - Constant(9), - Constant(7), - Constant(5), - Constant(2), - Constant(17), - Constant(31), - Constant(15), + Constant(23), + Constant(11), + Constant(19), Constant(33), - Constant(14), - Constant(24), - Constant(12), - Constant(20), - Constant(34), - Constant(18), - Constant(6), - Constant(1), + Constant(17), + Constant(5), + Constant(0), FunctionArgument(0), FunctionArgument(1), AccessIndex( - base: 44, + base: 43, index: 3, ), Binary( op: LessEqual, - left: 45, - right: 42, + left: 44, + right: 41, ), AccessIndex( - base: 44, + base: 43, index: 0, ), AccessIndex( - base: 44, + base: 43, index: 1, ), Compose( - ty: 6, + ty: 5, components: [ + 46, 47, - 48, ], ), Compose( - ty: 6, + ty: 5, components: [ - 9, - 18, + 8, + 17, ], ), Binary( op: Multiply, - left: 49, - right: 50, + left: 48, + right: 49, ), AccessIndex( - base: 44, + base: 43, index: 3, ), Binary( op: Divide, - left: 30, - right: 52, + left: 29, + right: 51, ), Binary( op: Multiply, - left: 51, - right: 53, + left: 50, + right: 52, ), Splat( size: Bi, - value: 9, + value: 8, ), Binary( op: Add, - left: 54, - right: 55, + left: 53, + right: 54, ), AccessIndex( - base: 56, + base: 55, index: 0, ), AccessIndex( - base: 56, + base: 55, index: 1, ), As( - expr: 43, + expr: 42, kind: Sint, convert: None, ), As( - expr: 59, + expr: 58, kind: Float, convert: Some(4), ), Compose( - ty: 2, + ty: 1, components: [ + 56, 57, - 58, - 60, + 59, ], ), AccessIndex( - base: 44, + base: 43, index: 2, ), AccessIndex( - base: 44, + base: 43, index: 3, ), Binary( op: Divide, - left: 30, - right: 63, + left: 29, + right: 62, ), Binary( op: Multiply, - left: 62, - right: 64, + left: 61, + right: 63, ), AccessIndex( - base: 61, + base: 60, index: 0, ), AccessIndex( - base: 61, + base: 60, index: 1, ), Compose( - ty: 6, + ty: 5, components: [ + 65, 66, - 67, ], ), AccessIndex( - base: 61, + base: 60, index: 2, ), As( - expr: 69, + expr: 68, kind: Sint, convert: Some(4), ), ImageSample( - image: 4, - sampler: 5, + image: 3, + sampler: 4, gather: None, - coordinate: 68, - array_index: Some(70), + coordinate: 67, + array_index: Some(69), offset: None, level: Zero, - depth_ref: Some(65), + depth_ref: Some(64), ), ], named_expressions: {}, @@ -779,10 +779,10 @@ end: 46, )), If( - condition: 46, + condition: 45, accept: [ Return( - value: Some(30), + value: Some(29), ), ], reject: [], @@ -792,7 +792,7 @@ end: 71, )), Return( - value: Some(71), + value: Some(70), ), ], ), @@ -803,365 +803,365 @@ local_variables: [ ( name: Some("color"), - ty: 2, - init: Some(43), + ty: 1, + init: Some(42), ), ( name: Some("i"), - ty: 3, - init: Some(45), + ty: 2, + init: Some(44), ), ], expressions: [ - GlobalVariable(3), - GlobalVariable(6), - GlobalVariable(5), - GlobalVariable(1), GlobalVariable(2), + GlobalVariable(5), GlobalVariable(4), - GlobalVariable(7), - Constant(16), + GlobalVariable(0), + GlobalVariable(1), + GlobalVariable(3), + GlobalVariable(6), + Constant(15), + Constant(2), + Constant(28), + Constant(26), + Constant(24), + Constant(22), + Constant(20), + Constant(10), + Constant(7), + Constant(18), Constant(3), + Constant(31), Constant(29), + Constant(9), Constant(27), Constant(25), - Constant(23), + Constant(12), Constant(21), - Constant(11), + Constant(34), Constant(8), - Constant(19), + Constant(6), Constant(4), - Constant(32), + Constant(1), + Constant(16), Constant(30), - Constant(10), - Constant(28), - Constant(26), + Constant(14), + Constant(32), Constant(13), - Constant(22), - Constant(35), - Constant(9), - Constant(7), - Constant(5), - Constant(2), - Constant(17), - Constant(31), - Constant(15), + Constant(23), + Constant(11), + Constant(19), Constant(33), - Constant(14), - Constant(24), - Constant(12), - Constant(20), - Constant(34), - Constant(18), - Constant(6), - Constant(1), - Constant(6), + Constant(17), + Constant(5), + Constant(0), + Constant(5), + LocalVariable(0), + Constant(7), LocalVariable(1), - Constant(8), - LocalVariable(2), Load( - pointer: 46, + pointer: 45, ), AccessIndex( - base: 1, + base: 0, index: 0, ), Access( - base: 48, - index: 37, + base: 47, + index: 36, ), Load( - pointer: 49, + pointer: 48, ), Math( fun: Min, - arg: 50, - arg1: Some(28), + arg: 49, + arg1: Some(27), arg2: None, arg3: None, ), Binary( op: GreaterEqual, - left: 47, - right: 51, + left: 46, + right: 50, ), Load( - pointer: 44, + pointer: 43, ), Load( - pointer: 46, + pointer: 45, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 55, - index: 56, + base: 54, + index: 55, ), AccessIndex( - base: 57, + base: 56, index: 0, ), Load( - pointer: 58, + pointer: 57, ), Load( - pointer: 3, + pointer: 2, ), Binary( op: Multiply, - left: 59, - right: 60, + left: 58, + right: 59, ), - CallResult(1), + CallResult(0), Load( - pointer: 2, + pointer: 1, ), Math( fun: Normalize, - arg: 63, + arg: 62, arg1: None, arg2: None, arg3: None, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 65, - index: 66, + base: 64, + index: 65, ), AccessIndex( - base: 67, + base: 66, index: 1, ), Access( - base: 68, - index: 31, + base: 67, + index: 30, ), Load( - pointer: 69, + pointer: 68, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 71, - index: 72, + base: 70, + index: 71, ), AccessIndex( - base: 73, + base: 72, index: 1, ), Access( - base: 74, - index: 38, + base: 73, + index: 37, ), Load( - pointer: 75, + pointer: 74, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 77, - index: 78, + base: 76, + index: 77, ), AccessIndex( - base: 79, + base: 78, index: 1, ), Access( - base: 80, - index: 13, + base: 79, + index: 12, ), Load( - pointer: 81, + pointer: 80, ), Compose( - ty: 2, + ty: 1, components: [ - 70, - 76, - 82, + 69, + 75, + 81, ], ), Access( - base: 3, - index: 36, + base: 2, + index: 35, ), Load( - pointer: 84, + pointer: 83, ), Access( - base: 3, - index: 12, + base: 2, + index: 11, ), Load( - pointer: 86, + pointer: 85, ), Access( - base: 3, - index: 23, + base: 2, + index: 22, ), Load( - pointer: 88, + pointer: 87, ), Compose( - ty: 2, + ty: 1, components: [ - 85, - 87, - 89, + 84, + 86, + 88, ], ), Binary( op: Subtract, - left: 83, - right: 90, + left: 82, + right: 89, ), Math( fun: Normalize, - arg: 91, + arg: 90, arg1: None, arg2: None, arg3: None, ), Math( fun: Dot, - arg: 64, - arg1: Some(92), + arg: 63, + arg1: Some(91), arg2: None, arg3: None, ), Math( fun: Max, - arg: 42, - arg1: Some(93), + arg: 41, + arg1: Some(92), arg2: None, arg3: None, ), Binary( op: Multiply, - left: 62, - right: 94, + left: 61, + right: 93, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 96, - index: 97, + base: 95, + index: 96, ), AccessIndex( - base: 98, + base: 97, index: 2, ), Access( - base: 99, - index: 10, + base: 98, + index: 9, ), Load( - pointer: 100, + pointer: 99, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 102, - index: 103, + base: 101, + index: 102, ), AccessIndex( - base: 104, + base: 103, index: 2, ), Access( - base: 105, - index: 19, + base: 104, + index: 18, ), Load( - pointer: 106, + pointer: 105, ), AccessIndex( - base: 6, + base: 5, index: 0, ), Load( - pointer: 46, + pointer: 45, ), Access( - base: 108, - index: 109, + base: 107, + index: 108, ), AccessIndex( - base: 110, + base: 109, index: 2, ), Access( - base: 111, - index: 26, + base: 110, + index: 25, ), Load( - pointer: 112, + pointer: 111, ), Compose( - ty: 2, + ty: 1, components: [ - 101, - 107, - 113, + 100, + 106, + 112, ], ), Binary( op: Multiply, - left: 114, - right: 95, + left: 113, + right: 94, ), Binary( op: Add, - left: 53, - right: 115, + left: 52, + right: 114, ), Load( - pointer: 46, + pointer: 45, ), Binary( op: Add, - left: 117, - right: 27, + left: 116, + right: 26, ), Load( - pointer: 44, + pointer: 43, ), Compose( - ty: 4, + ty: 3, components: [ - 119, - 30, + 118, + 29, ], ), ], @@ -1174,7 +1174,7 @@ end: 52, )), If( - condition: 52, + condition: 51, accept: [ Break, ], @@ -1185,20 +1185,20 @@ end: 61, )), Call( - function: 1, + function: 0, arguments: [ - 54, - 61, + 53, + 60, ], - result: Some(62), + result: Some(61), ), Emit(( start: 62, end: 116, )), Store( - pointer: 44, - value: 116, + pointer: 43, + value: 115, ), Continue, ], @@ -1208,8 +1208,8 @@ end: 118, )), Store( - pointer: 46, - value: 118, + pointer: 45, + value: 117, ), ], break_if: None, @@ -1219,8 +1219,8 @@ end: 120, )), Store( - pointer: 7, - value: 120, + pointer: 6, + value: 119, ), Return( value: None, @@ -1239,7 +1239,7 @@ arguments: [ ( name: Some("in_normal_fs"), - ty: 2, + ty: 1, binding: Some(Location( location: 0, second_blend_source: false, @@ -1249,7 +1249,7 @@ ), ( name: Some("in_position_fs"), - ty: 4, + ty: 3, binding: Some(Location( location: 1, second_blend_source: false, @@ -1259,7 +1259,7 @@ ), ], result: Some(( - ty: 4, + ty: 3, binding: Some(Location( location: 0, second_blend_source: false, @@ -1270,26 +1270,26 @@ local_variables: [], expressions: [ FunctionArgument(0), - GlobalVariable(6), - FunctionArgument(1), GlobalVariable(5), - GlobalVariable(7), + FunctionArgument(1), + GlobalVariable(4), + GlobalVariable(6), Load( - pointer: 5, + pointer: 4, ), ], named_expressions: {}, body: [ Store( - pointer: 2, - value: 1, + pointer: 1, + value: 0, ), Store( - pointer: 4, - value: 3, + pointer: 3, + value: 2, ), Call( - function: 2, + function: 1, arguments: [], result: None, ), @@ -1298,7 +1298,7 @@ end: 6, )), Return( - value: Some(6), + value: Some(5), ), ], ), diff --git a/naga/tests/out/ir/spec-constants.compact.ron b/naga/tests/out/ir/spec-constants.compact.ron index f06417b2e9..e33bec6578 100644 --- a/naga/tests/out/ir/spec-constants.compact.ron +++ b/naga/tests/out/ir/spec-constants.compact.ron @@ -40,7 +40,7 @@ members: [ ( name: Some("size"), - ty: 3, + ty: 2, binding: None, offset: 0, ), @@ -61,7 +61,7 @@ ( name: None, inner: Array( - base: 1, + base: 0, size: Constant(1), stride: 4, ), @@ -72,7 +72,7 @@ members: [ ( name: Some("gl_Position"), - ty: 6, + ty: 5, binding: Some(BuiltIn(Position( invariant: false, ))), @@ -80,19 +80,19 @@ ), ( name: Some("gl_PointSize"), - ty: 1, + ty: 0, binding: None, offset: 16, ), ( name: Some("gl_ClipDistance"), - ty: 7, + ty: 6, binding: None, offset: 20, ), ( name: Some("gl_CullDistance"), - ty: 7, + ty: 6, binding: None, offset: 24, ), @@ -117,7 +117,7 @@ members: [ ( name: Some("ViewProj"), - ty: 9, + ty: 8, binding: None, offset: 0, ), @@ -131,7 +131,7 @@ members: [ ( name: Some("Model"), - ty: 9, + ty: 8, binding: None, offset: 0, ), @@ -145,7 +145,7 @@ members: [ ( name: None, - ty: 3, + ty: 2, binding: Some(Location( location: 0, second_blend_source: false, @@ -156,7 +156,7 @@ ), ( name: Some("gl_Position"), - ty: 6, + ty: 5, binding: Some(BuiltIn(Position( invariant: false, ))), @@ -175,33 +175,33 @@ constants: [ ( name: None, - ty: 1, - init: 3, + ty: 0, + init: 2, ), ( name: None, - ty: 1, - init: 4, + ty: 0, + init: 3, ), ], overrides: [ ( name: Some("TEST_CONSTANT"), id: Some(0), - ty: 1, - init: Some(1), + ty: 0, + init: Some(0), ), ( name: Some("TEST_CONSTANT_TRUE"), id: Some(1), - ty: 2, - init: Some(2), + ty: 1, + init: Some(1), ), ( name: Some("TEST_CONSTANT_FALSE"), id: Some(2), - ty: 2, - init: Some(5), + ty: 1, + init: Some(4), ), ], global_variables: [ @@ -209,21 +209,21 @@ name: Some("v_Uv"), space: Private, binding: None, - ty: 3, + ty: 2, init: None, ), ( name: Some("Vertex_Uv"), space: Private, binding: None, - ty: 3, + ty: 2, init: None, ), ( name: Some("Vertex_Position"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ( @@ -233,15 +233,15 @@ group: 2, binding: 1, )), - ty: 5, + ty: 4, init: None, ), ( name: Some(""), space: Private, binding: None, - ty: 8, - init: Some(12), + ty: 7, + init: Some(11), ), ( name: Some(""), @@ -250,7 +250,7 @@ group: 0, binding: 0, )), - ty: 10, + ty: 9, init: None, ), ( @@ -260,14 +260,14 @@ group: 2, binding: 0, )), - ty: 11, + ty: 10, init: None, ), ( name: Some("Vertex_Normal"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ], @@ -280,24 +280,24 @@ Literal(F32(0.0)), Literal(F32(1.0)), Compose( - ty: 6, + ty: 5, components: [ + 5, + 5, + 5, 6, - 6, - 6, - 7, ], ), Literal(F32(1.0)), - ZeroValue(7), - ZeroValue(7), + ZeroValue(6), + ZeroValue(6), Compose( - ty: 8, + ty: 7, components: [ + 7, 8, 9, 10, - 11, ], ), ], @@ -309,142 +309,142 @@ local_variables: [ ( name: Some("test_constant"), - ty: 1, + ty: 0, init: None, ), ( name: Some("position"), - ty: 4, + ty: 3, init: None, ), ], expressions: [ - GlobalVariable(3), GlobalVariable(2), - GlobalVariable(4), - GlobalVariable(5), - GlobalVariable(7), GlobalVariable(1), + GlobalVariable(3), + GlobalVariable(4), GlobalVariable(6), - Override(3), - Constant(2), + GlobalVariable(0), + GlobalVariable(5), + Override(2), Constant(1), + Constant(0), + Override(0), Override(1), - Override(2), + LocalVariable(0), LocalVariable(1), - LocalVariable(2), Select( - condition: 12, - accept: 9, - reject: 10, + condition: 11, + accept: 8, + reject: 9, ), Binary( op: Multiply, - left: 11, - right: 15, + left: 10, + right: 14, ), Select( - condition: 8, - accept: 9, - reject: 10, + condition: 7, + accept: 8, + reject: 9, ), Binary( op: Multiply, - left: 16, - right: 17, + left: 15, + right: 16, ), Load( - pointer: 2, + pointer: 1, ), Load( - pointer: 1, + pointer: 0, ), AccessIndex( - base: 3, + base: 2, index: 0, ), Load( - pointer: 21, + pointer: 20, ), AccessIndex( - base: 22, + base: 21, index: 0, ), AccessIndex( - base: 22, + base: 21, index: 1, ), Compose( - ty: 4, + ty: 3, components: [ + 22, 23, - 24, - 9, + 8, ], ), Binary( op: Multiply, - left: 20, - right: 25, + left: 19, + right: 24, ), AccessIndex( - base: 7, + base: 6, index: 0, ), Load( - pointer: 27, + pointer: 26, ), AccessIndex( - base: 5, + base: 4, index: 0, ), Load( - pointer: 29, + pointer: 28, ), Binary( op: Multiply, - left: 28, - right: 30, + left: 27, + right: 29, ), Load( - pointer: 14, + pointer: 13, ), AccessIndex( - base: 32, + base: 31, index: 0, ), AccessIndex( - base: 32, + base: 31, index: 1, ), AccessIndex( - base: 32, + base: 31, index: 2, ), Compose( - ty: 6, + ty: 5, components: [ + 32, 33, 34, - 35, - 9, + 8, ], ), Binary( op: Multiply, - left: 31, - right: 36, + left: 30, + right: 35, ), Load( - pointer: 13, + pointer: 12, ), Binary( op: Multiply, - left: 37, - right: 38, + left: 36, + right: 37, ), AccessIndex( - base: 4, + base: 3, index: 0, ), ], @@ -455,32 +455,32 @@ end: 18, )), Store( - pointer: 13, - value: 18, + pointer: 12, + value: 17, ), Emit(( start: 18, end: 19, )), Store( - pointer: 6, - value: 19, + pointer: 5, + value: 18, ), Emit(( start: 19, end: 26, )), Store( - pointer: 14, - value: 26, + pointer: 13, + value: 25, ), Emit(( start: 26, end: 40, )), Store( - pointer: 40, - value: 39, + pointer: 39, + value: 38, ), Return( value: None, @@ -499,7 +499,7 @@ arguments: [ ( name: Some("Vertex_Uv"), - ty: 3, + ty: 2, binding: Some(Location( location: 2, second_blend_source: false, @@ -509,7 +509,7 @@ ), ( name: Some("Vertex_Position"), - ty: 4, + ty: 3, binding: Some(Location( location: 0, second_blend_source: false, @@ -519,7 +519,7 @@ ), ( name: Some("Vertex_Normal"), - ty: 4, + ty: 3, binding: Some(Location( location: 1, second_blend_source: false, @@ -529,64 +529,64 @@ ), ], result: Some(( - ty: 12, + ty: 11, binding: None, )), local_variables: [], expressions: [ FunctionArgument(0), - GlobalVariable(2), + GlobalVariable(1), FunctionArgument(1), - GlobalVariable(3), + GlobalVariable(2), FunctionArgument(2), - GlobalVariable(8), - GlobalVariable(1), - GlobalVariable(5), + GlobalVariable(7), + GlobalVariable(0), + GlobalVariable(4), AccessIndex( - base: 8, + base: 7, index: 0, ), AccessIndex( - base: 9, + base: 8, index: 1, ), Load( - pointer: 10, + pointer: 9, ), Unary( op: Negate, - expr: 11, + expr: 10, ), Load( - pointer: 7, + pointer: 6, ), Load( - pointer: 9, + pointer: 8, ), Compose( - ty: 12, + ty: 11, components: [ + 12, 13, - 14, ], ), ], named_expressions: {}, body: [ Store( - pointer: 2, - value: 1, + pointer: 1, + value: 0, ), Store( - pointer: 4, - value: 3, + pointer: 3, + value: 2, ), Store( - pointer: 6, - value: 5, + pointer: 5, + value: 4, ), Call( - function: 1, + function: 0, arguments: [], result: None, ), @@ -595,15 +595,15 @@ end: 12, )), Store( - pointer: 10, - value: 12, + pointer: 9, + value: 11, ), Emit(( start: 12, end: 15, )), Return( - value: Some(15), + value: Some(14), ), ], ), diff --git a/naga/tests/out/ir/spec-constants.ron b/naga/tests/out/ir/spec-constants.ron index 1459daf9f4..8319c7bd3d 100644 --- a/naga/tests/out/ir/spec-constants.ron +++ b/naga/tests/out/ir/spec-constants.ron @@ -10,7 +10,7 @@ ( name: None, inner: Pointer( - base: 1, + base: 0, space: Function, ), ), @@ -34,7 +34,7 @@ ( name: None, inner: Pointer( - base: 4, + base: 3, space: Private, ), ), @@ -51,14 +51,14 @@ ( name: None, inner: Pointer( - base: 6, + base: 5, space: Function, ), ), ( name: None, inner: Pointer( - base: 6, + base: 5, space: Private, ), ), @@ -68,7 +68,7 @@ members: [ ( name: Some("size"), - ty: 4, + ty: 3, binding: None, offset: 0, ), @@ -79,7 +79,7 @@ ( name: None, inner: Pointer( - base: 9, + base: 8, space: Uniform, ), ), @@ -93,7 +93,7 @@ ( name: None, inner: Pointer( - base: 4, + base: 3, space: Uniform, ), ), @@ -117,7 +117,7 @@ ( name: None, inner: Array( - base: 1, + base: 0, size: Constant(1), stride: 4, ), @@ -128,7 +128,7 @@ members: [ ( name: Some("gl_Position"), - ty: 13, + ty: 12, binding: Some(BuiltIn(Position( invariant: false, ))), @@ -136,19 +136,19 @@ ), ( name: Some("gl_PointSize"), - ty: 1, + ty: 0, binding: None, offset: 16, ), ( name: Some("gl_ClipDistance"), - ty: 15, + ty: 14, binding: None, offset: 20, ), ( name: Some("gl_CullDistance"), - ty: 15, + ty: 14, binding: None, offset: 24, ), @@ -159,7 +159,7 @@ ( name: None, inner: Pointer( - base: 16, + base: 15, space: Private, ), ), @@ -180,7 +180,7 @@ members: [ ( name: Some("ViewProj"), - ty: 18, + ty: 17, binding: None, offset: 0, ), @@ -191,14 +191,14 @@ ( name: None, inner: Pointer( - base: 19, + base: 18, space: Uniform, ), ), ( name: None, inner: Pointer( - base: 18, + base: 17, space: Uniform, ), ), @@ -208,7 +208,7 @@ members: [ ( name: Some("Model"), - ty: 18, + ty: 17, binding: None, offset: 0, ), @@ -219,14 +219,14 @@ ( name: None, inner: Pointer( - base: 22, + base: 21, space: Uniform, ), ), ( name: None, inner: Pointer( - base: 13, + base: 12, space: Private, ), ), @@ -236,7 +236,7 @@ members: [ ( name: None, - ty: 4, + ty: 3, binding: Some(Location( location: 0, second_blend_source: false, @@ -247,7 +247,7 @@ ), ( name: Some("gl_Position"), - ty: 13, + ty: 12, binding: Some(BuiltIn(Position( invariant: false, ))), @@ -266,43 +266,43 @@ constants: [ ( name: None, - ty: 1, - init: 3, + ty: 0, + init: 2, ), ( name: None, - ty: 1, - init: 4, + ty: 0, + init: 3, ), ( name: None, - ty: 11, - init: 6, + ty: 10, + init: 5, ), ( name: None, - ty: 14, - init: 7, + ty: 13, + init: 6, ), ], overrides: [ ( name: Some("TEST_CONSTANT"), id: Some(0), - ty: 1, - init: Some(1), + ty: 0, + init: Some(0), ), ( name: Some("TEST_CONSTANT_TRUE"), id: Some(1), - ty: 3, - init: Some(2), + ty: 2, + init: Some(1), ), ( name: Some("TEST_CONSTANT_FALSE"), id: Some(2), - ty: 3, - init: Some(5), + ty: 2, + init: Some(4), ), ], global_variables: [ @@ -310,21 +310,21 @@ name: Some("v_Uv"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ( name: Some("Vertex_Uv"), space: Private, binding: None, - ty: 4, + ty: 3, init: None, ), ( name: Some("Vertex_Position"), space: Private, binding: None, - ty: 6, + ty: 5, init: None, ), ( @@ -334,15 +334,15 @@ group: 2, binding: 1, )), - ty: 9, + ty: 8, init: None, ), ( name: Some(""), space: Private, binding: None, - ty: 16, - init: Some(14), + ty: 15, + init: Some(13), ), ( name: Some(""), @@ -351,7 +351,7 @@ group: 0, binding: 0, )), - ty: 19, + ty: 18, init: None, ), ( @@ -361,14 +361,14 @@ group: 2, binding: 0, )), - ty: 22, + ty: 21, init: None, ), ( name: Some("Vertex_Normal"), space: Private, binding: None, - ty: 6, + ty: 5, init: None, ), ], @@ -383,24 +383,24 @@ Literal(F32(0.0)), Literal(F32(1.0)), Compose( - ty: 13, + ty: 12, components: [ + 7, + 7, + 7, 8, - 8, - 8, - 9, ], ), Literal(F32(1.0)), - ZeroValue(15), - ZeroValue(15), + ZeroValue(14), + ZeroValue(14), Compose( - ty: 16, + ty: 15, components: [ + 9, 10, 11, 12, - 13, ], ), ], @@ -412,145 +412,145 @@ local_variables: [ ( name: Some("test_constant"), - ty: 1, + ty: 0, init: None, ), ( name: Some("position"), - ty: 6, + ty: 5, init: None, ), ], expressions: [ - GlobalVariable(3), GlobalVariable(2), + GlobalVariable(1), + GlobalVariable(3), GlobalVariable(4), + GlobalVariable(6), + GlobalVariable(0), GlobalVariable(5), GlobalVariable(7), - GlobalVariable(1), - GlobalVariable(6), - GlobalVariable(8), - Override(3), + Override(2), + Constant(1), Constant(2), Constant(3), - Constant(4), - Constant(1), + Constant(0), + Override(0), Override(1), - Override(2), + LocalVariable(0), LocalVariable(1), - LocalVariable(2), Select( - condition: 15, - accept: 10, - reject: 13, + condition: 14, + accept: 9, + reject: 12, ), Binary( op: Multiply, - left: 14, - right: 18, + left: 13, + right: 17, ), Select( - condition: 9, - accept: 10, - reject: 13, + condition: 8, + accept: 9, + reject: 12, ), Binary( op: Multiply, - left: 19, - right: 20, + left: 18, + right: 19, ), Load( - pointer: 2, + pointer: 1, ), Load( - pointer: 1, + pointer: 0, ), AccessIndex( - base: 3, + base: 2, index: 0, ), Load( - pointer: 24, + pointer: 23, ), AccessIndex( - base: 25, + base: 24, index: 0, ), AccessIndex( - base: 25, + base: 24, index: 1, ), Compose( - ty: 6, + ty: 5, components: [ + 25, 26, - 27, - 10, + 9, ], ), Binary( op: Multiply, - left: 23, - right: 28, + left: 22, + right: 27, ), AccessIndex( - base: 7, + base: 6, index: 0, ), Load( - pointer: 30, + pointer: 29, ), AccessIndex( - base: 5, + base: 4, index: 0, ), Load( - pointer: 32, + pointer: 31, ), Binary( op: Multiply, - left: 31, - right: 33, + left: 30, + right: 32, ), Load( - pointer: 17, + pointer: 16, ), AccessIndex( - base: 35, + base: 34, index: 0, ), AccessIndex( - base: 35, + base: 34, index: 1, ), AccessIndex( - base: 35, + base: 34, index: 2, ), Compose( - ty: 13, + ty: 12, components: [ + 35, 36, 37, - 38, - 10, + 9, ], ), Binary( op: Multiply, - left: 34, - right: 39, + left: 33, + right: 38, ), Load( - pointer: 16, + pointer: 15, ), Binary( op: Multiply, - left: 40, - right: 41, + left: 39, + right: 40, ), AccessIndex( - base: 4, + base: 3, index: 0, ), ], @@ -561,32 +561,32 @@ end: 21, )), Store( - pointer: 16, - value: 21, + pointer: 15, + value: 20, ), Emit(( start: 21, end: 22, )), Store( - pointer: 6, - value: 22, + pointer: 5, + value: 21, ), Emit(( start: 22, end: 29, )), Store( - pointer: 17, - value: 29, + pointer: 16, + value: 28, ), Emit(( start: 29, end: 43, )), Store( - pointer: 43, - value: 42, + pointer: 42, + value: 41, ), Return( value: None, @@ -605,7 +605,7 @@ arguments: [ ( name: Some("Vertex_Uv"), - ty: 4, + ty: 3, binding: Some(Location( location: 2, second_blend_source: false, @@ -615,7 +615,7 @@ ), ( name: Some("Vertex_Position"), - ty: 6, + ty: 5, binding: Some(Location( location: 0, second_blend_source: false, @@ -625,7 +625,7 @@ ), ( name: Some("Vertex_Normal"), - ty: 6, + ty: 5, binding: Some(Location( location: 1, second_blend_source: false, @@ -635,64 +635,64 @@ ), ], result: Some(( - ty: 25, + ty: 24, binding: None, )), local_variables: [], expressions: [ FunctionArgument(0), - GlobalVariable(2), + GlobalVariable(1), FunctionArgument(1), - GlobalVariable(3), + GlobalVariable(2), FunctionArgument(2), - GlobalVariable(8), - GlobalVariable(1), - GlobalVariable(5), + GlobalVariable(7), + GlobalVariable(0), + GlobalVariable(4), AccessIndex( - base: 8, + base: 7, index: 0, ), AccessIndex( - base: 9, + base: 8, index: 1, ), Load( - pointer: 10, + pointer: 9, ), Unary( op: Negate, - expr: 11, + expr: 10, ), Load( - pointer: 7, + pointer: 6, ), Load( - pointer: 9, + pointer: 8, ), Compose( - ty: 25, + ty: 24, components: [ + 12, 13, - 14, ], ), ], named_expressions: {}, body: [ Store( - pointer: 2, - value: 1, + pointer: 1, + value: 0, ), Store( - pointer: 4, - value: 3, + pointer: 3, + value: 2, ), Store( - pointer: 6, - value: 5, + pointer: 5, + value: 4, ), Call( - function: 1, + function: 0, arguments: [], result: None, ), @@ -701,15 +701,15 @@ end: 12, )), Store( - pointer: 10, - value: 12, + pointer: 9, + value: 11, ), Emit(( start: 12, end: 15, )), Return( - value: Some(15), + value: Some(14), ), ], ),