Port RenderBundleValidationTests to WGSL
Bug: dawn:572 Change-Id: Id71f2d49c60238939c70bb1d7c93a45b25ca3dcb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33928 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
9175f00eec
commit
b7eb1e15fa
|
@ -27,24 +27,29 @@ namespace {
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
ValidationTest::SetUp();
|
ValidationTest::SetUp();
|
||||||
|
|
||||||
vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"(
|
vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
#version 450
|
[[location(0)]] var<in> pos : vec2<f32>;
|
||||||
layout(location = 0) in vec2 pos;
|
|
||||||
layout (set = 0, binding = 0) uniform vertexUniformBuffer {
|
[[block]] struct S {
|
||||||
mat2 transform;
|
[[offset(0)]] transform : mat2x2<f32>;
|
||||||
};
|
};
|
||||||
void main() {
|
[[set(0), binding(0)]] var<uniform> uniforms : S;
|
||||||
|
|
||||||
|
[[stage(vertex)]] fn main() -> void {
|
||||||
})");
|
})");
|
||||||
|
|
||||||
fsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Fragment, R"(
|
fsModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
#version 450
|
[[block]] struct Uniforms {
|
||||||
layout (set = 1, binding = 0) uniform fragmentUniformBuffer {
|
[[offset(0)]] color : vec4<f32>;
|
||||||
vec4 color;
|
|
||||||
};
|
};
|
||||||
layout (set = 1, binding = 1) buffer storageBuffer {
|
[[set(1), binding(0)]] var<uniform> uniforms : Uniforms;
|
||||||
float dummy[];
|
|
||||||
|
[[block]] struct Storage {
|
||||||
|
[[offset(0)]] dummy : [[stride(4)]] array<f32>;
|
||||||
};
|
};
|
||||||
void main() {
|
[[set(1), binding(1)]] var<storage_buffer> ssbo : [[access(read_write)]] Storage;
|
||||||
|
|
||||||
|
[[stage(fragment)]] fn main() -> void {
|
||||||
})");
|
})");
|
||||||
|
|
||||||
wgpu::BindGroupLayout bgls[] = {
|
wgpu::BindGroupLayout bgls[] = {
|
||||||
|
|
Loading…
Reference in New Issue