diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index 4de63a54cb..e47b054f11 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -456,6 +456,19 @@ std::vector DawnTestEnvironment::GetAvailableAdapterTestParams if (params[i].backendType == adapterProperties.backendType && adapterProperties.selected) { testParams.push_back(AdapterTestParam(params[i], adapterProperties)); + + // HACK: This is a hack to get Tint generator enabled on all tests + // without adding a new test suite in Chromium's infra config but skipping + // that suite on all unsupported platforms. Once we have basic functionality and + // test skips on all backends, we can remove this and use a test suite with + // use_tint_generator in the command line args instead. + if (params[i].backendType == wgpu::BackendType::Vulkan || + params[i].backendType == wgpu::BackendType::OpenGL || + params[i].backendType == wgpu::BackendType::OpenGLES) { + BackendTestConfig configWithTint = params[i]; + configWithTint.forceEnabledWorkarounds.push_back("use_tint_generator"); + testParams.push_back(AdapterTestParam(configWithTint, adapterProperties)); + } } } } diff --git a/src/tests/end2end/BindGroupTests.cpp b/src/tests/end2end/BindGroupTests.cpp index b2fa09e8c5..692994ec15 100644 --- a/src/tests/end2end/BindGroupTests.cpp +++ b/src/tests/end2end/BindGroupTests.cpp @@ -157,6 +157,10 @@ TEST_P(BindGroupTests, ReusedBindGroupSingleSubmit) { // It contains a transformation matrix for the VS and the fragment color for the FS. // These must result in different register offsets in the native APIs. TEST_P(BindGroupTests, ReusedUBO) { + // TODO(crbug.com/dawn/571): Fix failures using Tint. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); wgpu::ShaderModule vsModule = @@ -229,6 +233,10 @@ TEST_P(BindGroupTests, ReusedUBO) { // shader. In D3D12 for example, these different types of bindings end up in different namespaces, // but the register offsets used must match between the shader module and descriptor range. TEST_P(BindGroupTests, UBOSamplerAndTexture) { + // TODO(crbug.com/dawn/571): Fix failures using Tint. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); wgpu::ShaderModule vsModule = @@ -327,6 +335,12 @@ TEST_P(BindGroupTests, UBOSamplerAndTexture) { } TEST_P(BindGroupTests, MultipleBindLayouts) { + // TODO(crbug.com/tint/403): + // error: line 74: Expected Result Type to be a scalar type + // %44 = OpVectorExtractDynamic %v2float %30 %uint_0_0 + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); wgpu::ShaderModule vsModule = @@ -1095,6 +1109,11 @@ TEST_P(BindGroupTests, ReadonlyStorage) { // used correctly. The test loads a different value from each binding, and writes 1 to a storage // buffer if all values are correct. TEST_P(BindGroupTests, ReallyLargeBindGroup) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + DAWN_SKIP_TEST_IF(IsOpenGLES()); std::string interface = "#version 450\n"; std::string body; diff --git a/src/tests/end2end/BufferZeroInitTests.cpp b/src/tests/end2end/BufferZeroInitTests.cpp index 6bd82a8638..244d83fff6 100644 --- a/src/tests/end2end/BufferZeroInitTests.cpp +++ b/src/tests/end2end/BufferZeroInitTests.cpp @@ -975,6 +975,9 @@ TEST_P(BufferZeroInitTest, Copy2DArrayTextureToBuffer) { // Test that the buffer will be lazy initialized correctly when its first use is to be bound as a // uniform buffer. TEST_P(BufferZeroInitTest, BoundAsUniformBuffer) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + const char* computeShader = R"( #version 450 layout(set = 0, binding = 0, std140) uniform UBO { @@ -1011,6 +1014,9 @@ TEST_P(BufferZeroInitTest, BoundAsUniformBuffer) { // Test that the buffer will be lazy initialized correctly when its first use is to be bound as a // read-only storage buffer. TEST_P(BufferZeroInitTest, BoundAsReadonlyStorageBuffer) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + const char* computeShader = R"( #version 450 layout(set = 0, binding = 0, std140) readonly buffer SSBO { @@ -1047,6 +1053,9 @@ TEST_P(BufferZeroInitTest, BoundAsReadonlyStorageBuffer) { // Test that the buffer will be lazy initialized correctly when its first use is to be bound as a // storage buffer. TEST_P(BufferZeroInitTest, BoundAsStorageBuffer) { + // TODO(crbug.com/tint/375): Implement barriers in Tint. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + const char* computeShader = R"( #version 450 layout(set = 0, binding = 0, std140) buffer SSBO { @@ -1092,6 +1101,9 @@ TEST_P(BufferZeroInitTest, BoundAsStorageBuffer) { // Test the buffer will be lazily initialized correctly when its first use is in SetVertexBuffer. TEST_P(BufferZeroInitTest, SetVertexBuffer) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Bind the whole buffer as a vertex buffer. { constexpr uint64_t kVertexBufferOffset = 0u; @@ -1107,6 +1119,9 @@ TEST_P(BufferZeroInitTest, SetVertexBuffer) { // Test the buffer will be lazily initialized correctly when its first use is in SetIndexBuffer. TEST_P(BufferZeroInitTest, SetIndexBuffer) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Bind the whole buffer as an index buffer. { constexpr uint64_t kIndexBufferOffset = 0u; @@ -1123,6 +1138,9 @@ TEST_P(BufferZeroInitTest, SetIndexBuffer) { // Test the buffer will be lazily initialized correctly when its first use is an indirect buffer for // DrawIndirect. TEST_P(BufferZeroInitTest, IndirectBufferForDrawIndirect) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Bind the whole buffer as an indirect buffer. { constexpr uint64_t kOffset = 0u; @@ -1139,6 +1157,9 @@ TEST_P(BufferZeroInitTest, IndirectBufferForDrawIndirect) { // Test the buffer will be lazily initialized correctly when its first use is an indirect buffer for // DrawIndexedIndirect. TEST_P(BufferZeroInitTest, IndirectBufferForDrawIndexedIndirect) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Bind the whole buffer as an indirect buffer. { constexpr uint64_t kOffset = 0u; @@ -1155,6 +1176,9 @@ TEST_P(BufferZeroInitTest, IndirectBufferForDrawIndexedIndirect) { // Test the buffer will be lazily initialized correctly when its first use is an indirect buffer for // DispatchIndirect. TEST_P(BufferZeroInitTest, IndirectBufferForDispatchIndirect) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Bind the whole buffer as an indirect buffer. { constexpr uint64_t kOffset = 0u; diff --git a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp index 2b0315774c..5c8de7372a 100644 --- a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp +++ b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp @@ -118,6 +118,9 @@ TEST_P(ComputeCopyStorageBufferTests, SizedArrayOfStruct) { // Test that a trivial compute-shader memcpy implementation works. TEST_P(ComputeCopyStorageBufferTests, UnsizedArrayOfBasic) { + // TODO(crbug.com/tint/400) + // Tint transform failure: error: invalid 0 size for array or vector + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); BasicTest(R"( #version 450 #define kInstances 4 diff --git a/src/tests/end2end/ComputeSharedMemoryTests.cpp b/src/tests/end2end/ComputeSharedMemoryTests.cpp index aee0e50aa0..527f28d2b0 100644 --- a/src/tests/end2end/ComputeSharedMemoryTests.cpp +++ b/src/tests/end2end/ComputeSharedMemoryTests.cpp @@ -70,6 +70,9 @@ void ComputeSharedMemoryTests::BasicTest(const char* shader) { // Basic shared memory test TEST_P(ComputeSharedMemoryTests, Basic) { + // TODO(crbug.com/tint/375): Implement barriers in Tint. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + BasicTest(R"( #version 450 const uint kTileSize = 4; diff --git a/src/tests/end2end/CreateReadyPipelineTests.cpp b/src/tests/end2end/CreateReadyPipelineTests.cpp index 95131e4e4f..6311b46196 100644 --- a/src/tests/end2end/CreateReadyPipelineTests.cpp +++ b/src/tests/end2end/CreateReadyPipelineTests.cpp @@ -135,6 +135,9 @@ TEST_P(CreateReadyPipelineTest, CreateComputePipelineFailed) { // Verify the basic use of CreateReadyRenderPipeline() works on all backends. TEST_P(CreateReadyPipelineTest, BasicUseOfCreateReadyRenderPipeline) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + constexpr wgpu::TextureFormat kRenderAttachmentFormat = wgpu::TextureFormat::RGBA8Unorm; const char* vertexShader = R"( @@ -212,6 +215,9 @@ TEST_P(CreateReadyPipelineTest, BasicUseOfCreateReadyRenderPipeline) { TEST_P(CreateReadyPipelineTest, CreateRenderPipelineFailed) { DAWN_SKIP_TEST_IF(HasToggleEnabled("skip_validation")); + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + constexpr wgpu::TextureFormat kRenderAttachmentFormat = wgpu::TextureFormat::Depth32Float; const char* vertexShader = R"( @@ -289,6 +295,9 @@ TEST_P(CreateReadyPipelineTest, ReleaseDeviceBeforeCallbackOfCreateReadyComputeP // Verify there is no error when the device is released before the callback of // CreateReadyRenderPipeline() is called. TEST_P(CreateReadyPipelineTest, ReleaseDeviceBeforeCallbackOfCreateReadyRenderPipeline) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + const char* vertexShader = R"( #version 450 void main() { diff --git a/src/tests/end2end/DepthStencilCopyTests.cpp b/src/tests/end2end/DepthStencilCopyTests.cpp index 5591cf1999..3ab4fd12a4 100644 --- a/src/tests/end2end/DepthStencilCopyTests.cpp +++ b/src/tests/end2end/DepthStencilCopyTests.cpp @@ -27,6 +27,10 @@ class DepthStencilCopyTests : public DawnTest { void SetUp() override { DawnTest::SetUp(); + // TODO(crbug.com/tint/329): SPIR-V output missing DepthReplacing execution mode. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + // Draw a square in the bottom left quarter of the screen. mVertexModule = utils::CreateShaderModuleFromWGSL(device, R"( [[builtin(vertex_idx)]] var VertexIndex : u32; diff --git a/src/tests/end2end/DepthStencilSamplingTests.cpp b/src/tests/end2end/DepthStencilSamplingTests.cpp index 21b25043af..37c1f378eb 100644 --- a/src/tests/end2end/DepthStencilSamplingTests.cpp +++ b/src/tests/end2end/DepthStencilSamplingTests.cpp @@ -58,6 +58,9 @@ class DepthStencilSamplingTest : public DawnTest { void SetUp() override { DawnTest::SetUp(); + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + wgpu::BufferDescriptor uniformBufferDesc; uniformBufferDesc.usage = wgpu::BufferUsage::Uniform | wgpu::BufferUsage::CopyDst; uniformBufferDesc.size = sizeof(float); diff --git a/src/tests/end2end/DrawTests.cpp b/src/tests/end2end/DrawTests.cpp index 585291aa56..bb4a0e8476 100644 --- a/src/tests/end2end/DrawTests.cpp +++ b/src/tests/end2end/DrawTests.cpp @@ -106,8 +106,5 @@ DAWN_INSTANTIATE_TEST(DrawTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), - OpenGLBackend({"use_tint_generator"}), OpenGLESBackend(), - OpenGLESBackend({"use_tint_generator"}), - VulkanBackend(), - VulkanBackend({"use_tint_generator"})); + VulkanBackend()); diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/tests/end2end/GpuMemorySynchronizationTests.cpp index b208810013..75ad6f6b2a 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/tests/end2end/GpuMemorySynchronizationTests.cpp @@ -21,6 +21,13 @@ class GpuMemorySyncTests : public DawnTest { protected: + void SetUp() override { + DawnTest::SetUp(); + + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + } + wgpu::Buffer CreateBuffer() { wgpu::BufferDescriptor srcDesc; srcDesc.size = 4; @@ -240,6 +247,13 @@ DAWN_INSTANTIATE_TEST(GpuMemorySyncTests, class StorageToUniformSyncTests : public DawnTest { protected: + void SetUp() override { + DawnTest::SetUp(); + + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + } + void CreateBuffer() { wgpu::BufferDescriptor bufferDesc; bufferDesc.size = sizeof(float); diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/tests/end2end/MultisampledRenderingTests.cpp index c3e766d780..37663200b0 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/tests/end2end/MultisampledRenderingTests.cpp @@ -315,6 +315,10 @@ TEST_P(MultisampledRenderingTest, ResolveFromSingleLayerArrayInto2DTexture) { // Test multisampled rendering with depth test works correctly. TEST_P(MultisampledRenderingTest, MultisampledRenderingWithDepthTest) { + // TODO(crbug.com/tint/329): SPIR-V output missing DepthReplacing execution mode. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + constexpr bool kTestDepth = true; wgpu::CommandEncoder commandEncoder = device.CreateCommandEncoder(); wgpu::RenderPipeline pipeline = CreateRenderPipelineWithOneOutputForTest(kTestDepth); @@ -670,6 +674,10 @@ TEST_P(MultisampledRenderingTest, MultisampledRenderingWithDepthTestAndSampleMas // TODO(dawn:491): Find out why this test doesn't work on Windows Intel Vulkan. DAWN_SKIP_TEST_IF(IsWindows() && IsIntel() && IsVulkan()); + // TODO(crbug.com/tint/329): SPIR-V output missing DepthReplacing execution mode. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + constexpr bool kTestDepth = true; // The second sample is included in the first render pass and it's covered by the triangle. constexpr uint32_t kSampleMaskGreen = kSecondSampleMaskBit; @@ -730,6 +738,9 @@ TEST_P(MultisampledRenderingTest, MultisampledRenderingWithDepthTestAndSampleMas // Test using one multisampled color attachment with resolve target can render correctly // with non-default sample mask and shader-output mask. TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithSampleMaskAndShaderOutputMask) { + // TODO(crbug.com/tint/372): Support sample mask builtin. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + constexpr bool kTestDepth = false; wgpu::CommandEncoder commandEncoder = device.CreateCommandEncoder(); @@ -773,6 +784,9 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithSampleMaskAndShaderOut // Test doing MSAA resolve into multiple resolve targets works correctly with a non-default // shader-output mask. TEST_P(MultisampledRenderingTest, ResolveIntoMultipleResolveTargetsWithShaderOutputMask) { + // TODO(crbug.com/tint/372): Support sample mask builtin. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + wgpu::TextureView multisampledColorView2 = CreateTextureForRenderAttachment(kColorFormat, kSampleCount).CreateView(); wgpu::Texture resolveTexture2 = CreateTextureForRenderAttachment(kColorFormat, 1); @@ -926,6 +940,10 @@ TEST_P(MultisampledRenderingTest, MultisampledRenderingWithDepthTestAndAlphaToCo // algorithm. DAWN_SKIP_TEST_IF(IsSwiftshader()); + // TODO(crbug.com/tint/329): SPIR-V output missing DepthReplacing execution mode. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); + constexpr bool kTestDepth = true; constexpr uint32_t kSampleMask = 0xFFFFFFFF; diff --git a/src/tests/end2end/MultisampledSamplingTests.cpp b/src/tests/end2end/MultisampledSamplingTests.cpp index 9a220acb01..b0081a8ff6 100644 --- a/src/tests/end2end/MultisampledSamplingTests.cpp +++ b/src/tests/end2end/MultisampledSamplingTests.cpp @@ -49,6 +49,10 @@ class MultisampledSamplingTest : public DawnTest { void SetUp() override { DawnTest::SetUp(); + + // TODO(crbug.com/tint/329): SPIR-V output missing DepthReplacing execution mode. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator") && + (IsVulkan() || IsOpenGL() || IsOpenGLES())); { utils::ComboRenderPipelineDescriptor desc(device); diff --git a/src/tests/end2end/OpArrayLengthTests.cpp b/src/tests/end2end/OpArrayLengthTests.cpp index 44eaa4cd31..ee28a4f6ca 100644 --- a/src/tests/end2end/OpArrayLengthTests.cpp +++ b/src/tests/end2end/OpArrayLengthTests.cpp @@ -23,6 +23,9 @@ class OpArrayLengthTest : public DawnTest { void SetUp() { DawnTest::SetUp(); + // TODO(crbug.com/tint/252): Implement arrayLength. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Create buffers of various size to check the length() implementation wgpu::BufferDescriptor bufferDesc; bufferDesc.size = 4; diff --git a/src/tests/end2end/PrimitiveTopologyTests.cpp b/src/tests/end2end/PrimitiveTopologyTests.cpp index 10288953f0..2766a4e8eb 100644 --- a/src/tests/end2end/PrimitiveTopologyTests.cpp +++ b/src/tests/end2end/PrimitiveTopologyTests.cpp @@ -151,6 +151,9 @@ class PrimitiveTopologyTest : public DawnTest { void SetUp() override { DawnTest::SetUp(); + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + renderPass = utils::CreateBasicRenderPass(device, kRTSize, kRTSize); vsModule = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"( diff --git a/src/tests/end2end/ShaderFloat16Tests.cpp b/src/tests/end2end/ShaderFloat16Tests.cpp index c920f99b30..8972616df3 100644 --- a/src/tests/end2end/ShaderFloat16Tests.cpp +++ b/src/tests/end2end/ShaderFloat16Tests.cpp @@ -39,6 +39,8 @@ class ShaderFloat16Tests : public DawnTest { TEST_P(ShaderFloat16Tests, Basic16BitFloatFeaturesTest) { DAWN_SKIP_TEST_IF(!IsShaderFloat16Supported()); DAWN_SKIP_TEST_IF(IsD3D12() && IsIntel()); // Flaky crashes. crbug.com/dawn/586 + // TODO(crbug.com/tint/404): Implement float16 in Tint. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); uint16_t uniformData[] = {Float32ToFloat16(1.23), Float32ToFloat16(0.0)}; // 0.0 is a padding. wgpu::Buffer uniformBuffer = utils::CreateBufferFromData( diff --git a/src/tests/end2end/StorageTextureTests.cpp b/src/tests/end2end/StorageTextureTests.cpp index 985bf681fa..70aaffe782 100644 --- a/src/tests/end2end/StorageTextureTests.cpp +++ b/src/tests/end2end/StorageTextureTests.cpp @@ -711,6 +711,9 @@ TEST_P(StorageTextureTests, BindGroupLayoutWithStorageTextureBindingType) { // Test that read-only storage textures are supported in compute shader. TEST_P(StorageTextureTests, ReadonlyStorageTextureInComputeShader) { + // TODO(crbug.com/tint/401): SPIR-V reader parses readonly storage textures as read/write. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + for (wgpu::TextureFormat format : utils::kAllTextureFormats) { if (!utils::TextureFormatSupportsStorageTexture(format)) { continue; @@ -748,6 +751,9 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInComputeShader) { // Test that read-only storage textures are supported in vertex shader. TEST_P(StorageTextureTests, ReadonlyStorageTextureInVertexShader) { + // TODO(crbug.com/tint/401): SPIR-V reader parses readonly storage textures as read/write. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + for (wgpu::TextureFormat format : utils::kAllTextureFormats) { if (!utils::TextureFormatSupportsStorageTexture(format)) { continue; @@ -791,6 +797,9 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInVertexShader) { // Test that read-only storage textures are supported in fragment shader. TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) { + // TODO(crbug.com/tint/401): SPIR-V reader parses readonly storage textures as read/write. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + for (wgpu::TextureFormat format : utils::kAllTextureFormats) { if (!utils::TextureFormatSupportsStorageTexture(format)) { continue; @@ -826,6 +835,9 @@ TEST_P(StorageTextureTests, ReadonlyStorageTextureInFragmentShader) { // Test that write-only storage textures are supported in compute shader. TEST_P(StorageTextureTests, WriteonlyStorageTextureInComputeShader) { + // TODO(https://github.com/gpuweb/gpuweb/issues/1107): texture size queries unspecified + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // TODO(crbug.com/dawn/581): this test requires glClearTexSubImage(), unsupported on GLES. DAWN_SKIP_TEST_IF(IsOpenGLES()); @@ -856,6 +868,9 @@ TEST_P(StorageTextureTests, WriteonlyStorageTextureInComputeShader) { // Test that reading from one read-only storage texture then writing into another write-only storage // texture in one dispatch are supported in compute shader. TEST_P(StorageTextureTests, ReadWriteDifferentStorageTextureInOneDispatchInComputeShader) { + // TODO(https://github.com/gpuweb/gpuweb/issues/1107): texture size queries unspecified + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // TODO(crbug.com/dawn/581): this test requires glClearTexSubImage(), unsupported on GLES. DAWN_SKIP_TEST_IF(IsOpenGLES()); for (wgpu::TextureFormat format : utils::kAllTextureFormats) { @@ -890,6 +905,9 @@ TEST_P(StorageTextureTests, ReadWriteDifferentStorageTextureInOneDispatchInCompu // Test that write-only storage textures are supported in fragment shader. TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) { + // TODO(https://github.com/gpuweb/gpuweb/issues/1107): texture size queries unspecified + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // TODO(crbug.com/dawn/581): this test requires glClearTexSubImage(), unsupported on GLES. DAWN_SKIP_TEST_IF(IsOpenGLES()); for (wgpu::TextureFormat format : utils::kAllTextureFormats) { @@ -919,6 +937,9 @@ TEST_P(StorageTextureTests, WriteonlyStorageTextureInFragmentShader) { // Verify 2D array read-only storage texture works correctly. TEST_P(StorageTextureTests, Readonly2DArrayStorageTexture) { + // TODO(crbug.com/tint/401): SPIR-V reader parses readonly storage textures as read/write. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + constexpr uint32_t kArrayLayerCount = 3u; constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint; @@ -951,6 +972,9 @@ TEST_P(StorageTextureTests, Readonly2DArrayStorageTexture) { // Verify 2D array write-only storage texture works correctly. TEST_P(StorageTextureTests, Writeonly2DArrayStorageTexture) { + // TODO(https://github.com/gpuweb/gpuweb/issues/1107): texture size queries unspecified + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // TODO(crbug.com/dawn/581): this test requires glClearTexSubImage(), unsupported on GLES. DAWN_SKIP_TEST_IF(IsOpenGLES()); constexpr uint32_t kArrayLayerCount = 3u; @@ -973,6 +997,11 @@ TEST_P(StorageTextureTests, Writeonly2DArrayStorageTexture) { // Test that multiple dispatches to increment values by ping-ponging between a read-only storage // texture and a write-only storage texture are synchronized in one pass. TEST_P(StorageTextureTests, ReadonlyAndWriteonlyStorageTexturePingPong) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureStore + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // TODO(crbug.com/dawn/581): this test requires glClearTexSubImage(), unsupported on GLES. DAWN_SKIP_TEST_IF(IsOpenGLES()); constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint; @@ -1050,6 +1079,11 @@ TEST_P(StorageTextureTests, ReadonlyAndWriteonlyStorageTexturePingPong) { // Test that multiple dispatches to increment values by ping-ponging between a sampled texture and // a write-only storage texture are synchronized in one pass. TEST_P(StorageTextureTests, SampledAndWriteonlyStorageTexturePingPong) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // TODO(crbug.com/dawn/581): this test requires glClearTexSubImage(), unsupported on GLES. DAWN_SKIP_TEST_IF(IsOpenGLES()); constexpr wgpu::TextureFormat kTextureFormat = wgpu::TextureFormat::R32Uint; @@ -1177,6 +1211,9 @@ class StorageTextureZeroInitTests : public StorageTextureTests { // Verify that the texture is correctly cleared to 0 before its first usage as a read-only storage // texture in a render pass. TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInRenderPass) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + wgpu::Texture readonlyStorageTexture = CreateTexture(wgpu::TextureFormat::R32Uint, wgpu::TextureUsage::Storage); @@ -1203,6 +1240,11 @@ TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInRenderPa // Verify that the texture is correctly cleared to 0 before its first usage as a read-only storage // texture in a compute pass. TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInComputePass) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureStore + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + wgpu::Texture readonlyStorageTexture = CreateTexture(wgpu::TextureFormat::R32Uint, wgpu::TextureUsage::Storage); @@ -1230,6 +1272,9 @@ TEST_P(StorageTextureZeroInitTests, ReadonlyStorageTextureClearsToZeroInComputeP // Verify that the texture is correctly cleared to 0 before its first usage as a write-only storage // storage texture in a render pass. TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInRenderPass) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Prepare the write-only storage texture. constexpr uint32_t kTexelSizeR32Uint = 4u; wgpu::Texture writeonlyStorageTexture = CreateTexture( @@ -1243,6 +1288,11 @@ TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInRenderP // Verify that the texture is correctly cleared to 0 before its first usage as a write-only storage // texture in a compute pass. TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInComputePass) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureStore + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Prepare the write-only storage texture. constexpr uint32_t kTexelSizeR32Uint = 4u; wgpu::Texture writeonlyStorageTexture = CreateTexture( diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp index 352d97069c..ae751f2e45 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/tests/end2end/TextureZeroInitTests.cpp @@ -844,6 +844,11 @@ TEST_P(TextureZeroInitTest, ColorAttachmentsClear) { // This tests the clearing of sampled textures in render pass TEST_P(TextureZeroInitTest, RenderPassSampledTextureClear) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Create needed resources wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(1, 1, wgpu::TextureUsage::Sampled, kColorFormat); @@ -891,6 +896,11 @@ TEST_P(TextureZeroInitTest, RenderPassSampledTextureClear) { // This tests the clearing of sampled textures during compute pass TEST_P(TextureZeroInitTest, ComputePassSampledTextureClear) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Create needed resources wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(1, 1, wgpu::TextureUsage::Sampled, kColorFormat); @@ -1049,6 +1059,11 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClearWithMultiArrayLayers) { // Then expect the render texture to not store the data from sample texture // because it will be lazy cleared by the EXPECT_TEXTURE_RGBA8_EQ call. TEST_P(TextureZeroInitTest, RenderPassStoreOpClear) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + // Create needed resources wgpu::TextureDescriptor descriptor = CreateTextureDescriptor( 1, 1, wgpu::TextureUsage::Sampled | wgpu::TextureUsage::CopyDst, kColorFormat); @@ -1195,6 +1210,11 @@ TEST_P(TextureZeroInitTest, RenderingLoadingDepthStencilStoreOpClear) { // Test that if one mip of a texture is initialized and another is uninitialized, lazy clearing the // uninitialized mip does not clear the initialized mip. TEST_P(TextureZeroInitTest, PreservesInitializedMip) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + wgpu::TextureDescriptor sampleTextureDescriptor = CreateTextureDescriptor( 2, 1, wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled, @@ -1274,6 +1294,11 @@ TEST_P(TextureZeroInitTest, PreservesInitializedMip) { // Test that if one layer of a texture is initialized and another is uninitialized, lazy clearing // the uninitialized layer does not clear the initialized layer. TEST_P(TextureZeroInitTest, PreservesInitializedArrayLayer) { + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + wgpu::TextureDescriptor sampleTextureDescriptor = CreateTextureDescriptor( 1, 2, wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled, @@ -1651,6 +1676,12 @@ class CompressedTextureZeroInitTest : public TextureZeroInitTest { protected: void SetUp() override { DawnTest::SetUp(); + + // TODO(crbug.com/tint/399) + // Tint SPIRV reader failure: + // Type Determination: v-0006: identifier must be declared before use: textureLoadLevel + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + DAWN_SKIP_TEST_IF(UsesWire()); DAWN_SKIP_TEST_IF(!IsBCFormatSupported()); // TODO: find out why this test is flaky on Windows Intel Vulkan bots. diff --git a/src/tests/end2end/VertexFormatTests.cpp b/src/tests/end2end/VertexFormatTests.cpp index a4e773af6c..d3731ebea2 100644 --- a/src/tests/end2end/VertexFormatTests.cpp +++ b/src/tests/end2end/VertexFormatTests.cpp @@ -375,6 +375,11 @@ class VertexFormatTest : public DawnTest { void DoVertexFormatTest(wgpu::VertexFormat format, std::vector vertex, std::vector expectedData) { + // TODO(crbug.com/tint/402): Unimplemented min / max + DAWN_SKIP_TEST_IF( + (IsFloatFormat(format) || IsHalfFormat(format) || IsNormalizedFormat(format)) && + HasToggleEnabled("use_tint_generator")); + wgpu::RenderPipeline pipeline = MakeTestPipeline(format, expectedData); wgpu::Buffer vertexBuffer = utils::CreateBufferFromData( device, vertex.data(), vertex.size() * sizeof(VertexType), wgpu::BufferUsage::Vertex); diff --git a/src/tests/end2end/VertexStateTests.cpp b/src/tests/end2end/VertexStateTests.cpp index 1c92f3450b..4b2df8efd3 100644 --- a/src/tests/end2end/VertexStateTests.cpp +++ b/src/tests/end2end/VertexStateTests.cpp @@ -524,6 +524,9 @@ TEST_P(VertexStateTest, LastAllowedVertexBuffer) { // Test that overlapping vertex attributes are permitted and load data correctly TEST_P(VertexStateTest, OverlappingVertexAttributes) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 3, 3); utils::ComboVertexStateDescriptor vertexState = @@ -617,6 +620,9 @@ class OptionalVertexStateTest : public DawnTest {}; // Test that vertex input is not required in render pipeline descriptor. TEST_P(OptionalVertexStateTest, Basic) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 3, 3); wgpu::ShaderModule vsModule = diff --git a/src/tests/end2end/ViewportOrientationTests.cpp b/src/tests/end2end/ViewportOrientationTests.cpp index 4f591e9034..4485d4af10 100644 --- a/src/tests/end2end/ViewportOrientationTests.cpp +++ b/src/tests/end2end/ViewportOrientationTests.cpp @@ -21,6 +21,9 @@ class ViewportOrientationTests : public DawnTest {}; // Test that the pixel in viewport coordinate (-1, -1) matches texel (0, 0) TEST_P(ViewportOrientationTests, OriginAt0x0) { + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 2, 2); wgpu::ShaderModule vsModule = diff --git a/src/tests/end2end/ViewportTests.cpp b/src/tests/end2end/ViewportTests.cpp index 528439c653..3dd6032e47 100644 --- a/src/tests/end2end/ViewportTests.cpp +++ b/src/tests/end2end/ViewportTests.cpp @@ -22,6 +22,9 @@ class ViewportTest : public DawnTest { void SetUp() override { DawnTest::SetUp(); + // TODO(crbug.com/tint/398): GLSL builtins don't work with SPIR-V reader. + DAWN_SKIP_TEST_IF(HasToggleEnabled("use_tint_generator")); + mQuadVS = utils::CreateShaderModule(device, utils::SingleShaderStage::Vertex, R"(#version 450 const vec2 pos[6] = vec2[6](vec2(-1.0f, 1.0f),