Commit aca9fb2f by Nicolas Capens Committed by Nicolas Capens

Add glslang dependency to VulkanBenchmarks

Note glslang's build targets may already have been added by the PowerVR SDK. In that case, we use their copy. This is not optimal since it potentially makes our test results depend on whether or not building the PowerVR samples has been enabled, but it prevents duplicate targets. Bug: b/158655757 Change-Id: Ic4e9292da9b1bb498164929cc7f93e73bf1fd6e6 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45628 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAntonio Maiorano <amaiorano@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
parent 0c8f895c
...@@ -203,6 +203,7 @@ endif() ...@@ -203,6 +203,7 @@ endif()
if(SWIFTSHADER_BUILD_BENCHMARKS) if(SWIFTSHADER_BUILD_BENCHMARKS)
InitSubmodule(benchmark::benchmark ${THIRD_PARTY_DIR}/benchmark) InitSubmodule(benchmark::benchmark ${THIRD_PARTY_DIR}/benchmark)
InitSubmodule(glslang ${THIRD_PARTY_DIR}/glslang)
endif() endif()
if(REACTOR_EMIT_DEBUG_INFO) if(REACTOR_EMIT_DEBUG_INFO)
...@@ -864,6 +865,10 @@ if(SWIFTSHADER_BUILD_BENCHMARKS) ...@@ -864,6 +865,10 @@ if(SWIFTSHADER_BUILD_BENCHMARKS)
add_subdirectory(${THIRD_PARTY_DIR}/benchmark) add_subdirectory(${THIRD_PARTY_DIR}/benchmark)
endif() endif()
if (NOT TARGET glslang)
add_subdirectory(${THIRD_PARTY_DIR}/glslang)
endif()
add_subdirectory(${TESTS_DIR}/ReactorBenchmarks) # Add ReactorBenchmarks target add_subdirectory(${TESTS_DIR}/ReactorBenchmarks) # Add ReactorBenchmarks target
add_subdirectory(${TESTS_DIR}/SystemBenchmarks) # Add system-benchmarks target add_subdirectory(${TESTS_DIR}/SystemBenchmarks) # Add system-benchmarks target
add_subdirectory(${TESTS_DIR}/VulkanBenchmarks) # Add VulkanBenchmarks target add_subdirectory(${TESTS_DIR}/VulkanBenchmarks) # Add VulkanBenchmarks target
......
...@@ -35,6 +35,18 @@ if (NOT TARGET benchmark::benchmark) ...@@ -35,6 +35,18 @@ if (NOT TARGET benchmark::benchmark)
message(FATAL_ERROR "Missing required target: benchmark::benchmark") message(FATAL_ERROR "Missing required target: benchmark::benchmark")
endif() endif()
if (NOT TARGET glslang)
message(FATAL_ERROR "Missing required target: glslang")
endif()
if (NOT TARGET glslang-default-resource-limits)
message(FATAL_ERROR "Missing required target: glslang-default-resource-limits")
endif()
if (NOT TARGET SPIRV)
message(FATAL_ERROR "Missing required target: SPIRV")
endif()
add_dependencies(VulkanBenchmarks add_dependencies(VulkanBenchmarks
vk_swiftshader vk_swiftshader
) )
...@@ -46,7 +58,7 @@ set_target_properties(VulkanBenchmarks PROPERTIES ...@@ -46,7 +58,7 @@ set_target_properties(VulkanBenchmarks PROPERTIES
target_include_directories(VulkanBenchmarks target_include_directories(VulkanBenchmarks
PRIVATE PRIVATE
"${SWIFTSHADER_DIR}/include" "${SWIFTSHADER_DIR}/include/"
) )
target_compile_options(VulkanBenchmarks target_compile_options(VulkanBenchmarks
...@@ -62,5 +74,8 @@ target_link_options(VulkanBenchmarks ...@@ -62,5 +74,8 @@ target_link_options(VulkanBenchmarks
target_link_libraries(VulkanBenchmarks target_link_libraries(VulkanBenchmarks
PRIVATE PRIVATE
benchmark::benchmark benchmark::benchmark
glslang
glslang-default-resource-limits
SPIRV
${ROOT_PROJECT_LINK_LIBRARIES} ${ROOT_PROJECT_LINK_LIBRARIES}
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment