Move reusable Vulkan code from VulkanBenchmarks to new VulkanWrapper library
This will allow us to reuse this code across unit tests and benchmarks.
Bug: b/176981107
Change-Id: Ie5ea3708cb959dbd0189658b42f01bad998ae94a
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51869
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6d243b8..a880c50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -984,6 +984,11 @@
endif()
if(SWIFTSHADER_BUILD_BENCHMARKS)
+ if (NOT TARGET glslang)
+ add_subdirectory(${THIRD_PARTY_DIR}/glslang)
+ endif()
+ add_subdirectory(${TESTS_DIR}/VulkanWrapper) # Add VulkanWrapper target
+
if (NOT TARGET benchmark::benchmark)
set(BENCHMARK_ENABLE_TESTING FALSE CACHE BOOL FALSE FORCE)
add_subdirectory(${THIRD_PARTY_DIR}/benchmark)
@@ -991,10 +996,6 @@
set_target_properties(benchmark_main PROPERTIES FOLDER "third_party")
endif()
- if (NOT TARGET glslang)
- add_subdirectory(${THIRD_PARTY_DIR}/glslang)
- endif()
-
add_subdirectory(${TESTS_DIR}/ReactorBenchmarks) # Add ReactorBenchmarks target
add_subdirectory(${TESTS_DIR}/SystemBenchmarks) # Add system-benchmarks target
add_subdirectory(${TESTS_DIR}/VulkanBenchmarks) # Add VulkanBenchmarks target