Skip to content

Commit 0f245ff

Browse files
cryvoshErichDonGubler
authored andcommitted
Feedback
1 parent 11de5d2 commit 0f245ff

2 files changed

Lines changed: 2 additions & 31 deletions

File tree

naga/src/valid/function.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,6 +1479,8 @@ impl super::Validator {
14791479
base: ty,
14801480
space: AddressSpace::WorkGroup,
14811481
};
1482+
// workgroupUniformLoad on atomic<T> returns T, not atomic<T>.
1483+
// Verify the pointer's atomic scalar matches the result scalar.
14821484
let atomic_specialization_ok = match *pointer_inner {
14831485
Ti::Pointer {
14841486
base: pointer_base,

naga/tests/naga/wgsl_errors.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,37 +47,6 @@ fn check_success(input: &str) {
4747
}
4848
}
4949

50-
#[test]
51-
fn workgroup_uniform_load_atomic_returns_scalar() {
52-
let input = r#"
53-
var<workgroup> wg_scratch: atomic<u32>;
54-
55-
@compute @workgroup_size(4, 4, 4)
56-
fn interval_tile_main(
57-
@builtin(workgroup_id) workgroup_id: vec3u,
58-
@builtin(local_invocation_id) local_id: vec3u
59-
) {
60-
let active_tile_index = workgroup_id.x + workgroup_id.y * 32768u;
61-
atomicOr(&wg_scratch, u32(active_tile_index >= 64u));
62-
workgroupBarrier();
63-
if workgroupUniformLoad(&wg_scratch) == 0 {
64-
return;
65-
}
66-
}
67-
"#;
68-
69-
let module = naga::front::wgsl::parse_str(input).unwrap_or_else(|err| {
70-
panic!(
71-
"expected success, but parsing failed with:\n{}",
72-
err.emit_to_string(input)
73-
)
74-
});
75-
76-
naga::valid::Validator::new(valid::ValidationFlags::default(), Capabilities::all())
77-
.validate(&module)
78-
.unwrap();
79-
}
80-
8150
#[test]
8251
fn very_negative_integers() {
8352
// wgpu#4492

0 commit comments

Comments
 (0)