Use Tint/WGSL unconditionally

Bug: dawn:706
Change-Id: I102c37e67e7833bb7441ed8a355a4411bd7b9fb9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45421
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2021-03-22 21:23:36 +00:00
committed by Commit Bot service account
parent b00de7f8e8
commit a9439199b7
18 changed files with 16 additions and 130 deletions

View File

@@ -337,6 +337,7 @@ source_set("dawn_end2end_tests_sources") {
"end2end/TextureSubresourceTests.cpp",
"end2end/TextureViewTests.cpp",
"end2end/TextureZeroInitTests.cpp",
"end2end/VertexBufferRobustnessTests.cpp",
"end2end/VertexFormatTests.cpp",
"end2end/VertexStateTests.cpp",
"end2end/ViewportOrientationTests.cpp",
@@ -368,10 +369,6 @@ source_set("dawn_end2end_tests_sources") {
frameworks = [ "IOSurface.framework" ]
}
if (dawn_enable_wgsl) {
sources += [ "end2end/VertexBufferRobustnessTests.cpp" ]
}
if (dawn_enable_opengl) {
assert(dawn_supports_glfw_for_windowing)
}

View File

@@ -788,14 +788,6 @@ bool DawnTestBase::IsBackendValidationEnabled() const {
return gTestEnv->GetBackendValidationLevel() != dawn_native::BackendValidationLevel::Disabled;
}
bool DawnTestBase::HasWGSL() const {
#ifdef DAWN_ENABLE_WGSL
return true;
#else
return false;
#endif
}
bool DawnTestBase::IsAsan() const {
#if defined(ADDRESS_SANITIZER)
return true;

View File

@@ -281,7 +281,6 @@ class DawnTestBase {
bool UsesWire() const;
bool IsBackendValidationEnabled() const;
bool HasWGSL() const;
bool IsAsan() const;

View File

@@ -555,8 +555,6 @@ TEST_F(RenderPipelineValidationTest, StripIndexFormatRequired) {
// Test that the entryPoint names must be present for the correct stage in the shader module.
TEST_F(RenderPipelineValidationTest, EntryPointNameValidation) {
DAWN_SKIP_TEST_IF(!HasWGSL());
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
[[builtin(position)]] var<out> position : vec4<f32>;
[[stage(vertex)]] fn vertex_main() -> void {
@@ -607,8 +605,6 @@ TEST_F(RenderPipelineValidationTest, EntryPointNameValidation) {
// Test that vertex attrib validation is for the correct entryPoint
TEST_F(RenderPipelineValidationTest, VertexAttribCorrectEntryPoint) {
DAWN_SKIP_TEST_IF(!HasWGSL());
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
[[builtin(position)]] var<out> position : vec4<f32>;
[[location(0)]] var<in> attrib0 : vec4<f32>;
@@ -655,8 +651,6 @@ TEST_F(RenderPipelineValidationTest, VertexAttribCorrectEntryPoint) {
// Test that fragment output validation is for the correct entryPoint
TEST_F(RenderPipelineValidationTest, FragmentOutputCorrectEntryPoint) {
DAWN_SKIP_TEST_IF(!HasWGSL());
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
[[location(0)]] var<out> colorFloat : vec4<f32>;
[[location(0)]] var<out> colorUint : vec4<u32>;
@@ -697,8 +691,6 @@ TEST_F(RenderPipelineValidationTest, FragmentOutputCorrectEntryPoint) {
// Test that fragment output validation is for the correct entryPoint
// TODO(dawn:216): Re-enable when we correctly reflect which bindings are used for an entryPoint.
TEST_F(RenderPipelineValidationTest, DISABLED_BindingsFromCorrectEntryPoint) {
DAWN_SKIP_TEST_IF(!HasWGSL());
wgpu::ShaderModule module = utils::CreateShaderModuleFromWGSL(device, R"(
[[block]] struct Uniforms {
data : vec4<f32>;

View File

@@ -148,14 +148,6 @@ void ValidationTest::WaitForAllOperations(const wgpu::Device& device) {
FlushWire();
}
bool ValidationTest::HasWGSL() const {
#ifdef DAWN_ENABLE_WGSL
return true;
#else
return false;
#endif
}
bool ValidationTest::HasToggleEnabled(const char* toggle) const {
auto toggles = dawn_native::GetTogglesUsed(backendDevice);
return std::find_if(toggles.begin(), toggles.end(), [toggle](const char* name) {

View File

@@ -92,7 +92,6 @@ class ValidationTest : public testing::Test {
wgpu::RenderPassColorAttachmentDescriptor mColorAttachment;
};
bool HasWGSL() const;
bool HasToggleEnabled(const char* toggle) const;
protected: