Update PrimitiveTopologyTests to use WGSL

Bug: dawn:572
Change-Id: I9275ad78e6222b33372f5640b07801b815670fa6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33774
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2020-12-22 19:24:28 +00:00 committed by Commit Bot service account
parent 58ce2745cd
commit 241cd0cd8e
1 changed files with 11 additions and 13 deletions

View File

@ -156,19 +156,17 @@ class PrimitiveTopologyTest : public DawnTest {
renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize);
vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"( vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
#version 450 [[location(0)]] var<in> pos : vec4<f32>;
layout(location = 0) in vec4 pos; [[builtin(position)]] var<out> Position : vec4<f32>;
void main() { [[stage(vertex)]] fn main() -> void {
gl_Position = pos; Position = pos;
gl_PointSize = 1.0;
})"); })");
fsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"( fsModule = utils::CreateShaderModuleFromWGSL(device, R"(
#version 450 [[location(0)]] var<out> fragColor : vec4<f32>;
layout(location = 0) out vec4 fragColor; [[stage(fragment)]] fn main() -> void {
void main() { fragColor = vec4<f32>(0.0, 1.0, 0.0, 1.0);
fragColor = vec4(0.0, 1.0, 0.0, 1.0);
})"); })");
vertexBuffer = utils::CreateBufferFromData(device, kVertices, sizeof(kVertices), vertexBuffer = utils::CreateBufferFromData(device, kVertices, sizeof(kVertices),