diff --git a/src/tests/end2end/DeviceLostTests.cpp b/src/tests/end2end/DeviceLostTests.cpp index 57051a8323..18e5fb4a3d 100644 --- a/src/tests/end2end/DeviceLostTests.cpp +++ b/src/tests/end2end/DeviceLostTests.cpp @@ -110,14 +110,13 @@ TEST_P(DeviceLostTest, CreateBindGroupLayoutFails) { // Test that GetBindGroupLayout fails when device is lost TEST_P(DeviceLostTest, GetBindGroupLayoutFails) { - wgpu::ShaderModule csModule = - utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, R"( - #version 450 - layout(set = 0, binding = 0) uniform UniformBuffer { - vec4 pos; - }; - void main() { - })"); + wgpu::ShaderModule csModule = utils::CreateShaderModuleFromWGSL(device, R"( + [[block]] struct UniformBuffer { + [[offset(0)]] pos : vec4; + }; + [[set(0), binding(0)]] var ubo : UniformBuffer; + [[stage(compute)]] fn main() -> void { + })"); wgpu::ComputePipelineDescriptor descriptor; descriptor.layout = nullptr; @@ -199,13 +198,12 @@ TEST_P(DeviceLostTest, CreateSamplerFails) { TEST_P(DeviceLostTest, CreateShaderModuleFails) { SetCallbackAndLoseForTesting(); - ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"( - #version 450 - layout(location = 0) in vec4 color; - layout(location = 0) out vec4 fragColor; - void main() { - fragColor = color; - })")); + ASSERT_DEVICE_ERROR(utils::CreateShaderModuleFromWGSL(device, R"( + [[location(0)]] var color : vec4; + [[location(0)]] var fragColor : vec4; + [[stage(fragment)]] fn main() -> void { + fragColor = color; + })")); } // Tests that CreateSwapChain fails when device is lost