diff --git a/examples/CHelloTriangle.cpp b/examples/CHelloTriangle.cpp index 633f553c7f..1caed996d1 100644 --- a/examples/CHelloTriangle.cpp +++ b/examples/CHelloTriangle.cpp @@ -40,7 +40,7 @@ void init() { [[stage(vertex)]] fn main( [[builtin(vertex_index)]] VertexIndex : u32 ) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2( 0.0, 0.5), vec2(-0.5, -0.5), vec2( 0.5, -0.5) diff --git a/examples/ManualSwapChainTest.cpp b/examples/ManualSwapChainTest.cpp index 0063ad8025..e282af425e 100644 --- a/examples/ManualSwapChainTest.cpp +++ b/examples/ManualSwapChainTest.cpp @@ -315,7 +315,7 @@ int main(int argc, const char* argv[]) { pipelineDesc.vertex.module = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2( 0.0, 0.5), vec2(-0.5, -0.5), vec2( 0.5, -0.5) diff --git a/src/dawn_native/CopyTextureForBrowserHelper.cpp b/src/dawn_native/CopyTextureForBrowserHelper.cpp index 5094f28a9d..089fe1f45f 100644 --- a/src/dawn_native/CopyTextureForBrowserHelper.cpp +++ b/src/dawn_native/CopyTextureForBrowserHelper.cpp @@ -48,7 +48,7 @@ namespace dawn_native { [[stage(vertex)]] fn main( [[builtin(vertex_index)]] VertexIndex : u32 ) -> VertexOutputs { - var texcoord : array, 3> = array, 3>( + var texcoord = array, 3>( vec2(-0.5, 0.0), vec2( 1.5, 0.0), vec2( 0.5, 2.0)); @@ -58,7 +58,7 @@ namespace dawn_native { // Y component of scale is calculated by the copySizeHeight / textureHeight. Only // flipY case can get negative number. - var flipY : bool = uniforms.u_scale.y < 0.0; + var flipY = uniforms.u_scale.y < 0.0; // Texture coordinate takes top-left as origin point. We need to map the // texture to triangle carefully. @@ -88,13 +88,13 @@ namespace dawn_native { [[location(0)]] texcoord : vec2 ) -> [[location(0)]] vec4 { // Clamp the texcoord and discard the out-of-bound pixels. - var clampedTexcoord : vec2 = + var clampedTexcoord = clamp(texcoord, vec2(0.0, 0.0), vec2(1.0, 1.0)); if (!all(clampedTexcoord == texcoord)) { discard; } - var srcColor : vec4 = textureSample(myTexture, mySampler, texcoord); + var srcColor = textureSample(myTexture, mySampler, texcoord); // Swizzling of texture formats when sampling / rendering is handled by the // hardware so we don't need special logic in this shader. This is covered by tests. return srcColor; diff --git a/src/dawn_native/QueryHelper.cpp b/src/dawn_native/QueryHelper.cpp index ca989845af..cc504df986 100644 --- a/src/dawn_native/QueryHelper.cpp +++ b/src/dawn_native/QueryHelper.cpp @@ -67,9 +67,9 @@ namespace dawn_native { fn main([[builtin(global_invocation_id)]] GlobalInvocationID : vec3) { if (GlobalInvocationID.x >= params.count) { return; } - var index : u32 = GlobalInvocationID.x + params.offset / sizeofTimestamp; + var index = GlobalInvocationID.x + params.offset / sizeofTimestamp; - var timestamp : Timestamp = timestamps.t[index]; + var timestamp = timestamps.t[index]; // Return 0 for the unavailable value. if (availability.v[GlobalInvocationID.x + params.first] == 0u) { @@ -79,8 +79,8 @@ namespace dawn_native { } // Multiply the values in timestamps buffer by the period. - var period : f32 = params.period; - var w : u32 = 0u; + var period = params.period; + var w = 0u; // If the product of low 32-bits and the period does not exceed the maximum of u32, // directly do the multiplication, otherwise, use two u32 to represent the high @@ -88,14 +88,14 @@ namespace dawn_native { if (timestamp.low <= u32(f32(0xFFFFFFFFu) / period)) { timestamps.t[index].low = u32(round(f32(timestamp.low) * period)); } else { - var lo : u32 = timestamp.low & 0xFFFFu; - var hi : u32 = timestamp.low >> 16u; + var lo = timestamp.low & 0xFFFFu; + var hi = timestamp.low >> 16u; - var t0 : u32 = u32(round(f32(lo) * period)); - var t1 : u32 = u32(round(f32(hi) * period)) + (t0 >> 16u); + var t0 = u32(round(f32(lo) * period)); + var t1 = u32(round(f32(hi) * period)) + (t0 >> 16u); w = t1 >> 16u; - var result : u32 = t1 << 16u; + var result = t1 << 16u; result = result | (t0 & 0xFFFFu); timestamps.t[index].low = result; } diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index df6a22340f..adec6d0a92 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -1197,7 +1197,7 @@ std::ostringstream& DawnTestBase::ExpectAttachmentDepthStencilTestData( pipelineDescriptor.vertex.module = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, -1.0), vec2( 3.0, -1.0), vec2(-1.0, 3.0)); diff --git a/src/tests/end2end/BindGroupTests.cpp b/src/tests/end2end/BindGroupTests.cpp index 8d303f4f7b..cfd0c70c4d 100644 --- a/src/tests/end2end/BindGroupTests.cpp +++ b/src/tests/end2end/BindGroupTests.cpp @@ -48,7 +48,7 @@ class BindGroupTests : public DawnTest { return utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)); @@ -165,12 +165,12 @@ TEST_P(BindGroupTests, ReusedUBO) { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)); - var transform : mat2x2 = mat2x2(vertexUbo.transform.xy, vertexUbo.transform.zw); + var transform = mat2x2(vertexUbo.transform.xy, vertexUbo.transform.zw); return vec4(transform * pos[VertexIndex], 0.0, 1.0); })"); @@ -242,12 +242,12 @@ TEST_P(BindGroupTests, UBOSamplerAndTexture) { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)); - var transform : mat2x2 = mat2x2(vertexUbo.transform.xy, vertexUbo.transform.zw); + var transform = mat2x2(vertexUbo.transform.xy, vertexUbo.transform.zw); return vec4(transform * pos[VertexIndex], 0.0, 1.0); })"); @@ -353,7 +353,7 @@ TEST_P(BindGroupTests, MultipleBindLayouts) { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)); @@ -939,7 +939,7 @@ TEST_P(BindGroupTests, ArbitraryBindingNumbers) { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)); @@ -1091,7 +1091,7 @@ TEST_P(BindGroupTests, ReadonlyStorage) { pipelineDescriptor.vertex.module = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)); diff --git a/src/tests/end2end/ClipSpaceTests.cpp b/src/tests/end2end/ClipSpaceTests.cpp index 46160a7a6d..a43190e05b 100644 --- a/src/tests/end2end/ClipSpaceTests.cpp +++ b/src/tests/end2end/ClipSpaceTests.cpp @@ -28,7 +28,7 @@ class ClipSpaceTest : public DawnTest { pipelineDescriptor.vertex.module = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec3(-1.0, 1.0, 1.0), vec3(-1.0, -1.0, 0.5), vec3( 1.0, 1.0, 0.5), diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp index f254d7bc1b..cd1034ada7 100644 --- a/src/tests/end2end/ColorStateTests.cpp +++ b/src/tests/end2end/ColorStateTests.cpp @@ -37,7 +37,7 @@ class ColorStateTest : public DawnTest { vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0)); diff --git a/src/tests/end2end/CompressedTextureFormatTests.cpp b/src/tests/end2end/CompressedTextureFormatTests.cpp index 9f711beba3..7783c4bcdd 100644 --- a/src/tests/end2end/CompressedTextureFormatTests.cpp +++ b/src/tests/end2end/CompressedTextureFormatTests.cpp @@ -147,7 +147,7 @@ class CompressedTextureBCFormatTest : public DawnTest { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOut { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-3.0, 1.0), vec2( 3.0, 1.0), vec2( 0.0, -2.0) diff --git a/src/tests/end2end/CullingTests.cpp b/src/tests/end2end/CullingTests.cpp index eb212234e9..aec9d8c411 100644 --- a/src/tests/end2end/CullingTests.cpp +++ b/src/tests/end2end/CullingTests.cpp @@ -28,7 +28,7 @@ class CullingTest : public DawnTest { pipelineDescriptor.vertex.module = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, 1.0), vec2(-1.0, 0.0), vec2( 0.0, 1.0), diff --git a/src/tests/end2end/D3D12VideoViewsTests.cpp b/src/tests/end2end/D3D12VideoViewsTests.cpp index 36dc66e3a3..67bc48cec3 100644 --- a/src/tests/end2end/D3D12VideoViewsTests.cpp +++ b/src/tests/end2end/D3D12VideoViewsTests.cpp @@ -238,7 +238,7 @@ namespace { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOut { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, 1.0), vec2(-1.0, -1.0), vec2(1.0, -1.0), diff --git a/src/tests/end2end/DepthBiasTests.cpp b/src/tests/end2end/DepthBiasTests.cpp index c185d2a40d..7a9d41e937 100644 --- a/src/tests/end2end/DepthBiasTests.cpp +++ b/src/tests/end2end/DepthBiasTests.cpp @@ -38,7 +38,7 @@ class DepthBiasTests : public DawnTest { vertexSource = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, -1.0), vec2( 1.0, -1.0), vec2(-1.0, 1.0), @@ -54,7 +54,7 @@ class DepthBiasTests : public DawnTest { vertexSource = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec3(-1.0, -1.0, 0.0), vec3( 1.0, -1.0, 0.0), vec3(-1.0, 1.0, 0.5), diff --git a/src/tests/end2end/DepthStencilCopyTests.cpp b/src/tests/end2end/DepthStencilCopyTests.cpp index 5d0ae0e0d5..87c1e4040e 100644 --- a/src/tests/end2end/DepthStencilCopyTests.cpp +++ b/src/tests/end2end/DepthStencilCopyTests.cpp @@ -31,7 +31,7 @@ class DepthStencilCopyTests : public DawnTest { mVertexModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, -1.0), vec2( 0.0, -1.0), vec2(-1.0, 0.0), diff --git a/src/tests/end2end/DepthStencilStateTests.cpp b/src/tests/end2end/DepthStencilStateTests.cpp index cd9b58682a..b65ab02c5c 100644 --- a/src/tests/end2end/DepthStencilStateTests.cpp +++ b/src/tests/end2end/DepthStencilStateTests.cpp @@ -64,7 +64,7 @@ class DepthStencilStateTest : public DawnTest { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, 1.0), vec2(-1.0, -1.0), vec2( 1.0, -1.0), // front-facing diff --git a/src/tests/end2end/DynamicBufferOffsetTests.cpp b/src/tests/end2end/DynamicBufferOffsetTests.cpp index 3c2c50b806..d8ae96086f 100644 --- a/src/tests/end2end/DynamicBufferOffsetTests.cpp +++ b/src/tests/end2end/DynamicBufferOffsetTests.cpp @@ -96,7 +96,7 @@ class DynamicBufferOffsetTests : public DawnTest { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 0.0), vec2(-1.0, 1.0), vec2( 0.0, 1.0)); diff --git a/src/tests/end2end/IOSurfaceWrappingTests.cpp b/src/tests/end2end/IOSurfaceWrappingTests.cpp index 6783cd3783..11334bc966 100644 --- a/src/tests/end2end/IOSurfaceWrappingTests.cpp +++ b/src/tests/end2end/IOSurfaceWrappingTests.cpp @@ -255,7 +255,7 @@ class IOSurfaceUsageTests : public IOSurfaceTestBase { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOut { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-2.0, -2.0), vec2(-2.0, 2.0), vec2( 2.0, -2.0), @@ -263,7 +263,7 @@ class IOSurfaceUsageTests : public IOSurfaceTestBase { vec2( 2.0, -2.0), vec2( 2.0, 2.0)); - var texCoord : array, 6> = array, 6>( + var texCoord = array, 6>( vec2(0.0, 0.0), vec2(0.0, 1.0), vec2(1.0, 0.0), diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/tests/end2end/MultisampledRenderingTests.cpp index 5c1ba179e7..d99d36b367 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/tests/end2end/MultisampledRenderingTests.cpp @@ -225,7 +225,7 @@ class MultisampledRenderingTest : public DawnTest { const char* vs = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2( 1.0, -1.0) @@ -237,7 +237,7 @@ class MultisampledRenderingTest : public DawnTest { const char* vsFlipped = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0) diff --git a/src/tests/end2end/QueryTests.cpp b/src/tests/end2end/QueryTests.cpp index 6c7f36fc3f..81e9db9c67 100644 --- a/src/tests/end2end/QueryTests.cpp +++ b/src/tests/end2end/QueryTests.cpp @@ -83,7 +83,7 @@ class OcclusionQueryTests : public QueryTests { vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2( 1.0, 1.0), vec2(-1.0, -1.0), vec2( 1.0, -1.0)); diff --git a/src/tests/end2end/RenderPassLoadOpTests.cpp b/src/tests/end2end/RenderPassLoadOpTests.cpp index a44fc190f9..11e2f343bc 100644 --- a/src/tests/end2end/RenderPassLoadOpTests.cpp +++ b/src/tests/end2end/RenderPassLoadOpTests.cpp @@ -79,7 +79,7 @@ class RenderPassLoadOpTests : public DawnTest { const char* vsSource = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2( 0.0, -1.0), vec2( 1.0, -1.0), vec2( 0.0, 1.0), diff --git a/src/tests/end2end/RenderPassTests.cpp b/src/tests/end2end/RenderPassTests.cpp index b9a30b55bc..c522db3407 100644 --- a/src/tests/end2end/RenderPassTests.cpp +++ b/src/tests/end2end/RenderPassTests.cpp @@ -29,7 +29,7 @@ class RenderPassTest : public DawnTest { mVSModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, -1.0), vec2(-1.0, -1.0)); diff --git a/src/tests/end2end/SamplerTests.cpp b/src/tests/end2end/SamplerTests.cpp index f020c6a901..cf6624e09b 100644 --- a/src/tests/end2end/SamplerTests.cpp +++ b/src/tests/end2end/SamplerTests.cpp @@ -57,7 +57,7 @@ class SamplerTest : public DawnTest { auto vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-2.0, -2.0), vec2(-2.0, 2.0), vec2( 2.0, -2.0), diff --git a/src/tests/end2end/ScissorTests.cpp b/src/tests/end2end/ScissorTests.cpp index 5b24885bb4..9565a1a0dc 100644 --- a/src/tests/end2end/ScissorTests.cpp +++ b/src/tests/end2end/ScissorTests.cpp @@ -23,7 +23,7 @@ class ScissorTest : public DawnTest { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, -1.0), vec2(-1.0, 1.0), vec2( 1.0, -1.0), diff --git a/src/tests/end2end/ShaderTests.cpp b/src/tests/end2end/ShaderTests.cpp index 10555bb5a0..590e4859c7 100644 --- a/src/tests/end2end/ShaderTests.cpp +++ b/src/tests/end2end/ShaderTests.cpp @@ -101,7 +101,7 @@ TEST_P(ShaderTests, WGSLParamIO) { std::string vertexShader = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2( 0.0, -1.0)); diff --git a/src/tests/end2end/TextureFormatTests.cpp b/src/tests/end2end/TextureFormatTests.cpp index 75f8d290fd..08152960f2 100644 --- a/src/tests/end2end/TextureFormatTests.cpp +++ b/src/tests/end2end/TextureFormatTests.cpp @@ -145,7 +145,7 @@ class TextureFormatTest : public DawnTest { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-3.0, -1.0), vec2( 3.0, -1.0), vec2( 0.0, 2.0)); diff --git a/src/tests/end2end/TextureSubresourceTests.cpp b/src/tests/end2end/TextureSubresourceTests.cpp index a168eaad24..16e6b401c9 100644 --- a/src/tests/end2end/TextureSubresourceTests.cpp +++ b/src/tests/end2end/TextureSubresourceTests.cpp @@ -52,7 +52,7 @@ class TextureSubresourceTest : public DawnTest { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2(-1.0, -1.0), vec2( 1.0, -1.0)); @@ -89,7 +89,7 @@ class TextureSubresourceTest : public DawnTest { wgpu::ShaderModule vsModule = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, -1.0), vec2( 1.0, 1.0), vec2(-1.0, 1.0), diff --git a/src/tests/end2end/TextureViewTests.cpp b/src/tests/end2end/TextureViewTests.cpp index e5f2faf97f..a4387b0e3e 100644 --- a/src/tests/end2end/TextureViewTests.cpp +++ b/src/tests/end2end/TextureViewTests.cpp @@ -69,14 +69,14 @@ namespace { [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> VertexOut { var output : VertexOut; - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-2., -2.), vec2(-2., 2.), vec2( 2., -2.), vec2(-2., 2.), vec2( 2., -2.), vec2( 2., 2.)); - var texCoord : array, 6> = array, 6>( + var texCoord = array, 6>( vec2(0., 0.), vec2(0., 1.), vec2(1., 0.), diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp index 3fba2a2848..00d61f7ab8 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/tests/end2end/TextureZeroInitTests.cpp @@ -85,7 +85,7 @@ class TextureZeroInitTest : public DawnTest { std::string source = R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, -1.0), vec2(-1.0, 1.0), vec2( 1.0, -1.0), diff --git a/src/tests/end2end/VertexFormatTests.cpp b/src/tests/end2end/VertexFormatTests.cpp index 27b987ca91..1563a8318a 100644 --- a/src/tests/end2end/VertexFormatTests.cpp +++ b/src/tests/end2end/VertexFormatTests.cpp @@ -269,7 +269,7 @@ class VertexFormatTest : public DawnTest { [[stage(vertex)]] fn main(input : VertexIn) -> VertexOut { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, -1.0), vec2( 2.0, 0.0), vec2( 0.0, 2.0)); diff --git a/src/tests/end2end/VertexStateTests.cpp b/src/tests/end2end/VertexStateTests.cpp index 218c149bc6..b13f0c7261 100644 --- a/src/tests/end2end/VertexStateTests.cpp +++ b/src/tests/end2end/VertexStateTests.cpp @@ -96,17 +96,17 @@ class VertexStateTest : public DawnTest { // Hard code the triangle in the shader so that we don't have to add a vertex input for it. // Also this places the triangle in the grid based on its VertexID and InstanceID - vs << " var pos : array, 3> = array, 3>(\n" + vs << " var pos = array, 3>(\n" " vec2(0.5, 1.0), vec2(0.0, 0.0), vec2(1.0, 0.0));\n"; vs << " var offset : vec2 = vec2(f32(input.VertexIndex / 3u), " "f32(input.InstanceIndex));\n"; - vs << " var worldPos : vec2 = pos[input.VertexIndex % 3u] + offset;\n"; - vs << " var position : vec4 = vec4(0.5 * worldPos - vec2(1.0, 1.0), 0.0, " + vs << " var worldPos = pos[input.VertexIndex % 3u] + offset;\n"; + vs << " var position = vec4(0.5 * worldPos - vec2(1.0, 1.0), 0.0, " "1.0);\n"; vs << " output.position = vec4(position.x, -position.y, position.z, position.w);\n"; // Perform the checks by successively ANDing a boolean - vs << " var success : bool = true;\n"; + vs << " var success = true;\n"; for (const auto& input : testSpec) { for (int component = 0; component < 4; ++component) { vs << " success = success && (input.input" << input.location << "[" << component diff --git a/src/tests/end2end/ViewportTests.cpp b/src/tests/end2end/ViewportTests.cpp index 56f94df913..4c9d8afa67 100644 --- a/src/tests/end2end/ViewportTests.cpp +++ b/src/tests/end2end/ViewportTests.cpp @@ -25,7 +25,7 @@ class ViewportTest : public DawnTest { mQuadVS = utils::CreateShaderModule(device, R"( [[stage(vertex)]] fn main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4 { - var pos : array, 6> = array, 6>( + var pos = array, 6>( vec2(-1.0, 1.0), vec2(-1.0, -1.0), vec2( 1.0, 1.0), diff --git a/src/tests/white_box/D3D12DescriptorHeapTests.cpp b/src/tests/white_box/D3D12DescriptorHeapTests.cpp index 5bfbb6e74c..dfed91b50a 100644 --- a/src/tests/white_box/D3D12DescriptorHeapTests.cpp +++ b/src/tests/white_box/D3D12DescriptorHeapTests.cpp @@ -44,7 +44,7 @@ class D3D12DescriptorHeapTests : public DawnTest { [[stage(vertex)]] fn main( [[builtin(vertex_index)]] VertexIndex : u32 ) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0) @@ -785,7 +785,7 @@ TEST_P(D3D12DescriptorHeapTests, EncodeManyUBOAndSamplers) { [[stage(vertex)]] fn main( [[builtin(vertex_index)]] VertexIndex : u32 ) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0) diff --git a/src/tests/white_box/D3D12ResidencyTests.cpp b/src/tests/white_box/D3D12ResidencyTests.cpp index 23ce035763..124cd44220 100644 --- a/src/tests/white_box/D3D12ResidencyTests.cpp +++ b/src/tests/white_box/D3D12ResidencyTests.cpp @@ -342,7 +342,7 @@ TEST_P(D3D12DescriptorResidencyTests, SwitchedViewHeapResidency) { [[stage(vertex)]] fn main( [[builtin(vertex_index)]] VertexIndex : u32 ) -> [[builtin(position)]] vec4 { - var pos : array, 3> = array, 3>( + var pos = array, 3>( vec2(-1.0, 1.0), vec2( 1.0, 1.0), vec2(-1.0, -1.0)