diff --git a/src/dawn/tests/DawnTest.cpp b/src/dawn/tests/DawnTest.cpp index ff72d3482c..8dc4d5d3b3 100644 --- a/src/dawn/tests/DawnTest.cpp +++ b/src/dawn/tests/DawnTest.cpp @@ -1095,7 +1095,7 @@ std::ostringstream& DawnTestBase::ExpectSampledFloatDataImpl(wgpu::TextureView t uint32_t sampleCount, detail::Expectation* expectation) { std::ostringstream shaderSource; - shaderSource << "let width : u32 = " << width << "u;\n"; + shaderSource << "const width : u32 = " << width << "u;\n"; shaderSource << "@group(0) @binding(0) var tex : " << wgslTextureType << ";\n"; shaderSource << R"( struct Result { @@ -1103,8 +1103,8 @@ std::ostringstream& DawnTestBase::ExpectSampledFloatDataImpl(wgpu::TextureView t } @group(0) @binding(1) var result : Result; )"; - shaderSource << "let componentCount : u32 = " << componentCount << "u;\n"; - shaderSource << "let sampleCount : u32 = " << sampleCount << "u;\n"; + shaderSource << "const componentCount : u32 = " << componentCount << "u;\n"; + shaderSource << "const sampleCount : u32 = " << sampleCount << "u;\n"; shaderSource << "fn doTextureLoad(t: " << wgslTextureType << ", coord: vec2, sample: u32, component: u32) -> f32"; diff --git a/src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp b/src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp index c63e762285..94822df06f 100644 --- a/src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp +++ b/src/dawn/tests/end2end/ComputeSharedMemoryTests.cpp @@ -71,8 +71,8 @@ void ComputeSharedMemoryTests::BasicTest(const char* shader) { // Basic shared memory test TEST_P(ComputeSharedMemoryTests, Basic) { BasicTest(R"( - let kTileSize : u32 = 4u; - let kInstances : u32 = 11u; + const kTileSize : u32 = 4u; + const kInstances : u32 = 11u; struct Dst { x : u32 diff --git a/src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp b/src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp index 61caf90608..91332c6708 100644 --- a/src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp +++ b/src/dawn/tests/end2end/DynamicBufferOffsetTests.cpp @@ -133,7 +133,7 @@ class DynamicBufferOffsetTests : public DawnTest { )"; } - fs << "let multipleNumber : u32 = " << multipleNumber << "u;\n"; + fs << "const multipleNumber : u32 = " << multipleNumber << "u;\n"; fs << R"( @fragment fn main() -> @location(0) vec4 { sBufferNotDynamic.value = uBufferNotDynamic.value.xy; @@ -183,7 +183,7 @@ class DynamicBufferOffsetTests : public DawnTest { )"; } - cs << "let multipleNumber : u32 = " << multipleNumber << "u;\n"; + cs << "const multipleNumber : u32 = " << multipleNumber << "u;\n"; cs << R"( @compute @workgroup_size(1) fn main() { sBufferNotDynamic.value = uBufferNotDynamic.value.xy;