Update DeviceLostTests to use WGSL
Bug: dawn:572 Change-Id: I0555f88baa42c6fdd236478ab2ad4d7ba59448ee Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33763 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
225074a74a
commit
21c1e5f623
|
@ -110,13 +110,12 @@ TEST_P(DeviceLostTest, CreateBindGroupLayoutFails) {
|
||||||
|
|
||||||
// Test that GetBindGroupLayout fails when device is lost
|
// Test that GetBindGroupLayout fails when device is lost
|
||||||
TEST_P(DeviceLostTest, GetBindGroupLayoutFails) {
|
TEST_P(DeviceLostTest, GetBindGroupLayoutFails) {
|
||||||
wgpu::ShaderModule csModule =
|
wgpu::ShaderModule csModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, R"(
|
[[block]] struct UniformBuffer {
|
||||||
#version 450
|
[[offset(0)]] pos : vec4<f32>;
|
||||||
layout(set = 0, binding = 0) uniform UniformBuffer {
|
|
||||||
vec4 pos;
|
|
||||||
};
|
};
|
||||||
void main() {
|
[[set(0), binding(0)]] var<uniform> ubo : UniformBuffer;
|
||||||
|
[[stage(compute)]] fn main() -> void {
|
||||||
})");
|
})");
|
||||||
|
|
||||||
wgpu::ComputePipelineDescriptor descriptor;
|
wgpu::ComputePipelineDescriptor descriptor;
|
||||||
|
@ -199,11 +198,10 @@ TEST_P(DeviceLostTest, CreateSamplerFails) {
|
||||||
TEST_P(DeviceLostTest, CreateShaderModuleFails) {
|
TEST_P(DeviceLostTest, CreateShaderModuleFails) {
|
||||||
SetCallbackAndLoseForTesting();
|
SetCallbackAndLoseForTesting();
|
||||||
|
|
||||||
ASSERT_DEVICE_ERROR(utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"(
|
ASSERT_DEVICE_ERROR(utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
#version 450
|
[[location(0)]] var<in> color : vec4<f32>;
|
||||||
layout(location = 0) in vec4 color;
|
[[location(0)]] var<out> fragColor : vec4<f32>;
|
||||||
layout(location = 0) out vec4 fragColor;
|
[[stage(fragment)]] fn main() -> void {
|
||||||
void main() {
|
|
||||||
fragColor = color;
|
fragColor = color;
|
||||||
})"));
|
})"));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue