diff --git a/src/tests/end2end/ClipSpaceTests.cpp b/src/tests/end2end/ClipSpaceTests.cpp index 980fe1e183..278560da2a 100644 --- a/src/tests/end2end/ClipSpaceTests.cpp +++ b/src/tests/end2end/ClipSpaceTests.cpp @@ -37,16 +37,14 @@ class ClipSpaceTest : public DawnTest { [[builtin(vertex_idx)]] var VertexIndex : i32; [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { Position = vec4(pos[VertexIndex], 1.0); return; })"); pipelineDescriptor.cFragmentStage.module = utils::CreateShaderModuleFromWGSL(device, R"( [[location(0)]] var fragColor : vec4;; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = vec4(1.0, 0.0, 0.0, 1.0); return; })"); diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp index 83b35ba7b9..a932739a7b 100644 --- a/src/tests/end2end/ColorStateTests.cpp +++ b/src/tests/end2end/ColorStateTests.cpp @@ -33,8 +33,7 @@ class ColorStateTest : public DawnTest { [[builtin(vertex_idx)]] var VertexIndex : i32; [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { const pos : array, 3> = array, 3>( vec2(-1.0, -1.0), vec2(3.0, -1.0), @@ -64,8 +63,7 @@ class ColorStateTest : public DawnTest { [[location(0)]] var fragColor : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = myUbo.color; return; } @@ -785,8 +783,7 @@ TEST_P(ColorStateTest, IndependentColorState) { [[location(2)]] var fragColor2 : vec4; [[location(3)]] var fragColor3 : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor0 = myUbo.color0; fragColor1 = myUbo.color1; fragColor2 = myUbo.color2; @@ -890,8 +887,7 @@ TEST_P(ColorStateTest, DefaultBlendColor) { [[location(0)]] var fragColor : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = myUbo.color; return; } @@ -1014,8 +1010,7 @@ TEST_P(ColorStateTest, ColorWriteMaskDoesNotAffectRenderPassLoadOpClear) { [[location(0)]] var fragColor : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = myUbo.color; return; } diff --git a/src/tests/end2end/CompressedTextureFormatTests.cpp b/src/tests/end2end/CompressedTextureFormatTests.cpp index 106f37cb00..8a2fe23f83 100644 --- a/src/tests/end2end/CompressedTextureFormatTests.cpp +++ b/src/tests/end2end/CompressedTextureFormatTests.cpp @@ -145,8 +145,7 @@ class CompressedTextureBCFormatTest : public DawnTest { [[builtin(vertex_idx)]] var VertexIndex : i32; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { const pos : array, 3> = array, 3>( vec2(-3.0, 1.0), vec2( 3.0, 1.0), @@ -163,8 +162,7 @@ class CompressedTextureBCFormatTest : public DawnTest { [[location(0)]] var texCoord : vec2; [[location(0)]] var fragColor : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = textureSample(texture0, sampler0, texCoord); return; })"); diff --git a/src/tests/end2end/CullingTests.cpp b/src/tests/end2end/CullingTests.cpp index af9f5a3197..7445c4f93c 100644 --- a/src/tests/end2end/CullingTests.cpp +++ b/src/tests/end2end/CullingTests.cpp @@ -37,8 +37,7 @@ class CullingTest : public DawnTest { [[builtin(vertex_idx)]] var VertexIndex : i32; [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { Position = vec4(pos[VertexIndex], 0.0, 1.0); return; })"); @@ -50,8 +49,7 @@ class CullingTest : public DawnTest { [[location(0)]] var fragColor : vec4;; [[builtin(frag_coord)]] var FragCoord : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = vec4( (FragCoord.xy - vec2(0.5, 0.5)) / vec2(255.0, 255.0), 0.0, 1.0); diff --git a/src/tests/end2end/D3D12CachingTests.cpp b/src/tests/end2end/D3D12CachingTests.cpp index 27690b773e..39742a9678 100644 --- a/src/tests/end2end/D3D12CachingTests.cpp +++ b/src/tests/end2end/D3D12CachingTests.cpp @@ -103,16 +103,14 @@ TEST_P(D3D12CachingTests, SameShaderNoCache) { wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn vertex_main() -> void { + [[stage(vertex)]] fn vertex_main() -> void { Position = vec4(0.0, 0.0, 0.0, 1.0); return; } [[location(0)]] var outColor : vec4; - [[stage(fragment)]] - fn fragment_main() -> void { + [[stage(fragment)]] fn fragment_main() -> void { outColor = vec4(1.0, 0.0, 0.0, 1.0); return; } @@ -152,16 +150,14 @@ TEST_P(D3D12CachingTests, ReuseShaderWithMultipleEntryPointsPerStage) { wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn vertex_main() -> void { + [[stage(vertex)]] fn vertex_main() -> void { Position = vec4(0.0, 0.0, 0.0, 1.0); return; } [[location(0)]] var outColor : vec4; - [[stage(fragment)]] - fn fragment_main() -> void { + [[stage(fragment)]] fn fragment_main() -> void { outColor = vec4(1.0, 0.0, 0.0, 1.0); return; } @@ -199,16 +195,14 @@ TEST_P(D3D12CachingTests, ReuseShaderWithMultipleEntryPointsPerStage) { wgpu::ShaderModule newModule = utils::CreateShaderModuleFromWGSL(device, R"( [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn vertex_main() -> void { + [[stage(vertex)]] fn vertex_main() -> void { Position = vec4(1.0, 1.0, 1.0, 1.0); return; } [[location(0)]] var outColor : vec4; - [[stage(fragment)]] - fn fragment_main() -> void { + [[stage(fragment)]] fn fragment_main() -> void { outColor = vec4(1.0, 1.0, 1.0, 1.0); return; } @@ -237,14 +231,12 @@ TEST_P(D3D12CachingTests, ReuseShaderWithMultipleEntryPoints) { }; [[binding(0), set(0)]] var data : Data; - [[stage(compute)]] - fn write1() -> void { + [[stage(compute)]] fn write1() -> void { data.data = 1u; return; } - [[stage(compute)]] - fn write42() -> void { + [[stage(compute)]] fn write42() -> void { data.data = 42u; return; } @@ -284,4 +276,4 @@ TEST_P(D3D12CachingTests, ReuseShaderWithMultipleEntryPoints) { EXPECT_EQ(mPersistentCache.mCache.size(), 2u); } -DAWN_INSTANTIATE_TEST(D3D12CachingTests, D3D12Backend()); \ No newline at end of file +DAWN_INSTANTIATE_TEST(D3D12CachingTests, D3D12Backend()); diff --git a/src/tests/end2end/DepthBiasTests.cpp b/src/tests/end2end/DepthBiasTests.cpp index 4e4a41bb1f..00d0509294 100644 --- a/src/tests/end2end/DepthBiasTests.cpp +++ b/src/tests/end2end/DepthBiasTests.cpp @@ -38,8 +38,7 @@ class DepthBiasTests : public DawnTest { vertexSource = R"( [[builtin(vertex_idx)]] var VertexIndex : i32; [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { const pos : array, 6> = array, 6>( vec2(-1.0, -1.0), vec2( 1.0, -1.0), @@ -57,8 +56,7 @@ class DepthBiasTests : public DawnTest { vertexSource = R"( [[builtin(vertex_idx)]] var VertexIndex : i32; [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { const pos : array, 6> = array, 6>( vec3(-1.0, -1.0, 0.0), vec3( 1.0, -1.0, 0.0), @@ -76,8 +74,7 @@ class DepthBiasTests : public DawnTest { wgpu::ShaderModule fragmentModule = utils::CreateShaderModuleFromWGSL(device, R"( [[location(0)]] var fragColor : vec4;; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { fragColor = vec4(1.0, 0.0, 0.0, 1.0); return; })"); diff --git a/src/tests/end2end/EntryPointTests.cpp b/src/tests/end2end/EntryPointTests.cpp index 7e3e071681..7f0600962c 100644 --- a/src/tests/end2end/EntryPointTests.cpp +++ b/src/tests/end2end/EntryPointTests.cpp @@ -27,16 +27,14 @@ TEST_P(EntryPointTests, FragAndVertexSameModule) { wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn vertex_main() -> void { + [[stage(vertex)]] fn vertex_main() -> void { Position = vec4(0.0, 0.0, 0.0, 1.0); return; } [[location(0)]] var outColor : vec4; - [[stage(fragment)]] - fn fragment_main() -> void { + [[stage(fragment)]] fn fragment_main() -> void { outColor = vec4(1.0, 0.0, 0.0, 1.0); return; } @@ -82,14 +80,12 @@ TEST_P(EntryPointTests, TwoComputeInModule) { }; [[binding(0), set(0)]] var data : Data; - [[stage(compute)]] - fn write1() -> void { + [[stage(compute)]] fn write1() -> void { data.data = 1u; return; } - [[stage(compute)]] - fn write42() -> void { + [[stage(compute)]] fn write42() -> void { data.data = 42u; return; } diff --git a/src/tests/end2end/VertexBufferRobustnessTests.cpp b/src/tests/end2end/VertexBufferRobustnessTests.cpp index d6a5ab9f32..9c9a25a68c 100644 --- a/src/tests/end2end/VertexBufferRobustnessTests.cpp +++ b/src/tests/end2end/VertexBufferRobustnessTests.cpp @@ -35,8 +35,7 @@ class VertexBufferRobustnessTest : public DawnTest { return utils::CreateShaderModuleFromWGSL(device, (attributes + R"( [[builtin(position)]] var Position : vec4; - [[stage(vertex)]] - fn main() -> void { + [[stage(vertex)]] fn main() -> void { if ()" + successExpression + R"() { # Success case, move the vertex out of the viewport Position = vec4(-10.0, 0.0, 0.0, 1.0); @@ -61,8 +60,7 @@ class VertexBufferRobustnessTest : public DawnTest { wgpu::ShaderModule fsModule = utils::CreateShaderModuleFromWGSL(device, R"( [[location(0)]] var outColor : vec4; - [[stage(fragment)]] - fn main() -> void { + [[stage(fragment)]] fn main() -> void { outColor = vec4(1.0, 1.0, 1.0, 1.0); return; } diff --git a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp index 95459b113b..b11dd9193d 100644 --- a/src/tests/unittests/validation/RenderPipelineValidationTests.cpp +++ b/src/tests/unittests/validation/RenderPipelineValidationTests.cpp @@ -594,15 +594,13 @@ TEST_F(RenderPipelineValidationTest, EntryPointNameValidation) { wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"( [[builtin(position)]] var position : vec4; - [[stage(vertex)]] - fn vertex_main() -> void { + [[stage(vertex)]] fn vertex_main() -> void { position = vec4(0.0, 0.0, 0.0, 1.0); return; } [[location(0)]] var color : vec4; - [[stage(fragment)]] - fn fragment_main() -> void { + [[stage(fragment)]] fn fragment_main() -> void { color = vec4(1.0, 0.0, 0.0, 1.0); return; } @@ -651,13 +649,11 @@ TEST_F(RenderPipelineValidationTest, VertexAttribCorrectEntryPoint) { [[location(0)]] var attrib0 : vec4; [[location(1)]] var attrib1 : vec4; - [[stage(vertex)]] - fn vertex0() -> void { + [[stage(vertex)]] fn vertex0() -> void { position = attrib0; return; } - [[stage(vertex)]] - fn vertex1() -> void { + [[stage(vertex)]] fn vertex1() -> void { position = attrib1; return; } @@ -700,13 +696,11 @@ TEST_F(RenderPipelineValidationTest, FragmentOutputCorrectEntryPoint) { [[location(0)]] var colorFloat : vec4; [[location(0)]] var colorUint : vec4; - [[stage(fragment)]] - fn fragmentFloat() -> void { + [[stage(fragment)]] fn fragmentFloat() -> void { colorFloat = vec4(0.0, 0.0, 0.0, 0.0); return; } - [[stage(fragment)]] - fn fragmentUint() -> void { + [[stage(fragment)]] fn fragmentUint() -> void { colorUint = vec4(0, 0, 0, 0); return; }