Skip to content

Commit ab8f9ad

Browse files
Specify individual capabilities for each snapshot test (#8688)
1 parent 6141fe5 commit ab8f9ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+68
-76
lines changed

naga-test/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ pub struct FragmentModule {
190190
#[derive(Default, serde::Deserialize)]
191191
#[serde(default)]
192192
pub struct Parameters {
193-
// -- GOD MODE --
194-
pub god_mode: bool,
193+
// -- validation options --
194+
//
195+
// Capabilities to enable. Defaults to `Capabilities::default()`.
196+
pub capabilities: Option<naga::valid::Capabilities>,
195197

196198
// -- wgsl-in options --
197199
#[serde(rename = "wgsl-in")]

naga/src/valid/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,13 @@ impl Validator {
571571
}
572572
}
573573

574+
// TODO(https://github.com/gfx-rs/wgpu/issues/8207): Consider removing this
574575
pub fn subgroup_stages(&mut self, stages: ShaderStages) -> &mut Self {
575576
self.subgroup_stages = stages;
576577
self
577578
}
578579

580+
// TODO(https://github.com/gfx-rs/wgpu/issues/8207): Consider removing this
579581
pub fn subgroup_operations(&mut self, operations: SubgroupOperationSet) -> &mut Self {
580582
self.subgroup_operations = operations;
581583
self
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
god_mode = true
1+
capabilities = "IMMEDIATES"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
god_mode = true
1+
capabilities = "IMMEDIATES"

naga/tests/in/glsl/bits.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# TODO(https://github.com/gfx-rs/wgpu/issues/8154): enable only `F16_IN_F32` capability
2-
god_mode = true
1+
capabilities = "SHADER_FLOAT16_IN_FLOAT32"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
god_mode = true
1+
capabilities = "FLOAT64"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# TODO(https://github.com/gfx-rs/wgpu/issues/8154): enable only `DUAL_SOURCE_BLENDING` capability
2-
god_mode = true
2+
capabilities = "DUAL_SOURCE_BLENDING"

naga/tests/in/glsl/f16-glsl.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
god_mode = true
1+
capabilities = "SHADER_FLOAT16"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
god_mode = true
1+
capabilities = "FLOAT64"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
god_mode = true
1+
capabilities = "TEXTURE_AND_SAMPLER_BINDING_ARRAY"
22

33
[spv-in]
44
adjust_coordinate_space = true

0 commit comments

Comments
 (0)