Remove some DISABLED tests.

Several of the disabled tests were added for things we may want to add
in the future. This CL removes those tests and we can add back if/when
we decide to implement the feature.

This brings the disabled tests from 69 to 31.

Change-Id: I22b66256ce4086f223d3be059450eab1a2ff7693
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104462
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
dan sinclair 2022-10-04 19:10:02 +00:00 committed by Dawn LUCI CQ
parent 82023d6980
commit e89c27c648
6 changed files with 0 additions and 231 deletions

View File

@ -1070,13 +1070,6 @@ return;
p->SkipDumpingPending("crbug.com/tint/98");
}
TEST_F(SpvParserMemoryTest, DISABLED_RemapStorageBuffer_ThroughFunctionCall) {
// WGSL does not support pointer-to-storage-buffer as function parameter
}
TEST_F(SpvParserMemoryTest, DISABLED_RemapStorageBuffer_ThroughFunctionParameter) {
// WGSL does not support pointer-to-storage-buffer as function parameter
}
std::string RuntimeArrayPreamble() {
return R"(
OpCapability Shader

View File

@ -1484,10 +1484,6 @@ TEST_P(SpvParserHandleTest_SampledImageAccessTest, Variable) {
}
}
// TODO(dneto): Test variable declaration and texture builtins provoked by
// use of an image access instruction inside helper function.
TEST_P(SpvParserHandleTest_RegisterHandleUsage_SampledImage, DISABLED_FunctionParam) {}
INSTANTIATE_TEST_SUITE_P(
ImageGather,
SpvParserHandleTest_SampledImageAccessTest,

View File

@ -277,86 +277,6 @@ var<private> a : array<f32, 3>;
EXPECT_EQ(expect, str(got));
}
// TODO(crbug.com/tint/1177) - Validation currently forbids arrays larger than
// 0xffffffff. If WGSL supports 64-bit indexing, re-enable this test.
TEST_F(RobustnessTest, DISABLED_LargeArrays_Idx) {
auto* src = R"(
struct S {
a : array<f32, 0x7fffffff>,
b : array<f32>,
};
@group(0) @binding(0) var<storage, read> s : S;
fn f() {
// Signed
var i32_a1 : f32 = s.a[ 0x7ffffffe];
var i32_a2 : f32 = s.a[ 1];
var i32_a3 : f32 = s.a[ 0];
var i32_a4 : f32 = s.a[-1];
var i32_a5 : f32 = s.a[-0x7fffffff];
var i32_b1 : f32 = s.b[ 0x7ffffffe];
var i32_b2 : f32 = s.b[ 1];
var i32_b3 : f32 = s.b[ 0];
var i32_b4 : f32 = s.b[-1];
var i32_b5 : f32 = s.b[-0x7fffffff];
// Unsigned
var u32_a1 : f32 = s.a[0u];
var u32_a2 : f32 = s.a[1u];
var u32_a3 : f32 = s.a[0x7ffffffeu];
var u32_a4 : f32 = s.a[0x7fffffffu];
var u32_a5 : f32 = s.a[0x80000000u];
var u32_a6 : f32 = s.a[0xffffffffu];
var u32_b1 : f32 = s.b[0u];
var u32_b2 : f32 = s.b[1u];
var u32_b3 : f32 = s.b[0x7ffffffeu];
var u32_b4 : f32 = s.b[0x7fffffffu];
var u32_b5 : f32 = s.b[0x80000000u];
var u32_b6 : f32 = s.b[0xffffffffu];
}
)";
auto* expect = R"(
struct S {
a : array<f32, 2147483647>,
b : array<f32>,
};
@group(0) @binding(0) var<storage, read> s : S;
fn f() {
var i32_a1 : f32 = s.a[2147483646];
var i32_a2 : f32 = s.a[1];
var i32_a3 : f32 = s.a[0];
var i32_a4 : f32 = s.a[0];
var i32_a5 : f32 = s.a[0];
var i32_b1 : f32 = s.b[min(2147483646u, (arrayLength(&(s.b)) - 1u))];
var i32_b2 : f32 = s.b[min(1u, (arrayLength(&(s.b)) - 1u))];
var i32_b3 : f32 = s.b[min(0u, (arrayLength(&(s.b)) - 1u))];
var i32_b4 : f32 = s.b[min(0u, (arrayLength(&(s.b)) - 1u))];
var i32_b5 : f32 = s.b[min(0u, (arrayLength(&(s.b)) - 1u))];
var u32_a1 : f32 = s.a[0u];
var u32_a2 : f32 = s.a[1u];
var u32_a3 : f32 = s.a[2147483646u];
var u32_a4 : f32 = s.a[2147483646u];
var u32_a5 : f32 = s.a[2147483646u];
var u32_a6 : f32 = s.a[2147483646u];
var u32_b1 : f32 = s.b[min(0u, (arrayLength(&(s.b)) - 1u))];
var u32_b2 : f32 = s.b[min(1u, (arrayLength(&(s.b)) - 1u))];
var u32_b3 : f32 = s.b[min(2147483646u, (arrayLength(&(s.b)) - 1u))];
var u32_b4 : f32 = s.b[min(2147483647u, (arrayLength(&(s.b)) - 1u))];
var u32_b5 : f32 = s.b[min(2147483648u, (arrayLength(&(s.b)) - 1u))];
var u32_b6 : f32 = s.b[min(4294967295u, (arrayLength(&(s.b)) - 1u))];
}
)";
auto got = Run<Robustness>(src);
EXPECT_EQ(expect, str(got));
}
TEST_F(RobustnessTest, Vector_Idx_Scalar) {
auto* src = R"(
var<private> a : vec3<f32>;

View File

@ -548,49 +548,6 @@ fn another_usage() {
EXPECT_EQ(expect, str(got));
}
// This sort of mixed usage isn't handled yet. Not sure if we need to just yet.
// If we don't, then the transform should give sensible diagnostics instead of producing invalid
// WGSL.
// TODO(crbug.com/tint/1595)
TEST_F(SpirvAtomicTest, DISABLED_StructComplexMixedUsage) {
auto* src = R"(
struct S {
i : i32,
}
@group(0) @binding(1) var<storage, read_write> s : S;
fn f() {
let x : i32 = s.i;
stub_atomicStore_i32(s.i, 1i);
s.i = 3i;
}
)";
auto* expect =
R"(
struct S_atomic {
i : atomic<i32>,
}
struct S {
i : i32,
}
@group(0) @binding(1) var<storage, read_write> s : S_atomic;
fn f() {
let x : i32 = atomicLoad(&s.i);
stub_atomicStore_i32(s.i, 1i);
atomicStore(&(s.i), 1i);
}
)";
auto got = Run(src);
EXPECT_EQ(expect, str(got));
}
TEST_F(SpirvAtomicTest, AtomicLoad) {
auto* src = R"(
var<workgroup> wg_u32 : u32;

View File

@ -473,45 +473,6 @@ OpDecorate %1 DescriptorSet 0
)");
}
// Check that multiple texture_storage types with different access modifiers
// only produces a single OpTypeImage.
// Test disabled as storage textures currently only support 'write' access. In
// the future we'll likely support read_write.
TEST_F(BuilderTest, DISABLED_GlobalVar_TextureStorageWithDifferentAccess) {
// var<uniform_constant> a : texture_storage_2d<r32uint, read_write>;
// var<uniform_constant> b : texture_storage_2d<r32uint, write>;
auto* type_a = ty.storage_texture(ast::TextureDimension::k2d, ast::TexelFormat::kR32Uint,
ast::Access::kReadWrite);
auto* var_a = GlobalVar("a", type_a, Binding(0_a), Group(0_a));
auto* type_b = ty.storage_texture(ast::TextureDimension::k2d, ast::TexelFormat::kR32Uint,
ast::Access::kWrite);
auto* var_b = GlobalVar("b", type_b, Binding(1_a), Group(0_a));
spirv::Builder& b = Build();
EXPECT_TRUE(b.GenerateGlobalVariable(var_a)) << b.error();
EXPECT_TRUE(b.GenerateGlobalVariable(var_b)) << b.error();
EXPECT_EQ(DumpInstructions(b.annots()), R"(OpDecorate %1 NonWritable
OpDecorate %1 Binding 0
OpDecorate %1 DescriptorSet 0
OpDecorate %5 NonReadable
OpDecorate %5 Binding 1
OpDecorate %5 DescriptorSet 0
)");
// There must only be one OpTypeImage declaration with the same
// arguments
EXPECT_EQ(DumpInstructions(b.types()), R"(%4 = OpTypeInt 32 0
%3 = OpTypeImage %4 2D 0 0 0 2 R32ui
%2 = OpTypePointer UniformConstant %3
%1 = OpVariable %2 UniformConstant
%6 = OpTypePointer UniformConstant %3
%5 = OpVariable %6 UniformConstant
)");
}
TEST_F(BuilderTest, GlobalVar_WorkgroupWithZeroInit) {
auto* type_scalar = ty.i32();
auto* var_scalar = GlobalVar("a", type_scalar, ast::AddressSpace::kWorkgroup);

View File

@ -152,34 +152,6 @@ INSTANTIATE_TEST_SUITE_P(Infinity,
{MakeF32(0, 255, 0), "0x1p+128f"},
{MakeF32(1, 255, 0), "-0x1p+128f"}}));
INSTANTIATE_TEST_SUITE_P(
// TODO(dneto): It's unclear how Infinity and NaN should be handled.
// https://github.com/gpuweb/gpuweb/issues/1769
// This test fails on Windows x86-64 because the machine sets the high
// mantissa bit on NaNs.
DISABLED_NaN,
// In the NaN case, the top bit in the mantissa is often used to encode
// whether the NaN is signalling or quiet, but no agreement between
// different machine architectures on whether 1 means signalling or
// if 1 means quiet.
WgslGenerator_F32LiteralTest,
::testing::ValuesIn(std::vector<F32Data>{
// LSB only. Smallest mantissa.
{MakeF32(0, 255, 1), "0x1.000002p+128f"}, // Smallest mantissa
{MakeF32(1, 255, 1), "-0x1.000002p+128f"},
// MSB only.
{MakeF32(0, 255, 0x400000), "0x1.8p+128f"},
{MakeF32(1, 255, 0x400000), "-0x1.8p+128f"},
// All 1s in the mantissa.
{MakeF32(0, 255, 0x7fffff), "0x1.fffffep+128f"},
{MakeF32(1, 255, 0x7fffff), "-0x1.fffffep+128f"},
// Scattered bits, with 0 in top mantissa bit.
{MakeF32(0, 255, 0x20101f), "0x1.40203ep+128f"},
{MakeF32(1, 255, 0x20101f), "-0x1.40203ep+128f"},
// Scattered bits, with 1 in top mantissa bit.
{MakeF32(0, 255, 0x40101f), "0x1.80203ep+128f"},
{MakeF32(1, 255, 0x40101f), "-0x1.80203ep+128f"}}));
using WgslGenerator_F16LiteralTest = TestParamHelper<F16Data>;
TEST_P(WgslGenerator_F16LiteralTest, Emit) {
@ -222,35 +194,5 @@ INSTANTIATE_TEST_SUITE_P(Subnormal,
{MakeF16(1, 0, 0x2c7u), "-4.23789024e-05h"}, // Scattered bits
}));
INSTANTIATE_TEST_SUITE_P(
// Currently Inf is impossible to be spelled out in literal.
// https://github.com/gpuweb/gpuweb/issues/1769
DISABLED_Infinity,
WgslGenerator_F16LiteralTest,
::testing::ValuesIn(std::vector<F16Data>{{MakeF16(0, 31, 0), "0x1p+128h"},
{MakeF16(1, 31, 0), "-0x1p+128h"}}));
INSTANTIATE_TEST_SUITE_P(
// Currently NaN is impossible to be spelled out in literal.
// https://github.com/gpuweb/gpuweb/issues/1769
DISABLED_NaN,
WgslGenerator_F16LiteralTest,
::testing::ValuesIn(std::vector<F16Data>{
// LSB only. Smallest mantissa.
{MakeF16(0, 31, 1), "0x1.004p+128h"}, // Smallest mantissa
{MakeF16(1, 31, 1), "-0x1.004p+128h"},
// MSB only.
{MakeF16(0, 31, 0x200u), "0x1.8p+128h"},
{MakeF16(1, 31, 0x200u), "-0x1.8p+128h"},
// All 1s in the mantissa.
{MakeF16(0, 31, 0x3ffu), "0x1.ffcp+128h"},
{MakeF16(1, 31, 0x3ffu), "-0x1.ffcp+128h"},
// Scattered bits, with 0 in top mantissa bit.
{MakeF16(0, 31, 0x11fu), "0x1.47cp+128h"},
{MakeF16(1, 31, 0x11fu), "-0x1.47cp+128h"},
// Scattered bits, with 1 in top mantissa bit.
{MakeF16(0, 31, 0x23fu), "0x1.8fcp+128h"},
{MakeF16(1, 31, 0x23fu), "-0x1.8fcp+128h"}}));
} // namespace
} // namespace tint::writer::wgsl