Disable unit tests with KI when Tint Inspector is being used
dawn_unittests --enable-toggles=use_tint_inspector now passes. Bug: tint:578 Change-Id: I1e764fd99a145542fe6b7c6e651b0dec1fb4785f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34722 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This commit is contained in:
parent
0d1c17363d
commit
10cb17e079
|
@ -480,6 +480,9 @@ TEST_F(RenderPipelineValidationTest, TextureViewDimensionCompatibility) {
|
||||||
// Test that declaring a storage buffer in the vertex shader without setting pipeline layout won't
|
// Test that declaring a storage buffer in the vertex shader without setting pipeline layout won't
|
||||||
// cause crash.
|
// cause crash.
|
||||||
TEST_F(RenderPipelineValidationTest, StorageBufferInVertexShaderNoLayout) {
|
TEST_F(RenderPipelineValidationTest, StorageBufferInVertexShaderNoLayout) {
|
||||||
|
// TODO(rharrison): Re-enable once tint:383 is resolved.
|
||||||
|
DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_inspector"));
|
||||||
|
|
||||||
wgpu::ShaderModule vsModuleWithStorageBuffer = utils::CreateShaderModuleFromWGSL(device, R"(
|
wgpu::ShaderModule vsModuleWithStorageBuffer = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
[[block]] struct Dst {
|
[[block]] struct Dst {
|
||||||
[[offset(0)]] data : [[stride(4)]] array<u32, 100>;
|
[[offset(0)]] data : [[stride(4)]] array<u32, 100>;
|
||||||
|
|
|
@ -122,6 +122,9 @@ class StorageTextureValidationTests : public ValidationTest {
|
||||||
// Validate read-only storage textures can be declared in vertex and fragment shaders, while
|
// Validate read-only storage textures can be declared in vertex and fragment shaders, while
|
||||||
// writeonly storage textures cannot be used in vertex shaders.
|
// writeonly storage textures cannot be used in vertex shaders.
|
||||||
TEST_F(StorageTextureValidationTests, RenderPipeline) {
|
TEST_F(StorageTextureValidationTests, RenderPipeline) {
|
||||||
|
// TODO(rharrison): Re-enable once https://dawn-review.googlesource.com/c/tint/+/34424 lands
|
||||||
|
DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_inspector"));
|
||||||
|
|
||||||
// Readonly storage texture can be declared in a vertex shader.
|
// Readonly storage texture can be declared in a vertex shader.
|
||||||
{
|
{
|
||||||
wgpu::ShaderModule vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
wgpu::ShaderModule vsModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
|
@ -194,6 +197,9 @@ TEST_F(StorageTextureValidationTests, RenderPipeline) {
|
||||||
// Validate both read-only and write-only storage textures can be declared in
|
// Validate both read-only and write-only storage textures can be declared in
|
||||||
// compute shaders.
|
// compute shaders.
|
||||||
TEST_F(StorageTextureValidationTests, ComputePipeline) {
|
TEST_F(StorageTextureValidationTests, ComputePipeline) {
|
||||||
|
// TODO(rharrison): Re-enable once https://dawn-review.googlesource.com/c/tint/+/34424 lands
|
||||||
|
DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_inspector"));
|
||||||
|
|
||||||
// Read-only storage textures can be declared in a compute shader.
|
// Read-only storage textures can be declared in a compute shader.
|
||||||
{
|
{
|
||||||
wgpu::ShaderModule csModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
wgpu::ShaderModule csModule = utils::CreateShaderModuleFromWGSL(device, R"(
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
#include "dawn/webgpu.h"
|
#include "dawn/webgpu.h"
|
||||||
#include "dawn_native/NullBackend.h"
|
#include "dawn_native/NullBackend.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
void ValidationTest::SetUp() {
|
void ValidationTest::SetUp() {
|
||||||
instance = std::make_unique<dawn_native::Instance>();
|
instance = std::make_unique<dawn_native::Instance>();
|
||||||
instance->DiscoverDefaultAdapters();
|
instance->DiscoverDefaultAdapters();
|
||||||
|
@ -97,6 +99,13 @@ bool ValidationTest::HasWGSL() const {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ValidationTest::HasToggleEnabled(const char* toggle) const {
|
||||||
|
auto toggles = dawn_native::GetTogglesUsed(device.Get());
|
||||||
|
return std::find_if(toggles.begin(), toggles.end(), [toggle](const char* name) {
|
||||||
|
return strcmp(toggle, name) == 0;
|
||||||
|
}) != toggles.end();
|
||||||
|
}
|
||||||
|
|
||||||
wgpu::Device ValidationTest::CreateTestDevice() {
|
wgpu::Device ValidationTest::CreateTestDevice() {
|
||||||
return wgpu::Device::Acquire(adapter.CreateDevice());
|
return wgpu::Device::Acquire(adapter.CreateDevice());
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,7 @@ class ValidationTest : public testing::Test {
|
||||||
};
|
};
|
||||||
|
|
||||||
bool HasWGSL() const;
|
bool HasWGSL() const;
|
||||||
|
bool HasToggleEnabled(const char* toggle) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wgpu::Device CreateTestDevice();
|
virtual wgpu::Device CreateTestDevice();
|
||||||
|
|
Loading…
Reference in New Issue