Update DestroyTests to use WGSL

Bug: dawn:572
Change-Id: Ia4ffacad9740fc49aac4333a6e7a1a83a5002491
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33762
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Austin Eng 2020-11-26 13:55:55 +00:00 committed by Commit Bot service account
parent 69afcb41e7
commit b92c375560
1 changed files with 9 additions and 12 deletions

View File

@ -27,20 +27,17 @@ class DestroyTest : public DawnTest {
renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
wgpu::ShaderModule vsModule =
utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"(
#version 450
layout(location = 0) in vec4 pos;
void main() {
gl_Position = pos;
wgpu::ShaderModule vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
[[location(0)]] var<in> pos : vec4<f32>;
[[builtin(position)]] var<out> Position : vec4<f32>;
[[stage(vertex)]] fn main() -> void {
Position = pos;
})");
wgpu::ShaderModule fsModule =
utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"(
#version 450
layout(location = 0) out vec4 fragColor;
void main() {
fragColor = vec4(0.0, 1.0, 0.0, 1.0);
wgpu::ShaderModule fsModule = utils::CreateShaderModuleFromWGSL(device, R"(
[[location(0)]] var<out> fragColor : vec4<f32>;
[[stage(fragment)]] fn main() -> void {
fragColor = vec4<f32>(0.0, 1.0, 0.0, 1.0);
})");
utils::ComboRenderPipelineDescriptor descriptor(device);