ShaderModule: Add support for multiple entryPoints

Also adds validation tests that reflection data is correctly computed by
entryPoint, and end2end tests that using a shader module with multiple
entryPoints works correctly.

Bug: dawn:216
Change-Id: Id2936bb220d4480872a68624996e4c42452a507d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28244
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Corentin Wallez
2020-09-09 23:11:57 +00:00
committed by Commit Bot service account
parent b8712c01c1
commit 39d1cc9e9c
12 changed files with 504 additions and 25 deletions

View File

@@ -15,6 +15,7 @@
#ifndef TESTS_UNITTESTS_VALIDATIONTEST_H_
#define TESTS_UNITTESTS_VALIDATIONTEST_H_
#include "common/Log.h"
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
#include "gtest/gtest.h"
@@ -28,6 +29,16 @@
do { \
} while (0)
// Skip a test when the given condition is satisfied.
#define DAWN_SKIP_TEST_IF(condition) \
do { \
if (condition) { \
dawn::InfoLog() << "Test skipped: " #condition "."; \
GTEST_SKIP(); \
return; \
} \
} while (0)
class ValidationTest : public testing::Test {
public:
ValidationTest();
@@ -58,6 +69,8 @@ class ValidationTest : public testing::Test {
wgpu::RenderPassColorAttachmentDescriptor mColorAttachment;
};
bool HasWGSL() const;
protected:
wgpu::Device device;
dawn_native::Adapter adapter;