Fix WGSL usage of "let"

Bug: none
Change-Id: If2e1617bc17192880aff88d8f4a52315be593553
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59880
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng 2021-07-27 07:51:26 +00:00 committed by Dawn LUCI CQ
parent 6e5b080547
commit ce15395190
2 changed files with 4 additions and 4 deletions

View File

@ -387,7 +387,7 @@ TEST_F(GetBindGroupLayoutTests, BindingType) {
[[group(0), binding(0)]] var mySampler: sampler;
[[stage(fragment)]] fn main() {
let s : sampler = mySampler;
ignore(mySampler);
})");
EXPECT_EQ(device.CreateBindGroupLayout(&desc).Get(), pipeline.GetBindGroupLayout(0).Get());
}
@ -753,7 +753,7 @@ TEST_F(GetBindGroupLayoutTests, StageAggregation) {
wgpu::ShaderModule vsModuleSampler = utils::CreateShaderModule(device, R"(
[[group(0), binding(0)]] var mySampler: sampler;
[[stage(vertex)]] fn main() -> [[builtin(position)]] vec4<f32> {
let s : sampler = mySampler;
ignore(mySampler);
return vec4<f32>();
})");
@ -764,7 +764,7 @@ TEST_F(GetBindGroupLayoutTests, StageAggregation) {
wgpu::ShaderModule fsModuleSampler = utils::CreateShaderModule(device, R"(
[[group(0), binding(0)]] var mySampler: sampler;
[[stage(fragment)]] fn main() {
let s : sampler = mySampler;
ignore(mySampler);
})");
// Create BGLs with minBufferBindingSize 4 and 64.

View File

@ -183,7 +183,7 @@ TEST_P(D3D12DescriptorHeapTests, NoSwitchOverSamplerHeap) {
renderPipelineDescriptor.cFragment.module = utils::CreateShaderModule(device, R"(
[[group(0), binding(0)]] var sampler0 : sampler;
[[stage(fragment)]] fn main() -> [[location(0)]] vec4<f32> {
let referenceSampler : sampler = sampler0;
ignore(sampler0);
return vec4<f32>(0.0, 0.0, 0.0, 0.0);
})");