Run gn format Change-Id: Iccc32c91d55c5cf771d23b3e6fe11eb56a6a6964 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/77849 Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
diff --git a/src/Device/BUILD.gn b/src/Device/BUILD.gn index 3c2afa0..a677f72 100644 --- a/src/Device/BUILD.gn +++ b/src/Device/BUILD.gn
@@ -36,18 +36,18 @@ sources = [ # TODO: Write Build.gn for third_party/astc-encoder "../../third_party/astc-encoder/Source/astc_block_sizes2.cpp", + "../../third_party/astc-encoder/Source/astc_codec_internals.h", "../../third_party/astc-encoder/Source/astc_color_unquantize.cpp", "../../third_party/astc-encoder/Source/astc_decompress_symbolic.cpp", "../../third_party/astc-encoder/Source/astc_image_load_store.cpp", "../../third_party/astc-encoder/Source/astc_integer_sequence.cpp", "../../third_party/astc-encoder/Source/astc_mathlib.cpp", + "../../third_party/astc-encoder/Source/astc_mathlib.h", "../../third_party/astc-encoder/Source/astc_mathlib_softfloat.cpp", "../../third_party/astc-encoder/Source/astc_partition_tables.cpp", "../../third_party/astc-encoder/Source/astc_quantization.cpp", "../../third_party/astc-encoder/Source/astc_symbolic_physical.cpp", "../../third_party/astc-encoder/Source/astc_weight_quant_xfer_tables.cpp", - "../../third_party/astc-encoder/Source/astc_codec_internals.h", - "../../third_party/astc-encoder/Source/astc_mathlib.h", ] } @@ -72,9 +72,8 @@ "../../third_party/SPIRV-Headers/include", ] - defines = [ - "SWIFTSHADER_LEGACY_PRECISION=true", # TODO(b/226657516) + "SWIFTSHADER_LEGACY_PRECISION=true", # TODO(b/226657516) ] deps = [ @@ -87,17 +86,11 @@ if (swiftshader_enable_astc) { defines += [ - "SWIFTSHADER_ENABLE_ASTC", # TODO(b/150130101) + "SWIFTSHADER_ENABLE_ASTC", # TODO(b/150130101) ] - deps += [ - ":astc_encoder" - ] - include_dirs += [ - "../../third_party/astc-encoder/Source" - ] + deps += [ ":astc_encoder" ] + include_dirs += [ "../../third_party/astc-encoder/Source" ] } - public_deps = [ - ":Device_headers", - ] + public_deps = [ ":Device_headers" ] }
diff --git a/src/Pipeline/BUILD.gn b/src/Pipeline/BUILD.gn index 9816b0a..5a14750 100644 --- a/src/Pipeline/BUILD.gn +++ b/src/Pipeline/BUILD.gn
@@ -66,7 +66,7 @@ ] defines = [ - "SWIFTSHADER_LEGACY_PRECISION=true", # TODO(chromium:1299047) + "SWIFTSHADER_LEGACY_PRECISION=true", # TODO(chromium:1299047) ] deps = [ @@ -77,7 +77,5 @@ "../Vulkan:swiftshader_libvulkan_headers", ] - public_deps = [ - ":Pipeline_headers", - ] + public_deps = [ ":Pipeline_headers" ] }
diff --git a/src/Reactor/BUILD.gn b/src/Reactor/BUILD.gn index 67dfeb0..f212308 100644 --- a/src/Reactor/BUILD.gn +++ b/src/Reactor/BUILD.gn
@@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("reactor.gni") import("../swiftshader.gni") +import("reactor.gni") config("swiftshader_llvm_reactor_private_config") { if (is_win) { @@ -31,9 +31,7 @@ } config("swiftshader_reactor_base_private_config") { - defines = [ - "REACTOR_ANONYMOUS_MMAP_NAME=swiftshader_jit", - ] + defines = [ "REACTOR_ANONYMOUS_MMAP_NAME=swiftshader_jit" ] } swiftshader_source_set("swiftshader_reactor_base") { @@ -46,9 +44,7 @@ "SIMD.cpp", ] - configs = [ - ":swiftshader_reactor_base_private_config", - ] + configs = [ ":swiftshader_reactor_base_private_config" ] } if (supports_subzero) { @@ -144,7 +140,7 @@ if (is_clang) { cflags += [ "-Wno-header-hygiene", - "-Wno-deprecated-declarations", # (llvm) + "-Wno-deprecated-declarations", # (llvm) "-Wno-enum-compare-switch", "-Wno-unused-lambda-capture", "-Wno-unused-function", @@ -182,7 +178,7 @@ if (is_clang) { cflags += [ "-Wno-header-hygiene", - "-Wno-deprecated-declarations", # (llvm) + "-Wno-deprecated-declarations", # (llvm) ] } } @@ -288,9 +284,9 @@ swiftshader_source_set("swiftshader_subzero_reactor") { deps = [ - "../../third_party/marl:Marl", ":swiftshader_reactor_base", ":swiftshader_subzero", + "../../third_party/marl:Marl", ] sources = [ @@ -345,12 +341,8 @@ swiftshader_source_set("swiftshader_reactor") { if (use_swiftshader_with_subzero) { - deps = [ - ":swiftshader_subzero_reactor", - ] + deps = [ ":swiftshader_subzero_reactor" ] } else { - deps = [ - ":swiftshader_llvm_reactor", - ] + deps = [ ":swiftshader_llvm_reactor" ] } }
diff --git a/src/System/BUILD.gn b/src/System/BUILD.gn index 6f61d9f..2fc84d5 100644 --- a/src/System/BUILD.gn +++ b/src/System/BUILD.gn
@@ -30,9 +30,7 @@ "Timer.hpp", ] if (is_linux || is_chromeos || is_android) { - sources += [ - "Linux/MemFd.hpp", - ] + sources += [ "Linux/MemFd.hpp" ] } } @@ -49,18 +47,12 @@ "Timer.cpp", ] if (is_linux || is_chromeos || is_android) { - sources += [ - "Linux/MemFd.cpp", - ] + sources += [ "Linux/MemFd.cpp" ] } include_dirs = [ ".." ] - deps = [ - "../../third_party/marl:Marl", - ] + deps = [ "../../third_party/marl:Marl" ] - public_deps = [ - ":System_headers", - ] + public_deps = [ ":System_headers" ] }
diff --git a/src/Vulkan/BUILD.gn b/src/Vulkan/BUILD.gn index 852068c..6112337 100644 --- a/src/Vulkan/BUILD.gn +++ b/src/Vulkan/BUILD.gn
@@ -64,7 +64,8 @@ ] if (build_with_chromium) { - # Chromium requires higher precision filtering to pass the layout tests with SwiftShader. + # Chromium requires higher precision filtering to pass the layout tests with + # SwiftShader. # http://crbug.com/726075 defines += [ "SWIFTSHADER_HIGH_PRECISION_FILTERING" ] }
diff --git a/src/WSI/BUILD.gn b/src/WSI/BUILD.gn index b86b819..9a82a2f 100644 --- a/src/WSI/BUILD.gn +++ b/src/WSI/BUILD.gn
@@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("../swiftshader.gni") -import("//build_overrides/wayland.gni") import("//build/config/ozone.gni") +import("//build_overrides/wayland.gni") +import("../swiftshader.gni") config("WSI_metal_weak_framework") { if (is_mac) {
diff --git a/tests/ReactorUnitTests/BUILD.gn b/tests/ReactorUnitTests/BUILD.gn index f90150b..b683718 100644 --- a/tests/ReactorUnitTests/BUILD.gn +++ b/tests/ReactorUnitTests/BUILD.gn
@@ -33,9 +33,7 @@ "ReactorUnitTests.cpp", ] - include_dirs = [ - "../../src/Reactor" - ] + include_dirs = [ "../../src/Reactor" ] } } @@ -57,8 +55,6 @@ "ReactorUnitTests.cpp", ] - include_dirs = [ - "../../src/Reactor" - ] + include_dirs = [ "../../src/Reactor" ] } -} \ No newline at end of file +}
diff --git a/tests/SystemUnitTests/BUILD.gn b/tests/SystemUnitTests/BUILD.gn index d917eda..5f94900 100644 --- a/tests/SystemUnitTests/BUILD.gn +++ b/tests/SystemUnitTests/BUILD.gn
@@ -16,23 +16,21 @@ test("swiftshader_system_unittests") { deps = [ + "../../src/System", + "../../third_party/marl:Marl", "//base", "//base/test:test_support", "//testing/gmock", "//testing/gtest", - "../../src/System", - "../../third_party/marl:Marl", ] sources = [ "//gpu/swiftshader_tests_main.cc", "ConfiguratorTests.cpp", "LRUCacheTests.cpp", - "unittests.cpp", "SynchronizationTests.cpp", + "unittests.cpp", ] - include_dirs = [ - "../../src" - ] + include_dirs = [ "../../src" ] }
diff --git a/tests/VulkanUnitTests/BUILD.gn b/tests/VulkanUnitTests/BUILD.gn index 1adc6f0..2d47fda 100644 --- a/tests/VulkanUnitTests/BUILD.gn +++ b/tests/VulkanUnitTests/BUILD.gn
@@ -1,54 +1,52 @@ -# Copyright 2019 The SwiftShader Authors. All Rights Reserved. -# -# 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("//testing/test.gni") - -test("swiftshader_vulkan_unittests") { - deps = [ - "//base", - "//base/test:test_support", - "//testing/gmock", - "//testing/gtest", - "//third_party/SPIRV-Tools/src:SPIRV-Tools", - "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan", - ] - - sources = [ - "//gpu/swiftshader_tests_main.cc", - "BasicTests.cpp" - "ComputeTests.cpp" - "Device.cpp" - "DrawTests.cpp" - "Driver.cpp" - "main.cpp" - ] - - include_dirs = [ - "//third_party/SPIRV-Tools/src/include", - "../../include", # Khronos headers - ] - - if (is_win) { - ldflags = [ - "/DELAYLOAD:libvulkan.dll", - ] - } else if (is_mac) { - ldflags = [ - "-rpath", - "@executable_path/", - ] - } else { - ldflags = [ "-Wl,-rpath=\$ORIGIN/swiftshader" ] - } -} +# Copyright 2019 The SwiftShader Authors. All Rights Reserved. +# +# 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("//testing/test.gni") + +test("swiftshader_vulkan_unittests") { + deps = [ + "//base", + "//base/test:test_support", + "//testing/gmock", + "//testing/gtest", + "//third_party/SPIRV-Tools/src:SPIRV-Tools", + "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan", + ] + + sources = [ + "//gpu/swiftshader_tests_main.cc", + "BasicTests.cpp", + "ComputeTests.cpp", + "Device.cpp", + "DrawTests.cpp", + "Driver.cpp", + "main.cpp", + ] + + include_dirs = [ + "//third_party/SPIRV-Tools/src/include", + "../../include", # Khronos headers + ] + + if (is_win) { + ldflags = [ "/DELAYLOAD:libvulkan.dll" ] + } else if (is_mac) { + ldflags = [ + "-rpath", + "@executable_path/", + ] + } else { + ldflags = [ "-Wl,-rpath=\$ORIGIN/swiftshader" ] + } +}