File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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,
Original file line number Diff line number Diff 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]
8251fn very_negative_integers ( ) {
8352 // wgpu#4492
You can’t perform that action at this time.
0 commit comments