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_P(DeviceLostTest, GetBindGroupLayoutFails) {
|
||||
wgpu::ShaderModule csModule =
|
||||
utils::CreateShaderModule(device, utils::SingleShaderStage::Compute, R"(
|
||||
#version 450
|
||||
layout(set = 0, binding = 0) uniform UniformBuffer {
|
||||
vec4 pos;
|
||||
wgpu::ShaderModule csModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||
[[block]] struct UniformBuffer {
|
||||
[[offset(0)]] pos : vec4<f32>;
|
||||
};
|
||||
void main() {
|
||||
[[set(0), binding(0)]] var<uniform> ubo : UniformBuffer;
|
||||
[[stage(compute)]] fn main() -> void {
|
||||
})");
|
||||
|
||||
wgpu::ComputePipelineDescriptor descriptor;
|
||||
|
@ -199,11 +198,10 @@ 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() {
|
||||
ASSERT_DEVICE_ERROR(utils::CreateShaderModuleFromWGSL(device, R"(
|
||||
[[location(0)]] var<in> color : vec4<f32>;
|
||||
[[location(0)]] var<out> fragColor : vec4<f32>;
|
||||
[[stage(fragment)]] fn main() -> void {
|
||||
fragColor = color;
|
||||
})"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue