2020-04-10 08:20:10 +00:00
|
|
|
# Copyright 2012 The Dawn Authors
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import("../../scripts/dawn_overrides_with_defaults.gni")
|
|
|
|
|
|
|
|
import("//testing/test.gni")
|
|
|
|
import("${dawn_root}/generator/dawn_generator.gni")
|
|
|
|
import("${dawn_root}/scripts/dawn_features.gni")
|
|
|
|
|
|
|
|
group("dawn_tests") {
|
|
|
|
testonly = true
|
|
|
|
deps = [
|
2020-04-17 16:05:09 +00:00
|
|
|
":dawn_end2end_tests",
|
2020-04-10 08:20:10 +00:00
|
|
|
":dawn_perf_tests",
|
|
|
|
":dawn_unittests",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Gtest Gmock - Handle building inside and outside of Chromium.
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
# When building outside of Chromium we need to define our own targets for GTest
|
|
|
|
# and GMock. However when compiling inside of Chromium we need to reuse the
|
|
|
|
# existing targets, both because Chromium has a special harness for swarming
|
|
|
|
# and because otherwise the "gn check" fails.
|
|
|
|
|
|
|
|
if (!build_with_chromium) {
|
|
|
|
# When we aren't in Chromium we define out own targets based on the location
|
|
|
|
# of the googletest repo.
|
2021-09-15 19:22:19 +00:00
|
|
|
googletest_dir = dawn_googletest_dir
|
2020-04-10 08:20:10 +00:00
|
|
|
|
|
|
|
config("gtest_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${googletest_dir}/googletest",
|
|
|
|
"${googletest_dir}/googletest/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("gtest") {
|
|
|
|
testonly = true
|
2020-04-17 16:45:17 +00:00
|
|
|
sources = [ "${googletest_dir}/googletest/src/gtest-all.cc" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
public_configs = [ ":gtest_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("gmock_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${googletest_dir}/googlemock",
|
|
|
|
"${googletest_dir}/googlemock/include",
|
|
|
|
"${googletest_dir}/googletest/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
static_library("gmock") {
|
|
|
|
testonly = true
|
2020-04-17 16:45:17 +00:00
|
|
|
sources = [ "${googletest_dir}/googlemock/src/gmock-all.cc" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
public_configs = [ ":gmock_config" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
group("gmock_and_gtest") {
|
|
|
|
testonly = true
|
|
|
|
public_deps = [
|
|
|
|
":gmock",
|
|
|
|
":gtest",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
# When we are in Chromium we reuse its targets, and also add some deps that
|
|
|
|
# are needed to launch the test in swarming mode.
|
|
|
|
group("gmock_and_gtest") {
|
|
|
|
testonly = true
|
|
|
|
public_deps = [
|
|
|
|
"//base",
|
|
|
|
"//base/test:test_support",
|
|
|
|
"//testing/gmock",
|
|
|
|
"//testing/gtest",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-28 17:12:05 +00:00
|
|
|
###############################################################################
|
|
|
|
# Wrapping of Chromium targets
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
# These targets are separated because they are Chromium sources files that
|
|
|
|
# can't use the dawn_internal config, otherwise Dawn's warning flags get
|
|
|
|
# applied while compiling a bunch of Chromium's //base (via header inclusion)
|
|
|
|
if (build_with_chromium) {
|
|
|
|
source_set("dawn_unittests_main") {
|
|
|
|
testonly = true
|
|
|
|
deps = [ ":gmock_and_gtest" ]
|
|
|
|
sources = [ "//gpu/dawn_unittests_main.cc" ]
|
|
|
|
}
|
|
|
|
source_set("dawn_end2end_tests_main") {
|
|
|
|
testonly = true
|
|
|
|
deps = [ ":gmock_and_gtest" ]
|
|
|
|
sources = [ "//gpu/dawn_end2end_tests_main.cc" ]
|
|
|
|
}
|
|
|
|
source_set("dawn_perf_tests_main") {
|
|
|
|
testonly = true
|
|
|
|
deps = [ ":gmock_and_gtest" ]
|
|
|
|
sources = [ "//gpu/dawn_perf_tests_main.cc" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-10 08:20:10 +00:00
|
|
|
###############################################################################
|
|
|
|
# Dawn unittests
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
dawn_json_generator("mock_webgpu_gen") {
|
|
|
|
target = "mock_webgpu"
|
|
|
|
outputs = [
|
|
|
|
"src/dawn/mock_webgpu.h",
|
|
|
|
"src/dawn/mock_webgpu.cpp",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
test("dawn_unittests") {
|
|
|
|
configs += [ "${dawn_root}/src/common:dawn_internal" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
":mock_webgpu_gen",
|
|
|
|
"${dawn_root}/src/common",
|
2020-04-14 17:36:44 +00:00
|
|
|
"${dawn_root}/src/dawn:dawn_proc",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn:dawncpp",
|
|
|
|
"${dawn_root}/src/dawn_native",
|
|
|
|
"${dawn_root}/src/dawn_native:dawn_native_sources",
|
|
|
|
"${dawn_root}/src/dawn_wire",
|
|
|
|
"${dawn_root}/src/utils:dawn_utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
# Add internal dawn_native config for internal unittests.
|
|
|
|
configs += [ "${dawn_root}/src/dawn_native:dawn_native_internal" ]
|
|
|
|
|
|
|
|
sources = get_target_outputs(":mock_webgpu_gen")
|
|
|
|
sources += [
|
|
|
|
"${dawn_root}/src/dawn_wire/client/ClientMemoryTransferService_mock.cpp",
|
|
|
|
"${dawn_root}/src/dawn_wire/client/ClientMemoryTransferService_mock.h",
|
|
|
|
"${dawn_root}/src/dawn_wire/server/ServerMemoryTransferService_mock.cpp",
|
|
|
|
"${dawn_root}/src/dawn_wire/server/ServerMemoryTransferService_mock.h",
|
2020-04-15 02:00:14 +00:00
|
|
|
"MockCallback.h",
|
2021-04-14 14:55:07 +00:00
|
|
|
"ToggleParser.cpp",
|
|
|
|
"ToggleParser.h",
|
2021-05-27 00:49:03 +00:00
|
|
|
"unittests/AsyncTaskTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/BitSetIteratorTests.cpp",
|
|
|
|
"unittests/BuddyAllocatorTests.cpp",
|
|
|
|
"unittests/BuddyMemoryAllocatorTests.cpp",
|
2021-04-22 17:49:42 +00:00
|
|
|
"unittests/ChainUtilsTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/CommandAllocatorTests.cpp",
|
|
|
|
"unittests/EnumClassBitmasksTests.cpp",
|
2020-07-30 15:25:37 +00:00
|
|
|
"unittests/EnumMaskIteratorTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/ErrorTests.cpp",
|
|
|
|
"unittests/ExtensionTests.cpp",
|
2021-07-07 08:58:01 +00:00
|
|
|
"unittests/GPUInfoTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/GetProcAddressTests.cpp",
|
2020-06-17 22:35:19 +00:00
|
|
|
"unittests/ITypArrayTests.cpp",
|
|
|
|
"unittests/ITypBitsetTests.cpp",
|
|
|
|
"unittests/ITypSpanTests.cpp",
|
2020-07-14 01:32:43 +00:00
|
|
|
"unittests/ITypVectorTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/LinkedListTests.cpp",
|
|
|
|
"unittests/MathTests.cpp",
|
|
|
|
"unittests/ObjectBaseTests.cpp",
|
|
|
|
"unittests/PerStageTests.cpp",
|
2020-10-06 16:13:42 +00:00
|
|
|
"unittests/PerThreadProcTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/PlacementAllocatedTests.cpp",
|
2021-06-28 10:26:08 +00:00
|
|
|
"unittests/RefBaseTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/RefCountedTests.cpp",
|
|
|
|
"unittests/ResultTests.cpp",
|
|
|
|
"unittests/RingBufferAllocatorTests.cpp",
|
|
|
|
"unittests/SerialMapTests.cpp",
|
|
|
|
"unittests/SerialQueueTests.cpp",
|
|
|
|
"unittests/SlabAllocatorTests.cpp",
|
2020-07-08 20:27:30 +00:00
|
|
|
"unittests/StackContainerTests.cpp",
|
2020-12-09 15:38:27 +00:00
|
|
|
"unittests/SubresourceStorageTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/SystemUtilsTests.cpp",
|
|
|
|
"unittests/ToBackendTests.cpp",
|
2020-06-17 22:35:19 +00:00
|
|
|
"unittests/TypedIntegerTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/BindGroupValidationTests.cpp",
|
|
|
|
"unittests/validation/BufferValidationTests.cpp",
|
|
|
|
"unittests/validation/CommandBufferValidationTests.cpp",
|
|
|
|
"unittests/validation/ComputeIndirectValidationTests.cpp",
|
|
|
|
"unittests/validation/ComputeValidationTests.cpp",
|
|
|
|
"unittests/validation/CopyCommandsValidationTests.cpp",
|
2021-05-07 01:48:14 +00:00
|
|
|
"unittests/validation/CopyTextureForBrowserTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/DebugMarkerValidationTests.cpp",
|
|
|
|
"unittests/validation/DrawIndirectValidationTests.cpp",
|
2021-07-16 03:22:58 +00:00
|
|
|
"unittests/validation/DrawVertexAndIndexBufferOOBValidationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/DynamicStateCommandValidationTests.cpp",
|
|
|
|
"unittests/validation/ErrorScopeValidationTests.cpp",
|
2021-04-01 20:46:42 +00:00
|
|
|
"unittests/validation/ExternalTextureTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/GetBindGroupLayoutValidationTests.cpp",
|
2020-04-24 09:42:03 +00:00
|
|
|
"unittests/validation/IndexBufferValidationTests.cpp",
|
2021-07-27 19:59:58 +00:00
|
|
|
"unittests/validation/InternalUsageValidationTests.cpp",
|
2021-08-19 20:47:28 +00:00
|
|
|
"unittests/validation/LabelTests.cpp",
|
2020-06-19 21:39:23 +00:00
|
|
|
"unittests/validation/MinimumBufferSizeValidationTests.cpp",
|
2021-02-05 21:08:44 +00:00
|
|
|
"unittests/validation/MultipleDeviceTests.cpp",
|
2020-12-24 02:57:07 +00:00
|
|
|
"unittests/validation/QueryValidationTests.cpp",
|
2021-02-25 13:17:01 +00:00
|
|
|
"unittests/validation/QueueOnSubmittedWorkDoneValidationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/QueueSubmitValidationTests.cpp",
|
2021-02-18 15:56:48 +00:00
|
|
|
"unittests/validation/QueueWriteBufferValidationTests.cpp",
|
2020-07-08 18:42:30 +00:00
|
|
|
"unittests/validation/QueueWriteTextureValidationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/RenderBundleValidationTests.cpp",
|
|
|
|
"unittests/validation/RenderPassDescriptorValidationTests.cpp",
|
|
|
|
"unittests/validation/RenderPipelineValidationTests.cpp",
|
2021-09-13 18:49:09 +00:00
|
|
|
"unittests/validation/RequestDeviceValidationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/ResourceUsageTrackingTests.cpp",
|
|
|
|
"unittests/validation/SamplerValidationTests.cpp",
|
|
|
|
"unittests/validation/ShaderModuleValidationTests.cpp",
|
|
|
|
"unittests/validation/StorageTextureValidationTests.cpp",
|
2020-05-04 17:10:49 +00:00
|
|
|
"unittests/validation/TextureSubresourceTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/TextureValidationTests.cpp",
|
|
|
|
"unittests/validation/TextureViewValidationTests.cpp",
|
|
|
|
"unittests/validation/ToggleValidationTests.cpp",
|
2020-11-03 10:54:56 +00:00
|
|
|
"unittests/validation/UnsafeAPIValidationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/validation/ValidationTest.cpp",
|
|
|
|
"unittests/validation/ValidationTest.h",
|
|
|
|
"unittests/validation/VertexBufferValidationTests.cpp",
|
|
|
|
"unittests/validation/VertexStateValidationTests.cpp",
|
2021-02-05 20:11:24 +00:00
|
|
|
"unittests/validation/VideoViewsValidationTests.cpp",
|
2021-09-20 19:25:05 +00:00
|
|
|
"unittests/validation/WriteBufferTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/wire/WireArgumentTests.cpp",
|
|
|
|
"unittests/wire/WireBasicTests.cpp",
|
|
|
|
"unittests/wire/WireBufferMappingTests.cpp",
|
2021-02-22 18:27:36 +00:00
|
|
|
"unittests/wire/WireCreatePipelineAsyncTests.cpp",
|
2021-01-13 20:58:18 +00:00
|
|
|
"unittests/wire/WireDestroyObjectTests.cpp",
|
2020-04-15 02:00:14 +00:00
|
|
|
"unittests/wire/WireDisconnectTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/wire/WireErrorCallbackTests.cpp",
|
|
|
|
"unittests/wire/WireExtensionTests.cpp",
|
2021-01-19 19:27:52 +00:00
|
|
|
"unittests/wire/WireInjectDeviceTests.cpp",
|
2021-04-13 01:26:04 +00:00
|
|
|
"unittests/wire/WireInjectSwapChainTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/wire/WireInjectTextureTests.cpp",
|
|
|
|
"unittests/wire/WireMemoryTransferServiceTests.cpp",
|
|
|
|
"unittests/wire/WireOptionalTests.cpp",
|
2021-02-25 13:17:01 +00:00
|
|
|
"unittests/wire/WireQueueTests.cpp",
|
2021-07-14 02:52:42 +00:00
|
|
|
"unittests/wire/WireShaderModuleTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"unittests/wire/WireTest.cpp",
|
|
|
|
"unittests/wire/WireTest.h",
|
|
|
|
"unittests/wire/WireWGPUDevicePropertiesTests.cpp",
|
|
|
|
]
|
|
|
|
|
2021-03-15 12:10:23 +00:00
|
|
|
if (is_win) {
|
|
|
|
sources += [ "unittests/WindowsUtilsTests.cpp" ]
|
|
|
|
}
|
|
|
|
|
2020-04-10 08:20:10 +00:00
|
|
|
if (dawn_enable_d3d12) {
|
|
|
|
sources += [ "unittests/d3d12/CopySplitTests.cpp" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
# When building inside Chromium, use their gtest main function because it is
|
|
|
|
# needed to run in swarming correctly.
|
|
|
|
if (build_with_chromium) {
|
2020-04-28 17:12:05 +00:00
|
|
|
deps += [ ":dawn_unittests_main" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
} else {
|
|
|
|
sources += [ "UnittestsMain.cpp" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Dawn end2end tests targets
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
source_set("dawn_end2end_tests_sources") {
|
|
|
|
configs += [ "${dawn_root}/src/common:dawn_internal" ]
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
"${dawn_root}/src/common",
|
2020-04-14 17:36:44 +00:00
|
|
|
"${dawn_root}/src/dawn:dawn_proc",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn:dawncpp",
|
2021-03-04 16:49:35 +00:00
|
|
|
|
|
|
|
# Statically linked because the end2end white_box tests use Dawn internals.
|
|
|
|
"${dawn_root}/src/dawn_native:dawn_native_static",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn_wire",
|
|
|
|
"${dawn_root}/src/utils:dawn_utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"DawnTest.h",
|
2021-01-13 17:53:29 +00:00
|
|
|
"MockCallback.h",
|
2021-05-19 19:38:57 +00:00
|
|
|
"ParamGenerator.h",
|
2021-04-14 14:55:07 +00:00
|
|
|
"ToggleParser.cpp",
|
|
|
|
"ToggleParser.h",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/BasicTests.cpp",
|
|
|
|
"end2end/BindGroupTests.cpp",
|
|
|
|
"end2end/BufferTests.cpp",
|
2020-07-06 08:24:30 +00:00
|
|
|
"end2end/BufferZeroInitTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/ClipSpaceTests.cpp",
|
|
|
|
"end2end/ColorStateTests.cpp",
|
2021-09-20 19:25:05 +00:00
|
|
|
"end2end/CommandEncoderTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/CompressedTextureFormatTests.cpp",
|
|
|
|
"end2end/ComputeCopyStorageBufferTests.cpp",
|
2021-02-04 03:57:31 +00:00
|
|
|
"end2end/ComputeDispatchTests.cpp",
|
2021-06-25 08:51:52 +00:00
|
|
|
"end2end/ComputeLayoutMemoryBufferTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/ComputeSharedMemoryTests.cpp",
|
|
|
|
"end2end/ComputeStorageBufferBarrierTests.cpp",
|
|
|
|
"end2end/CopyTests.cpp",
|
2020-11-04 02:30:16 +00:00
|
|
|
"end2end/CopyTextureForBrowserTests.cpp",
|
2021-02-22 18:27:36 +00:00
|
|
|
"end2end/CreatePipelineAsyncTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/CullingTests.cpp",
|
|
|
|
"end2end/DebugMarkerTests.cpp",
|
2020-04-17 16:45:17 +00:00
|
|
|
"end2end/DeprecatedAPITests.cpp",
|
2020-10-06 08:12:29 +00:00
|
|
|
"end2end/DepthBiasTests.cpp",
|
2020-08-04 19:46:37 +00:00
|
|
|
"end2end/DepthStencilCopyTests.cpp",
|
2021-06-08 00:24:43 +00:00
|
|
|
"end2end/DepthStencilLoadOpTests.cpp",
|
2020-11-12 20:57:42 +00:00
|
|
|
"end2end/DepthStencilSamplingTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/DepthStencilStateTests.cpp",
|
|
|
|
"end2end/DestroyTests.cpp",
|
2021-01-13 17:54:37 +00:00
|
|
|
"end2end/DeviceInitializationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/DeviceLostTests.cpp",
|
|
|
|
"end2end/DrawIndexedIndirectTests.cpp",
|
|
|
|
"end2end/DrawIndexedTests.cpp",
|
|
|
|
"end2end/DrawIndirectTests.cpp",
|
|
|
|
"end2end/DrawTests.cpp",
|
|
|
|
"end2end/DynamicBufferOffsetTests.cpp",
|
2020-09-09 23:11:57 +00:00
|
|
|
"end2end/EntryPointTests.cpp",
|
2021-04-01 20:46:42 +00:00
|
|
|
"end2end/ExternalTextureTests.cpp",
|
2021-01-19 20:29:22 +00:00
|
|
|
"end2end/FirstIndexOffsetTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/GpuMemorySynchronizationTests.cpp",
|
|
|
|
"end2end/IndexFormatTests.cpp",
|
Add stress test for memory allocation and free on D3D12
It may not be the root cause of CTS memory leak, but we found some
issues in D3D12 memory allocation for large buffers (> 4M).
The memory allocation is not freed correctly when we call buffer
destroy. When we create a large buffer, it always allocate committed
resources from the system memory and append it to LRU cache, and will
try to free the expired memory in LRU cache when the left memory size
is not enough for the current allocation. When we call buffer destroy,
we remove its heap from LRU cache, release its allocation, but will
add the allocation reference to a delete queue and wait to be freed
together in the next device.tick. At this time, the destroyed memory is
not really released to the system memory. If no tick is triggered during
the buffer allocation and deallocation, these memories will never be
reused again and there will be a memory leak. We need to free these
memories when we detect there is not enough memory, do not wait for
device.tick to do that.
Add a stress case to track the issue, and need to discuss how to fix it.
Bug: dawn:957
Change-Id: Id4bcc97496d372ad7c27c31675327ca12e133217
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55740
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-06-25 08:10:42 +00:00
|
|
|
"end2end/MemoryAllocationStressTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/MultisampledRenderingTests.cpp",
|
2020-06-19 16:21:33 +00:00
|
|
|
"end2end/MultisampledSamplingTests.cpp",
|
2020-06-09 17:09:04 +00:00
|
|
|
"end2end/NonzeroBufferCreationTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/NonzeroTextureCreationTests.cpp",
|
|
|
|
"end2end/ObjectCachingTests.cpp",
|
|
|
|
"end2end/OpArrayLengthTests.cpp",
|
2020-06-10 16:09:45 +00:00
|
|
|
"end2end/PipelineLayoutTests.cpp",
|
2021-04-05 17:16:47 +00:00
|
|
|
"end2end/PrimitiveStateTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/PrimitiveTopologyTests.cpp",
|
2020-07-25 14:48:12 +00:00
|
|
|
"end2end/QueryTests.cpp",
|
2020-04-17 16:45:17 +00:00
|
|
|
"end2end/QueueTests.cpp",
|
2020-10-12 22:32:33 +00:00
|
|
|
"end2end/QueueTimelineTests.cpp",
|
2021-07-07 23:30:00 +00:00
|
|
|
"end2end/RenderAttachmentTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/RenderBundleTests.cpp",
|
|
|
|
"end2end/RenderPassLoadOpTests.cpp",
|
|
|
|
"end2end/RenderPassTests.cpp",
|
2020-12-24 03:11:17 +00:00
|
|
|
"end2end/SamplerFilterAnisotropicTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/SamplerTests.cpp",
|
|
|
|
"end2end/ScissorTests.cpp",
|
2020-06-08 12:18:21 +00:00
|
|
|
"end2end/ShaderFloat16Tests.cpp",
|
2021-02-03 16:57:19 +00:00
|
|
|
"end2end/ShaderTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/StorageTextureTests.cpp",
|
2020-10-27 15:35:56 +00:00
|
|
|
"end2end/SubresourceRenderAttachmentTests.cpp",
|
2021-06-29 04:56:01 +00:00
|
|
|
"end2end/Texture3DTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/TextureFormatTests.cpp",
|
2020-05-16 00:34:57 +00:00
|
|
|
"end2end/TextureSubresourceTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/TextureViewTests.cpp",
|
|
|
|
"end2end/TextureZeroInitTests.cpp",
|
|
|
|
"end2end/VertexFormatTests.cpp",
|
2021-09-15 03:17:42 +00:00
|
|
|
"end2end/VertexOnlyRenderPipelineTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
"end2end/VertexStateTests.cpp",
|
|
|
|
"end2end/ViewportOrientationTests.cpp",
|
|
|
|
"end2end/ViewportTests.cpp",
|
|
|
|
]
|
|
|
|
|
|
|
|
# Validation tests that need OS windows live in end2end tests.
|
|
|
|
sources += [
|
|
|
|
"unittests/validation/ValidationTest.cpp",
|
|
|
|
"unittests/validation/ValidationTest.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
libs = []
|
|
|
|
|
|
|
|
if (dawn_enable_d3d12) {
|
2020-11-20 20:38:37 +00:00
|
|
|
sources += [
|
|
|
|
"end2end/D3D12CachingTests.cpp",
|
|
|
|
"end2end/D3D12ResourceWrappingTests.cpp",
|
2021-02-05 20:11:24 +00:00
|
|
|
"end2end/D3D12VideoViewsTests.cpp",
|
2020-11-20 20:38:37 +00:00
|
|
|
]
|
2020-04-10 08:20:10 +00:00
|
|
|
libs += [
|
|
|
|
"d3d11.lib",
|
|
|
|
"dxgi.lib",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_metal) {
|
|
|
|
sources += [ "end2end/IOSurfaceWrappingTests.cpp" ]
|
2020-07-15 09:59:46 +00:00
|
|
|
frameworks = [ "IOSurface.framework" ]
|
2020-08-13 23:53:59 +00:00
|
|
|
}
|
|
|
|
|
2020-04-10 08:20:10 +00:00
|
|
|
if (dawn_enable_opengl) {
|
|
|
|
assert(dawn_supports_glfw_for_windowing)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_supports_glfw_for_windowing) {
|
|
|
|
sources += [
|
|
|
|
"end2end/SwapChainTests.cpp",
|
|
|
|
"end2end/SwapChainValidationTests.cpp",
|
|
|
|
"end2end/WindowSurfaceTests.cpp",
|
|
|
|
]
|
|
|
|
deps += [ "${dawn_root}/src/utils:dawn_glfw" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
source_set("dawn_white_box_tests_sources") {
|
|
|
|
configs += [ "${dawn_root}/src/dawn_native:dawn_native_internal" ]
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
"${dawn_root}/src/common",
|
2020-04-14 17:36:44 +00:00
|
|
|
"${dawn_root}/src/dawn:dawn_proc",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn:dawncpp",
|
|
|
|
"${dawn_root}/src/dawn_native:dawn_native_sources",
|
|
|
|
|
2021-03-04 16:49:35 +00:00
|
|
|
# Statically linked because the end2end white_box tests use Dawn internals.
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn_native:dawn_native_static",
|
2021-03-04 16:49:35 +00:00
|
|
|
"${dawn_root}/src/dawn_wire",
|
|
|
|
"${dawn_root}/src/utils:dawn_utils",
|
2020-04-10 08:20:10 +00:00
|
|
|
]
|
|
|
|
|
2021-04-14 14:55:07 +00:00
|
|
|
sources = [
|
|
|
|
"DawnTest.h",
|
2021-05-19 19:38:57 +00:00
|
|
|
"ParamGenerator.h",
|
2021-04-14 14:55:07 +00:00
|
|
|
"ToggleParser.h",
|
|
|
|
]
|
2020-04-10 08:20:10 +00:00
|
|
|
|
|
|
|
if (dawn_enable_vulkan) {
|
2020-04-10 08:24:00 +00:00
|
|
|
deps += [ "${dawn_root}/third_party/khronos:vulkan_headers" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
|
|
|
|
if (is_chromeos) {
|
|
|
|
sources += [ "white_box/VulkanImageWrappingTestsDmaBuf.cpp" ]
|
|
|
|
} else if (is_linux) {
|
|
|
|
sources += [ "white_box/VulkanImageWrappingTestsOpaqueFD.cpp" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_error_injection) {
|
|
|
|
sources += [ "white_box/VulkanErrorInjectorTests.cpp" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-22 06:55:36 +00:00
|
|
|
sources += [
|
2021-08-24 01:52:03 +00:00
|
|
|
"white_box/BufferAllocatedSizeTests.cpp",
|
2020-12-22 06:55:36 +00:00
|
|
|
"white_box/InternalResourceUsageTests.cpp",
|
2021-07-02 09:51:18 +00:00
|
|
|
"white_box/InternalStorageBufferBindingTests.cpp",
|
2020-12-22 06:55:36 +00:00
|
|
|
"white_box/QueryInternalShaderTests.cpp",
|
|
|
|
]
|
2020-04-21 00:48:10 +00:00
|
|
|
|
2020-04-10 08:20:10 +00:00
|
|
|
if (dawn_enable_d3d12) {
|
|
|
|
sources += [
|
|
|
|
"white_box/D3D12DescriptorHeapTests.cpp",
|
|
|
|
"white_box/D3D12ResidencyTests.cpp",
|
2020-09-17 23:30:40 +00:00
|
|
|
"white_box/D3D12ResourceHeapTests.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_metal) {
|
|
|
|
sources += [ "white_box/MetalAutoreleasePoolTests.mm" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_opengl) {
|
|
|
|
deps += [ "${dawn_root}/src/utils:dawn_glfw" ]
|
|
|
|
}
|
|
|
|
|
2021-06-03 16:19:16 +00:00
|
|
|
if (dawn_enable_opengles) {
|
|
|
|
sources += [ "white_box/EGLImageWrappingTests.cpp" ]
|
|
|
|
deps += [ "//third_party/angle:libEGL" ]
|
|
|
|
}
|
|
|
|
|
2020-04-10 08:20:10 +00:00
|
|
|
libs = []
|
|
|
|
}
|
|
|
|
|
2020-04-13 21:23:46 +00:00
|
|
|
test("dawn_end2end_tests") {
|
|
|
|
configs += [ "${dawn_root}/src/common:dawn_internal" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":dawn_end2end_tests_sources",
|
2020-04-10 08:20:10 +00:00
|
|
|
":dawn_white_box_tests_sources",
|
|
|
|
":gmock_and_gtest",
|
|
|
|
"${dawn_root}/src/common",
|
2020-04-14 17:36:44 +00:00
|
|
|
"${dawn_root}/src/dawn:dawn_proc",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn:dawncpp",
|
2021-03-04 16:49:35 +00:00
|
|
|
"${dawn_root}/src/dawn_native:dawn_native_static",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn_wire",
|
|
|
|
"${dawn_root}/src/utils:dawn_utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"DawnTest.cpp",
|
|
|
|
"DawnTest.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
libs = []
|
|
|
|
|
|
|
|
# When building inside Chromium, use their gtest main function because it is
|
|
|
|
# needed to run in swarming correctly.
|
|
|
|
if (build_with_chromium) {
|
2020-04-28 17:12:05 +00:00
|
|
|
deps += [ ":dawn_end2end_tests_main" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
} else {
|
|
|
|
sources += [ "End2EndTestsMain.cpp" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_opengl) {
|
|
|
|
deps += [ "${dawn_root}/src/utils:dawn_glfw" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (is_chromeos) {
|
|
|
|
libs += [ "gbm" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Dawn perf tests
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
test("dawn_perf_tests") {
|
|
|
|
configs += [ "${dawn_root}/src/common:dawn_internal" ]
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
":gmock_and_gtest",
|
|
|
|
"${dawn_root}/src/common",
|
2020-04-14 17:36:44 +00:00
|
|
|
"${dawn_root}/src/dawn:dawn_proc",
|
2020-04-10 08:20:10 +00:00
|
|
|
"${dawn_root}/src/dawn:dawncpp",
|
|
|
|
"${dawn_root}/src/dawn_native",
|
|
|
|
"${dawn_root}/src/dawn_platform",
|
|
|
|
"${dawn_root}/src/dawn_wire",
|
|
|
|
"${dawn_root}/src/utils:dawn_utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
"DawnTest.cpp",
|
|
|
|
"DawnTest.h",
|
|
|
|
"ParamGenerator.h",
|
2021-04-14 14:55:07 +00:00
|
|
|
"ToggleParser.cpp",
|
|
|
|
"ToggleParser.h",
|
2020-04-10 08:20:10 +00:00
|
|
|
"perf_tests/BufferUploadPerf.cpp",
|
|
|
|
"perf_tests/DawnPerfTest.cpp",
|
|
|
|
"perf_tests/DawnPerfTest.h",
|
|
|
|
"perf_tests/DawnPerfTestPlatform.cpp",
|
|
|
|
"perf_tests/DawnPerfTestPlatform.h",
|
|
|
|
"perf_tests/DrawCallPerf.cpp",
|
2021-05-02 02:13:11 +00:00
|
|
|
"perf_tests/ShaderRobustnessPerf.cpp",
|
2021-01-18 09:28:27 +00:00
|
|
|
"perf_tests/SubresourceTrackingPerf.cpp",
|
2020-04-10 08:20:10 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
libs = []
|
|
|
|
|
2020-07-03 05:47:07 +00:00
|
|
|
# When building inside Chromium, use their gtest main function and the
|
|
|
|
# other perf test scaffolding in order to run in swarming correctly.
|
2020-04-10 08:20:10 +00:00
|
|
|
if (build_with_chromium) {
|
2020-04-28 17:12:05 +00:00
|
|
|
deps += [ ":dawn_perf_tests_main" ]
|
2020-07-03 05:47:07 +00:00
|
|
|
data_deps = [ "//testing:run_perf_test" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
} else {
|
|
|
|
sources += [ "PerfTestsMain.cpp" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_metal) {
|
2020-07-15 09:59:46 +00:00
|
|
|
frameworks = [ "IOSurface.framework" ]
|
2020-04-10 08:20:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (dawn_enable_opengl) {
|
|
|
|
deps += [ "${dawn_root}/src/utils:dawn_glfw" ]
|
|
|
|
}
|
|
|
|
}
|