writer/wgsl: Omit the newline after [[access()]] decorations
Produces ugly code for the common case.
Change-Id: I8e5b1215e19fc6461dc40b8a91922db25f9cbd76
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47764
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/ast/module_clone_test.cc b/src/ast/module_clone_test.cc
index fc6117e..d89f9d9 100644
--- a/src/ast/module_clone_test.cc
+++ b/src/ast/module_clone_test.cc
@@ -48,12 +48,9 @@
var g6 : [[access(write)]] texture_storage_2d<rg32float>;
[[builtin(position)]] var<uniform> g7 : vec3<f32>;
-[[group(10), binding(20)]] var<storage> g8 : [[access(write)]]
-S;
-[[group(10), binding(20)]] var<storage> g9 : [[access(read)]]
-S;
-[[group(10), binding(20)]] var<storage> g10 : [[access(read_write)]]
-S;
+[[group(10), binding(20)]] var<storage> g8 : [[access(write)]] S;
+[[group(10), binding(20)]] var<storage> g9 : [[access(read)]] S;
+[[group(10), binding(20)]] var<storage> g10 : [[access(read_write)]] S;
fn f0(p0 : bool) -> f32 {
if (p0) {
diff --git a/src/transform/binding_remapper_test.cc b/src/transform/binding_remapper_test.cc
index 4d36ccd..bb7a20c 100644
--- a/src/transform/binding_remapper_test.cc
+++ b/src/transform/binding_remapper_test.cc
@@ -30,11 +30,9 @@
struct S {
};
-[[group(2), binding(1)]] var<storage> a : [[access(read)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
-[[group(3), binding(2)]] var<storage> b : [[access(read)]]
-S;
+[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
[[stage(compute)]]
fn f() {
@@ -57,11 +55,9 @@
struct S {
};
-[[group(2), binding(1)]] var<storage> a : [[access(read)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
-[[group(3), binding(2)]] var<storage> b : [[access(read)]]
-S;
+[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
[[stage(compute)]]
fn f() {
@@ -73,11 +69,9 @@
struct S {
};
-[[group(1), binding(2)]] var<storage> a : [[access(read)]]
-S;
+[[group(1), binding(2)]] var<storage> a : [[access(read)]] S;
-[[group(3), binding(2)]] var<storage> b : [[access(read)]]
-S;
+[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
[[stage(compute)]]
fn f() {
@@ -103,14 +97,11 @@
struct S {
};
-[[group(2), binding(1)]] var<storage> a : [[access(read)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
-[[group(3), binding(2)]] var<storage> b : [[access(write)]]
-S;
+[[group(3), binding(2)]] var<storage> b : [[access(write)]] S;
-[[group(4), binding(3)]] var<storage> c : [[access(read)]]
-S;
+[[group(4), binding(3)]] var<storage> c : [[access(read)]] S;
[[stage(compute)]]
fn f() {
@@ -122,14 +113,11 @@
struct S {
};
-[[group(2), binding(1)]] var<storage> a : [[access(write)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(write)]] S;
-[[group(3), binding(2)]] var<storage> b : [[access(write)]]
-S;
+[[group(3), binding(2)]] var<storage> b : [[access(write)]] S;
-[[group(4), binding(3)]] var<storage> c : [[access(read)]]
-S;
+[[group(4), binding(3)]] var<storage> c : [[access(read)]] S;
[[stage(compute)]]
fn f() {
@@ -157,11 +145,9 @@
struct S {
};
-type ReadOnlyS = [[access(read)]]
-S;
+type ReadOnlyS = [[access(read)]] S;
-type WriteOnlyS = [[access(write)]]
-S;
+type WriteOnlyS = [[access(write)]] S;
type A = S;
@@ -181,16 +167,13 @@
struct S {
};
-type ReadOnlyS = [[access(read)]]
-S;
+type ReadOnlyS = [[access(read)]] S;
-type WriteOnlyS = [[access(write)]]
-S;
+type WriteOnlyS = [[access(write)]] S;
type A = S;
-[[group(2), binding(1)]] var<storage> a : [[access(write)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(write)]] S;
[[group(3), binding(2)]] var<storage> b : WriteOnlyS;
@@ -220,11 +203,9 @@
struct S {
};
-[[group(2), binding(1)]] var<storage> a : [[access(read)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
-[[group(3), binding(2)]] var<storage> b : [[access(read)]]
-S;
+[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
[[stage(compute)]]
fn f() {
@@ -236,11 +217,9 @@
struct S {
};
-[[group(4), binding(5)]] var<storage> a : [[access(write)]]
-S;
+[[group(4), binding(5)]] var<storage> a : [[access(write)]] S;
-[[group(6), binding(7)]] var<storage> b : [[access(write)]]
-S;
+[[group(6), binding(7)]] var<storage> b : [[access(write)]] S;
[[stage(compute)]]
fn f() {
@@ -268,10 +247,8 @@
struct S {
};
-[[group(2), binding(1)]] var<storage> a : [[access(read)]]
-S;
-[[group(3), binding(2)]] var<storage> b : [[access(read)]]
-S;
+[[group(2), binding(1)]] var<storage> a : [[access(read)]] S;
+[[group(3), binding(2)]] var<storage> b : [[access(read)]] S;
[[stage(compute)]]
fn f() {}
diff --git a/src/transform/bound_array_accessors_test.cc b/src/transform/bound_array_accessors_test.cc
index 72f2db1..bda6258 100644
--- a/src/transform/bound_array_accessors_test.cc
+++ b/src/transform/bound_array_accessors_test.cc
@@ -540,8 +540,7 @@
a : f32;
b : array<f32>;
};
-var<storage> s : [[access(read)]]
-S;
+var<storage> s : [[access(read)]] S;
fn f() {
var d : f32 = s.b[25];
@@ -555,8 +554,7 @@
b : array<f32>;
};
-var<storage> s : [[access(read)]]
-S;
+var<storage> s : [[access(read)]] S;
fn f() {
var d : f32 = s.b[min(u32(25), (arrayLength(s.b) - 1u))];
@@ -603,8 +601,7 @@
b : array<f32>;
};
-var<storage> s : [[access(read)]]
-S;
+var<storage> s : [[access(read)]] S;
let c : u32 = 1u;
@@ -622,8 +619,7 @@
b : array<f32>;
};
-var<storage> s : [[access(read)]]
-S;
+var<storage> s : [[access(read)]] S;
let c : u32 = 1u;
diff --git a/src/transform/calculate_array_length_test.cc b/src/transform/calculate_array_length_test.cc
index 91f1291..7aefa51 100644
--- a/src/transform/calculate_array_length_test.cc
+++ b/src/transform/calculate_array_length_test.cc
@@ -30,8 +30,7 @@
arr : array<i32>;
};
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -49,8 +48,7 @@
[[internal(intrinsic_buffer_size)]]
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -74,8 +72,7 @@
arr : array<i32>;
};
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -95,8 +92,7 @@
[[internal(intrinsic_buffer_size)]]
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -123,8 +119,7 @@
arr : [[stride(64)]] array<i32>;
};
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -143,8 +138,7 @@
[[internal(intrinsic_buffer_size)]]
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -168,8 +162,7 @@
arr : array<i32>;
};
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -193,8 +186,7 @@
[[internal(intrinsic_buffer_size)]]
fn tint_symbol(buffer : SB, result : ptr<function, u32>)
-var<storage> sb : [[access(read)]]
-SB;
+var<storage> sb : [[access(read)]] SB;
[[stage(vertex)]]
fn main() {
@@ -233,11 +225,9 @@
arr2 : array<vec4<f32>>;
};
-var<storage> sb1 : [[access(read)]]
-SB1;
+var<storage> sb1 : [[access(read)]] SB1;
-var<storage> sb2 : [[access(read)]]
-SB2;
+var<storage> sb2 : [[access(read)]] SB2;
[[stage(vertex)]]
fn main() {
@@ -266,11 +256,9 @@
[[internal(intrinsic_buffer_size)]]
fn tint_symbol_3(buffer : SB2, result : ptr<function, u32>)
-var<storage> sb1 : [[access(read)]]
-SB1;
+var<storage> sb1 : [[access(read)]] SB1;
-var<storage> sb2 : [[access(read)]]
-SB2;
+var<storage> sb2 : [[access(read)]] SB2;
[[stage(vertex)]]
fn main() {
diff --git a/src/transform/decompose_storage_access_test.cc b/src/transform/decompose_storage_access_test.cc
index 29bbc78..683b699 100644
--- a/src/transform/decompose_storage_access_test.cc
+++ b/src/transform/decompose_storage_access_test.cc
@@ -50,8 +50,7 @@
v : array<vec3<f32>, 2>;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -108,117 +107,91 @@
};
[[internal(intrinsic_load_i32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32) -> i32
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> i32
[[internal(intrinsic_load_u32)]]
-fn tint_symbol_1(buffer : [[access(read_write)]]
-SB, offset : u32) -> u32
+fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32) -> u32
[[internal(intrinsic_load_f32)]]
-fn tint_symbol_2(buffer : [[access(read_write)]]
-SB, offset : u32) -> f32
+fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32) -> f32
[[internal(intrinsic_load_vec2_i32)]]
-fn tint_symbol_3(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<i32>
+fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<i32>
[[internal(intrinsic_load_vec2_u32)]]
-fn tint_symbol_4(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<u32>
+fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<u32>
[[internal(intrinsic_load_vec2_f32)]]
-fn tint_symbol_5(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<f32>
+fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<f32>
[[internal(intrinsic_load_vec3_i32)]]
-fn tint_symbol_6(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<i32>
+fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<i32>
[[internal(intrinsic_load_vec3_u32)]]
-fn tint_symbol_7(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<u32>
+fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<u32>
[[internal(intrinsic_load_vec3_f32)]]
-fn tint_symbol_8(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<f32>
+fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<f32>
[[internal(intrinsic_load_vec4_i32)]]
-fn tint_symbol_9(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<i32>
+fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<i32>
[[internal(intrinsic_load_vec4_u32)]]
-fn tint_symbol_10(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<u32>
+fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<u32>
[[internal(intrinsic_load_vec4_f32)]]
-fn tint_symbol_11(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<f32>
+fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<f32>
[[internal(intrinsic_load_vec2_f32)]]
-fn tint_symbol_12(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<f32>
+fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<f32>
-fn tint_symbol_13(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat2x2<f32> {
+fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x2<f32> {
return mat2x2<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)));
}
[[internal(intrinsic_load_vec3_f32)]]
-fn tint_symbol_14(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<f32>
+fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<f32>
-fn tint_symbol_15(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat2x3<f32> {
+fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x3<f32> {
return mat2x3<f32>(tint_symbol_14(buffer, (offset + 0u)), tint_symbol_14(buffer, (offset + 16u)));
}
[[internal(intrinsic_load_vec4_f32)]]
-fn tint_symbol_16(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<f32>
+fn tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<f32>
-fn tint_symbol_17(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat2x4<f32> {
+fn tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x4<f32> {
return mat2x4<f32>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 16u)));
}
-fn tint_symbol_18(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat3x2<f32> {
+fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x2<f32> {
return mat3x2<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)));
}
-fn tint_symbol_19(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat3x3<f32> {
+fn tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x3<f32> {
return mat3x3<f32>(tint_symbol_14(buffer, (offset + 0u)), tint_symbol_14(buffer, (offset + 16u)), tint_symbol_14(buffer, (offset + 32u)));
}
-fn tint_symbol_20(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat3x4<f32> {
+fn tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x4<f32> {
return mat3x4<f32>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 16u)), tint_symbol_16(buffer, (offset + 32u)));
}
-fn tint_symbol_21(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat4x2<f32> {
+fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x2<f32> {
return mat4x2<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 24u)));
}
-fn tint_symbol_22(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat4x3<f32> {
+fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x3<f32> {
return mat4x3<f32>(tint_symbol_14(buffer, (offset + 0u)), tint_symbol_14(buffer, (offset + 16u)), tint_symbol_14(buffer, (offset + 32u)), tint_symbol_14(buffer, (offset + 48u)));
}
-fn tint_symbol_23(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat4x4<f32> {
+fn tint_symbol_23(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x4<f32> {
return mat4x4<f32>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 16u)), tint_symbol_16(buffer, (offset + 32u)), tint_symbol_16(buffer, (offset + 48u)));
}
-fn tint_symbol_24(buffer : [[access(read_write)]]
-SB, offset : u32) -> array<vec3<f32>, 2> {
+fn tint_symbol_24(buffer : [[access(read_write)]] SB, offset : u32) -> array<vec3<f32>, 2> {
return array<vec3<f32>, 2>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
}
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -280,8 +253,7 @@
v : array<vec3<f32>, 2>;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -338,136 +310,110 @@
};
[[internal(intrinsic_store_i32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32, value : i32)
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32, value : i32)
[[internal(intrinsic_store_u32)]]
-fn tint_symbol_1(buffer : [[access(read_write)]]
-SB, offset : u32, value : u32)
+fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32, value : u32)
[[internal(intrinsic_store_f32)]]
-fn tint_symbol_2(buffer : [[access(read_write)]]
-SB, offset : u32, value : f32)
+fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32, value : f32)
[[internal(intrinsic_store_vec2_u32)]]
-fn tint_symbol_3(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<i32>)
+fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<i32>)
[[internal(intrinsic_store_vec2_f32)]]
-fn tint_symbol_4(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<u32>)
+fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<u32>)
[[internal(intrinsic_store_vec2_i32)]]
-fn tint_symbol_5(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<f32>)
+fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<f32>)
[[internal(intrinsic_store_vec3_u32)]]
-fn tint_symbol_6(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<i32>)
+fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<i32>)
[[internal(intrinsic_store_vec3_f32)]]
-fn tint_symbol_7(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<u32>)
+fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<u32>)
[[internal(intrinsic_store_vec3_i32)]]
-fn tint_symbol_8(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<f32>)
+fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<f32>)
[[internal(intrinsic_store_vec4_u32)]]
-fn tint_symbol_9(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<i32>)
+fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<i32>)
[[internal(intrinsic_store_vec4_f32)]]
-fn tint_symbol_10(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<u32>)
+fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<u32>)
[[internal(intrinsic_store_vec4_i32)]]
-fn tint_symbol_11(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<f32>)
+fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<f32>)
[[internal(intrinsic_store_vec2_i32)]]
-fn tint_symbol_12(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<f32>)
+fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<f32>)
-fn tint_symbol_13(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat2x2<f32>) {
+fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x2<f32>) {
tint_symbol_12(buffer, (offset + 0u), value[0u]);
tint_symbol_12(buffer, (offset + 8u), value[1u]);
}
[[internal(intrinsic_store_vec3_i32)]]
-fn tint_symbol_14(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<f32>)
+fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<f32>)
-fn tint_symbol_15(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat2x3<f32>) {
+fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x3<f32>) {
tint_symbol_14(buffer, (offset + 0u), value[0u]);
tint_symbol_14(buffer, (offset + 16u), value[1u]);
}
[[internal(intrinsic_store_vec4_i32)]]
-fn tint_symbol_16(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<f32>)
+fn tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<f32>)
-fn tint_symbol_17(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat2x4<f32>) {
+fn tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x4<f32>) {
tint_symbol_16(buffer, (offset + 0u), value[0u]);
tint_symbol_16(buffer, (offset + 16u), value[1u]);
}
-fn tint_symbol_18(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat3x2<f32>) {
+fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x2<f32>) {
tint_symbol_12(buffer, (offset + 0u), value[0u]);
tint_symbol_12(buffer, (offset + 8u), value[1u]);
tint_symbol_12(buffer, (offset + 16u), value[2u]);
}
-fn tint_symbol_19(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat3x3<f32>) {
+fn tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x3<f32>) {
tint_symbol_14(buffer, (offset + 0u), value[0u]);
tint_symbol_14(buffer, (offset + 16u), value[1u]);
tint_symbol_14(buffer, (offset + 32u), value[2u]);
}
-fn tint_symbol_20(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat3x4<f32>) {
+fn tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x4<f32>) {
tint_symbol_16(buffer, (offset + 0u), value[0u]);
tint_symbol_16(buffer, (offset + 16u), value[1u]);
tint_symbol_16(buffer, (offset + 32u), value[2u]);
}
-fn tint_symbol_21(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat4x2<f32>) {
+fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x2<f32>) {
tint_symbol_12(buffer, (offset + 0u), value[0u]);
tint_symbol_12(buffer, (offset + 8u), value[1u]);
tint_symbol_12(buffer, (offset + 16u), value[2u]);
tint_symbol_12(buffer, (offset + 24u), value[3u]);
}
-fn tint_symbol_22(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat4x3<f32>) {
+fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x3<f32>) {
tint_symbol_14(buffer, (offset + 0u), value[0u]);
tint_symbol_14(buffer, (offset + 16u), value[1u]);
tint_symbol_14(buffer, (offset + 32u), value[2u]);
tint_symbol_14(buffer, (offset + 48u), value[3u]);
}
-fn tint_symbol_23(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat4x4<f32>) {
+fn tint_symbol_23(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x4<f32>) {
tint_symbol_16(buffer, (offset + 0u), value[0u]);
tint_symbol_16(buffer, (offset + 16u), value[1u]);
tint_symbol_16(buffer, (offset + 32u), value[2u]);
tint_symbol_16(buffer, (offset + 48u), value[3u]);
}
-fn tint_symbol_24(buffer : [[access(read_write)]]
-SB, offset : u32, value : array<vec3<f32>, 2>) {
+fn tint_symbol_24(buffer : [[access(read_write)]] SB, offset : u32, value : array<vec3<f32>, 2>) {
tint_symbol_8(buffer, (offset + 0u), value[0u]);
tint_symbol_8(buffer, (offset + 16u), value[1u]);
}
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -529,8 +475,7 @@
v : array<vec3<f32>, 2>;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -566,122 +511,95 @@
};
[[internal(intrinsic_load_i32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32) -> i32
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> i32
[[internal(intrinsic_load_u32)]]
-fn tint_symbol_1(buffer : [[access(read_write)]]
-SB, offset : u32) -> u32
+fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32) -> u32
[[internal(intrinsic_load_f32)]]
-fn tint_symbol_2(buffer : [[access(read_write)]]
-SB, offset : u32) -> f32
+fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32) -> f32
[[internal(intrinsic_load_vec2_i32)]]
-fn tint_symbol_3(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<i32>
+fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<i32>
[[internal(intrinsic_load_vec2_u32)]]
-fn tint_symbol_4(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<u32>
+fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<u32>
[[internal(intrinsic_load_vec2_f32)]]
-fn tint_symbol_5(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<f32>
+fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<f32>
[[internal(intrinsic_load_vec3_i32)]]
-fn tint_symbol_6(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<i32>
+fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<i32>
[[internal(intrinsic_load_vec3_u32)]]
-fn tint_symbol_7(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<u32>
+fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<u32>
[[internal(intrinsic_load_vec3_f32)]]
-fn tint_symbol_8(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<f32>
+fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<f32>
[[internal(intrinsic_load_vec4_i32)]]
-fn tint_symbol_9(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<i32>
+fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<i32>
[[internal(intrinsic_load_vec4_u32)]]
-fn tint_symbol_10(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<u32>
+fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<u32>
[[internal(intrinsic_load_vec4_f32)]]
-fn tint_symbol_11(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<f32>
+fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<f32>
[[internal(intrinsic_load_vec2_f32)]]
-fn tint_symbol_12(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec2<f32>
+fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32) -> vec2<f32>
-fn tint_symbol_13(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat2x2<f32> {
+fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x2<f32> {
return mat2x2<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)));
}
[[internal(intrinsic_load_vec3_f32)]]
-fn tint_symbol_14(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec3<f32>
+fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32) -> vec3<f32>
-fn tint_symbol_15(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat2x3<f32> {
+fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x3<f32> {
return mat2x3<f32>(tint_symbol_14(buffer, (offset + 0u)), tint_symbol_14(buffer, (offset + 16u)));
}
[[internal(intrinsic_load_vec4_f32)]]
-fn tint_symbol_16(buffer : [[access(read_write)]]
-SB, offset : u32) -> vec4<f32>
+fn tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32) -> vec4<f32>
-fn tint_symbol_17(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat2x4<f32> {
+fn tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32) -> mat2x4<f32> {
return mat2x4<f32>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 16u)));
}
-fn tint_symbol_18(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat3x2<f32> {
+fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x2<f32> {
return mat3x2<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)));
}
-fn tint_symbol_19(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat3x3<f32> {
+fn tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x3<f32> {
return mat3x3<f32>(tint_symbol_14(buffer, (offset + 0u)), tint_symbol_14(buffer, (offset + 16u)), tint_symbol_14(buffer, (offset + 32u)));
}
-fn tint_symbol_20(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat3x4<f32> {
+fn tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32) -> mat3x4<f32> {
return mat3x4<f32>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 16u)), tint_symbol_16(buffer, (offset + 32u)));
}
-fn tint_symbol_21(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat4x2<f32> {
+fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x2<f32> {
return mat4x2<f32>(tint_symbol_12(buffer, (offset + 0u)), tint_symbol_12(buffer, (offset + 8u)), tint_symbol_12(buffer, (offset + 16u)), tint_symbol_12(buffer, (offset + 24u)));
}
-fn tint_symbol_22(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat4x3<f32> {
+fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x3<f32> {
return mat4x3<f32>(tint_symbol_14(buffer, (offset + 0u)), tint_symbol_14(buffer, (offset + 16u)), tint_symbol_14(buffer, (offset + 32u)), tint_symbol_14(buffer, (offset + 48u)));
}
-fn tint_symbol_23(buffer : [[access(read_write)]]
-SB, offset : u32) -> mat4x4<f32> {
+fn tint_symbol_23(buffer : [[access(read_write)]] SB, offset : u32) -> mat4x4<f32> {
return mat4x4<f32>(tint_symbol_16(buffer, (offset + 0u)), tint_symbol_16(buffer, (offset + 16u)), tint_symbol_16(buffer, (offset + 32u)), tint_symbol_16(buffer, (offset + 48u)));
}
-fn tint_symbol_24(buffer : [[access(read_write)]]
-SB, offset : u32) -> array<vec3<f32>, 2> {
+fn tint_symbol_24(buffer : [[access(read_write)]] SB, offset : u32) -> array<vec3<f32>, 2> {
return array<vec3<f32>, 2>(tint_symbol_8(buffer, (offset + 0u)), tint_symbol_8(buffer, (offset + 16u)));
}
-fn tint_symbol_25(buffer : [[access(read_write)]]
-SB, offset : u32) -> SB {
+fn tint_symbol_25(buffer : [[access(read_write)]] SB, offset : u32) -> SB {
return SB(tint_symbol(buffer, (offset + 0u)), tint_symbol_1(buffer, (offset + 4u)), tint_symbol_2(buffer, (offset + 8u)), tint_symbol_3(buffer, (offset + 16u)), tint_symbol_4(buffer, (offset + 24u)), tint_symbol_5(buffer, (offset + 32u)), tint_symbol_6(buffer, (offset + 48u)), tint_symbol_7(buffer, (offset + 64u)), tint_symbol_8(buffer, (offset + 80u)), tint_symbol_9(buffer, (offset + 96u)), tint_symbol_10(buffer, (offset + 112u)), tint_symbol_11(buffer, (offset + 128u)), tint_symbol_13(buffer, (offset + 144u)), tint_symbol_15(buffer, (offset + 160u)), tint_symbol_17(buffer, (offset + 192u)), tint_symbol_18(buffer, (offset + 224u)), tint_symbol_19(buffer, (offset + 256u)), tint_symbol_20(buffer, (offset + 304u)), tint_symbol_21(buffer, (offset + 352u)), tint_symbol_22(buffer, (offset + 384u)), tint_symbol_23(buffer, (offset + 448u)), tint_symbol_24(buffer, (offset + 512u)));
}
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -722,8 +640,7 @@
v : array<vec3<f32>, 2>;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -759,136 +676,110 @@
};
[[internal(intrinsic_store_i32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32, value : i32)
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32, value : i32)
[[internal(intrinsic_store_u32)]]
-fn tint_symbol_1(buffer : [[access(read_write)]]
-SB, offset : u32, value : u32)
+fn tint_symbol_1(buffer : [[access(read_write)]] SB, offset : u32, value : u32)
[[internal(intrinsic_store_f32)]]
-fn tint_symbol_2(buffer : [[access(read_write)]]
-SB, offset : u32, value : f32)
+fn tint_symbol_2(buffer : [[access(read_write)]] SB, offset : u32, value : f32)
[[internal(intrinsic_store_vec2_u32)]]
-fn tint_symbol_3(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<i32>)
+fn tint_symbol_3(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<i32>)
[[internal(intrinsic_store_vec2_f32)]]
-fn tint_symbol_4(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<u32>)
+fn tint_symbol_4(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<u32>)
[[internal(intrinsic_store_vec2_i32)]]
-fn tint_symbol_5(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<f32>)
+fn tint_symbol_5(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<f32>)
[[internal(intrinsic_store_vec3_u32)]]
-fn tint_symbol_6(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<i32>)
+fn tint_symbol_6(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<i32>)
[[internal(intrinsic_store_vec3_f32)]]
-fn tint_symbol_7(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<u32>)
+fn tint_symbol_7(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<u32>)
[[internal(intrinsic_store_vec3_i32)]]
-fn tint_symbol_8(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<f32>)
+fn tint_symbol_8(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<f32>)
[[internal(intrinsic_store_vec4_u32)]]
-fn tint_symbol_9(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<i32>)
+fn tint_symbol_9(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<i32>)
[[internal(intrinsic_store_vec4_f32)]]
-fn tint_symbol_10(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<u32>)
+fn tint_symbol_10(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<u32>)
[[internal(intrinsic_store_vec4_i32)]]
-fn tint_symbol_11(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<f32>)
+fn tint_symbol_11(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<f32>)
[[internal(intrinsic_store_vec2_i32)]]
-fn tint_symbol_12(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec2<f32>)
+fn tint_symbol_12(buffer : [[access(read_write)]] SB, offset : u32, value : vec2<f32>)
-fn tint_symbol_13(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat2x2<f32>) {
+fn tint_symbol_13(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x2<f32>) {
tint_symbol_12(buffer, (offset + 0u), value[0u]);
tint_symbol_12(buffer, (offset + 8u), value[1u]);
}
[[internal(intrinsic_store_vec3_i32)]]
-fn tint_symbol_14(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec3<f32>)
+fn tint_symbol_14(buffer : [[access(read_write)]] SB, offset : u32, value : vec3<f32>)
-fn tint_symbol_15(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat2x3<f32>) {
+fn tint_symbol_15(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x3<f32>) {
tint_symbol_14(buffer, (offset + 0u), value[0u]);
tint_symbol_14(buffer, (offset + 16u), value[1u]);
}
[[internal(intrinsic_store_vec4_i32)]]
-fn tint_symbol_16(buffer : [[access(read_write)]]
-SB, offset : u32, value : vec4<f32>)
+fn tint_symbol_16(buffer : [[access(read_write)]] SB, offset : u32, value : vec4<f32>)
-fn tint_symbol_17(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat2x4<f32>) {
+fn tint_symbol_17(buffer : [[access(read_write)]] SB, offset : u32, value : mat2x4<f32>) {
tint_symbol_16(buffer, (offset + 0u), value[0u]);
tint_symbol_16(buffer, (offset + 16u), value[1u]);
}
-fn tint_symbol_18(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat3x2<f32>) {
+fn tint_symbol_18(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x2<f32>) {
tint_symbol_12(buffer, (offset + 0u), value[0u]);
tint_symbol_12(buffer, (offset + 8u), value[1u]);
tint_symbol_12(buffer, (offset + 16u), value[2u]);
}
-fn tint_symbol_19(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat3x3<f32>) {
+fn tint_symbol_19(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x3<f32>) {
tint_symbol_14(buffer, (offset + 0u), value[0u]);
tint_symbol_14(buffer, (offset + 16u), value[1u]);
tint_symbol_14(buffer, (offset + 32u), value[2u]);
}
-fn tint_symbol_20(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat3x4<f32>) {
+fn tint_symbol_20(buffer : [[access(read_write)]] SB, offset : u32, value : mat3x4<f32>) {
tint_symbol_16(buffer, (offset + 0u), value[0u]);
tint_symbol_16(buffer, (offset + 16u), value[1u]);
tint_symbol_16(buffer, (offset + 32u), value[2u]);
}
-fn tint_symbol_21(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat4x2<f32>) {
+fn tint_symbol_21(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x2<f32>) {
tint_symbol_12(buffer, (offset + 0u), value[0u]);
tint_symbol_12(buffer, (offset + 8u), value[1u]);
tint_symbol_12(buffer, (offset + 16u), value[2u]);
tint_symbol_12(buffer, (offset + 24u), value[3u]);
}
-fn tint_symbol_22(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat4x3<f32>) {
+fn tint_symbol_22(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x3<f32>) {
tint_symbol_14(buffer, (offset + 0u), value[0u]);
tint_symbol_14(buffer, (offset + 16u), value[1u]);
tint_symbol_14(buffer, (offset + 32u), value[2u]);
tint_symbol_14(buffer, (offset + 48u), value[3u]);
}
-fn tint_symbol_23(buffer : [[access(read_write)]]
-SB, offset : u32, value : mat4x4<f32>) {
+fn tint_symbol_23(buffer : [[access(read_write)]] SB, offset : u32, value : mat4x4<f32>) {
tint_symbol_16(buffer, (offset + 0u), value[0u]);
tint_symbol_16(buffer, (offset + 16u), value[1u]);
tint_symbol_16(buffer, (offset + 32u), value[2u]);
tint_symbol_16(buffer, (offset + 48u), value[3u]);
}
-fn tint_symbol_24(buffer : [[access(read_write)]]
-SB, offset : u32, value : array<vec3<f32>, 2>) {
+fn tint_symbol_24(buffer : [[access(read_write)]] SB, offset : u32, value : array<vec3<f32>, 2>) {
tint_symbol_8(buffer, (offset + 0u), value[0u]);
tint_symbol_8(buffer, (offset + 16u), value[1u]);
}
-fn tint_symbol_25(buffer : [[access(read_write)]]
-SB, offset : u32, value : SB) {
+fn tint_symbol_25(buffer : [[access(read_write)]] SB, offset : u32, value : SB) {
tint_symbol(buffer, (offset + 0u), value.a);
tint_symbol_1(buffer, (offset + 4u), value.b);
tint_symbol_2(buffer, (offset + 8u), value.c);
@@ -913,8 +804,7 @@
tint_symbol_24(buffer, (offset + 512u), value.v);
}
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -948,8 +838,7 @@
b : [[stride(256)]] array<S2>;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -985,11 +874,9 @@
};
[[internal(intrinsic_load_f32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32) -> f32
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> f32
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -1023,8 +910,7 @@
b : [[stride(256)]] array<S2>;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -1056,11 +942,9 @@
};
[[internal(intrinsic_load_f32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32) -> f32
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> f32
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -1105,8 +989,7 @@
b : A2_Array;
};
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
@@ -1146,11 +1029,9 @@
};
[[internal(intrinsic_load_f32)]]
-fn tint_symbol(buffer : [[access(read_write)]]
-SB, offset : u32) -> f32
+fn tint_symbol(buffer : [[access(read_write)]] SB, offset : u32) -> f32
-var<storage> sb : [[access(read_write)]]
-SB;
+var<storage> sb : [[access(read_write)]] SB;
[[stage(compute)]]
fn main() {
diff --git a/src/transform/vertex_pulling_test.cc b/src/transform/vertex_pulling_test.cc
index 3689216..bf319d6 100644
--- a/src/transform/vertex_pulling_test.cc
+++ b/src/transform/vertex_pulling_test.cc
@@ -118,8 +118,7 @@
tint_vertex_data : [[stride(4)]] array<u32>;
};
-[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
var<private> var_a : f32;
@@ -161,8 +160,7 @@
tint_vertex_data : [[stride(4)]] array<u32>;
};
-[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
var<private> var_a : f32;
@@ -204,8 +202,7 @@
tint_vertex_data : [[stride(4)]] array<u32>;
};
-[[binding(0), group(5)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(5)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
var<private> var_a : f32;
@@ -250,11 +247,9 @@
tint_vertex_data : [[stride(4)]] array<u32>;
};
-[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
-[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]]
-TintVertexData;
+[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
var<private> var_a : f32;
@@ -315,8 +310,7 @@
tint_vertex_data : [[stride(4)]] array<u32>;
};
-[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
var<private> var_a : f32;
@@ -366,14 +360,11 @@
tint_vertex_data : [[stride(4)]] array<u32>;
};
-[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0 : [[access(read)]] TintVertexData;
-[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]]
-TintVertexData;
+[[binding(1), group(4)]] var<storage> tint_pulling_vertex_buffer_1 : [[access(read)]] TintVertexData;
-[[binding(2), group(4)]] var<storage> tint_pulling_vertex_buffer_2 : [[access(read)]]
-TintVertexData;
+[[binding(2), group(4)]] var<storage> tint_pulling_vertex_buffer_2 : [[access(read)]] TintVertexData;
var<private> var_a : vec2<f32>;
@@ -432,8 +423,7 @@
tint_vertex_data_1 : [[stride(4)]] array<u32>;
};
-[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0_1 : [[access(read)]]
-TintVertexData;
+[[binding(0), group(4)]] var<storage> tint_pulling_vertex_buffer_0_1 : [[access(read)]] TintVertexData;
var<private> var_a : f32;
diff --git a/src/writer/wgsl/generator_impl.cc b/src/writer/wgsl/generator_impl.cc
index 78242ec..5531f1b 100644
--- a/src/writer/wgsl/generator_impl.cc
+++ b/src/writer/wgsl/generator_impl.cc
@@ -383,7 +383,7 @@
diagnostics_.add_error("invalid access control");
return false;
}
- out_ << ")]]" << std::endl;
+ out_ << ")]] ";
if (!EmitType(ac->type())) {
return false;
}
diff --git a/src/writer/wgsl/generator_impl_function_test.cc b/src/writer/wgsl/generator_impl_function_test.cc
index 05bc689..4f06993 100644
--- a/src/writer/wgsl/generator_impl_function_test.cc
+++ b/src/writer/wgsl/generator_impl_function_test.cc
@@ -256,8 +256,7 @@
d : f32;
};
-[[binding(0), group(0)]] var<storage> data : [[access(read_write)]]
-Data;
+[[binding(0), group(0)]] var<storage> data : [[access(read_write)]] Data;
[[stage(compute)]]
fn a() {
diff --git a/src/writer/wgsl/generator_impl_type_test.cc b/src/writer/wgsl/generator_impl_type_test.cc
index e776436..fddffcc 100644
--- a/src/writer/wgsl/generator_impl_type_test.cc
+++ b/src/writer/wgsl/generator_impl_type_test.cc
@@ -53,7 +53,7 @@
GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.EmitType(&a)) << gen.error();
- EXPECT_EQ(gen.result(), "[[access(read)]]\nS");
+ EXPECT_EQ(gen.result(), "[[access(read)]] S");
}
TEST_F(WgslGeneratorImplTest, EmitType_AccessControl_ReadWrite) {
@@ -65,7 +65,7 @@
GeneratorImpl& gen = Build();
ASSERT_TRUE(gen.EmitType(&a)) << gen.error();
- EXPECT_EQ(gen.result(), "[[access(read_write)]]\nS");
+ EXPECT_EQ(gen.result(), "[[access(read_write)]] S");
}
TEST_F(WgslGeneratorImplTest, EmitType_Array_Decoration) {
@@ -451,35 +451,35 @@
StorageTextureData{type::ImageFormat::kR8Unorm,
type::TextureDimension::k1d,
ast::AccessControl::kReadOnly,
- "[[access(read)]]\ntexture_storage_1d<r8unorm>"},
+ "[[access(read)]] texture_storage_1d<r8unorm>"},
StorageTextureData{type::ImageFormat::kR8Unorm,
type::TextureDimension::k2d,
ast::AccessControl::kReadOnly,
- "[[access(read)]]\ntexture_storage_2d<r8unorm>"},
+ "[[access(read)]] texture_storage_2d<r8unorm>"},
StorageTextureData{
type::ImageFormat::kR8Unorm, type::TextureDimension::k2dArray,
ast::AccessControl::kReadOnly,
- "[[access(read)]]\ntexture_storage_2d_array<r8unorm>"},
+ "[[access(read)]] texture_storage_2d_array<r8unorm>"},
StorageTextureData{type::ImageFormat::kR8Unorm,
type::TextureDimension::k3d,
ast::AccessControl::kReadOnly,
- "[[access(read)]]\ntexture_storage_3d<r8unorm>"},
+ "[[access(read)]] texture_storage_3d<r8unorm>"},
StorageTextureData{type::ImageFormat::kR8Unorm,
type::TextureDimension::k1d,
ast::AccessControl::kWriteOnly,
- "[[access(write)]]\ntexture_storage_1d<r8unorm>"},
+ "[[access(write)]] texture_storage_1d<r8unorm>"},
StorageTextureData{type::ImageFormat::kR8Unorm,
type::TextureDimension::k2d,
ast::AccessControl::kWriteOnly,
- "[[access(write)]]\ntexture_storage_2d<r8unorm>"},
+ "[[access(write)]] texture_storage_2d<r8unorm>"},
StorageTextureData{
type::ImageFormat::kR8Unorm, type::TextureDimension::k2dArray,
ast::AccessControl::kWriteOnly,
- "[[access(write)]]\ntexture_storage_2d_array<r8unorm>"},
+ "[[access(write)]] texture_storage_2d_array<r8unorm>"},
StorageTextureData{type::ImageFormat::kR8Unorm,
type::TextureDimension::k3d,
ast::AccessControl::kWriteOnly,
- "[[access(write)]]\ntexture_storage_3d<r8unorm>"}));
+ "[[access(write)]] texture_storage_3d<r8unorm>"}));
struct ImageFormatData {
type::ImageFormat fmt;
diff --git a/src/writer/wgsl/generator_impl_variable_decl_statement_test.cc b/src/writer/wgsl/generator_impl_variable_decl_statement_test.cc
index 545de83..2878e43 100644
--- a/src/writer/wgsl/generator_impl_variable_decl_statement_test.cc
+++ b/src/writer/wgsl/generator_impl_variable_decl_statement_test.cc
@@ -98,7 +98,7 @@
gen.increment_indent();
ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error();
- EXPECT_EQ(gen.result(), " var t : [[access(read)]]\ntexture_1d<f32>;\n");
+ EXPECT_EQ(gen.result(), " var t : [[access(read)]] texture_1d<f32>;\n");
}
} // namespace