Update comments in test WGSL files.
This CL updates the test WGSL files to use // for comments instead of #.
Change-Id: I5ba31cfe15e9f293bcb82f82e2a3dbe6f6e61e96
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37480
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/test/compute_boids.wgsl b/test/compute_boids.wgsl
index 99c0549..9b0059e 100644
--- a/test/compute_boids.wgsl
+++ b/test/compute_boids.wgsl
@@ -1,18 +1,18 @@
-# Copyright 2020 The Tint Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
-# vertex shader
+// vertex shader
[[location(0)]] var<in> a_particlePos : vec2<f32>;
[[location(1)]] var<in> a_particleVel : vec2<f32>;
@@ -28,7 +28,7 @@
gl_Position = vec4<f32>(pos + a_particlePos, 0.0, 1.0);
}
-# fragment shader
+// fragment shader
[[location(0)]] var<out> fragColor : vec4<f32>;
[[stage(fragment)]]
@@ -36,7 +36,7 @@
fragColor = vec4<f32>(1.0, 1.0, 1.0, 1.0);
}
-# compute shader
+// compute shader
[[block]] struct Particle {
[[offset(0)]] pos : vec2<f32>;
[[offset(8)]] vel : vec2<f32>;
@@ -62,7 +62,7 @@
[[builtin(global_invocation_id)]] var<in> gl_GlobalInvocationID : vec3<u32>;
-# https://github.com/austinEng/Project6-Vulkan-Flocking/blob/master/data/shaders/computeparticles/particle.comp
+// https://github.com/austinEng/Project6-Vulkan-Flocking/blob/master/data/shaders/computeparticles/particle.comp
[[stage(compute)]]
fn comp_main() -> void {
var index : u32 = gl_GlobalInvocationID.x;
@@ -112,13 +112,13 @@
vVel = vVel + (cMass * params.rule1Scale) + (colVel * params.rule2Scale) +
(cVel * params.rule3Scale);
- # clamp velocity for a more pleasing simulation
+ // clamp velocity for a more pleasing simulation
vVel = normalize(vVel) * clamp(length(vVel), 0.0, 0.1);
- # kinematic update
+ // kinematic update
vPos = vPos + (vVel * params.deltaT);
- # Wrap around boundary
+ // Wrap around boundary
if (vPos.x < -1.0) {
vPos.x = 1.0;
}
@@ -132,7 +132,7 @@
vPos.y = -1.0;
}
- # Write back
+ // Write back
particlesB.particles[index].pos = vPos;
particlesB.particles[index].vel = vVel;
}
diff --git a/test/cube.wgsl b/test/cube.wgsl
index ee2d2cb..0e0377b 100644
--- a/test/cube.wgsl
+++ b/test/cube.wgsl
@@ -1,18 +1,18 @@
-# Copyright 2020 The Tint Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
-# Vertex shader
+// Vertex shader
[[block]] struct Uniforms {
[[offset(0)]] modelViewProjectionMatrix : mat4x4<f32>;
};
@@ -30,7 +30,7 @@
vtxFragColor = color;
}
-# Fragment shader
+// Fragment shader
[[location(0)]] var<in> fragColor : vec4<f32>;
[[location(0)]] var<out> outColor : vec4<f32>;
diff --git a/test/function.wgsl b/test/function.wgsl
index 604b8ff..9016ba2 100644
--- a/test/function.wgsl
+++ b/test/function.wgsl
@@ -1,16 +1,16 @@
-# Copyright 2020 The Tint Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
fn main() -> f32 {
return ((2. * 3.) - 4.) / 5.;
diff --git a/test/simple.wgsl b/test/simple.wgsl
index 844bfcb..e372d2d 100644
--- a/test/simple.wgsl
+++ b/test/simple.wgsl
@@ -1,16 +1,16 @@
-# Copyright 2020 The Tint Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
[[location(0)]] var<out> gl_FragColor : vec4<f32>;
diff --git a/test/triangle.wgsl b/test/triangle.wgsl
index d612c94..6a29c19 100644
--- a/test/triangle.wgsl
+++ b/test/triangle.wgsl
@@ -1,18 +1,18 @@
-# Copyright 2020 The Tint Authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
+// Copyright 2020 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
-# Vertex shader
+// Vertex shader
const pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(
vec2<f32>(0.0, 0.5),
vec2<f32>(-0.5, -0.5),
@@ -26,7 +26,7 @@
Position = vec4<f32>(pos[VertexIndex], 0.0, 1.0);
}
-# Fragment shader
+// Fragment shader
[[location(0)]] var<out> outColor : vec4<f32>;
[[stage(fragment)]]