mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-31 12:35:51 +00:00
test(agc): skip pipeline inspection when Vulkan is unavailable
This commit is contained in:
1 parent
b971004857
commit
cc59cb7b93
2 files changed
+14
-1
No files matched your search
@@ -3756,9 +3756,10 @@ if(BUILD_TESTING AND ANYPS5_ENABLE_SPIRV_TOOLS)
|
||||
add_dependencies(agc_compute_pipeline_replay_tests agc_compute_pipeline_replay agc_driver_branch_past_endpgm_tests)
|
||||
add_test(NAME agc_compute_pipeline_inspection COMMAND ${CMAKE_COMMAND}
|
||||
-DREPLAY=$<TARGET_FILE:agc_compute_pipeline_replay>
|
||||
-DVULKAN_PROBE=$<TARGET_FILE:agc_compute_pipeline_replay_tests>
|
||||
-DOUTPUT_ROOT=${CMAKE_CURRENT_BINARY_DIR}/capture-tests
|
||||
-P ${CMAKE_CURRENT_SOURCE_DIR}/tests/ComputePipelineInspectRun.cmake)
|
||||
set_tests_properties(agc_compute_pipeline_inspection PROPERTIES TIMEOUT 60 SKIP_REGULAR_EXPRESSION "compute pipeline inspection: skipped unsupported executable statistics")
|
||||
set_tests_properties(agc_compute_pipeline_inspection PROPERTIES TIMEOUT 60 SKIP_REGULAR_EXPRESSION "compute pipeline inspection: skipped")
|
||||
add_test(NAME agc_compute_pipeline_capture_run COMMAND ${CMAKE_COMMAND}
|
||||
-DFIXTURE=$<TARGET_FILE:agc_driver_branch_past_endpgm_tests>
|
||||
-DREPLAY=$<TARGET_FILE:agc_compute_pipeline_replay>
|
||||
|
||||
@@ -4,6 +4,18 @@ endif()
|
||||
string(RANDOM LENGTH 12 ALPHABET 0123456789abcdef runId)
|
||||
set(runDirectory "${OUTPUT_ROOT}/compute-inspect-${runId}")
|
||||
file(MAKE_DIRECTORY "${runDirectory}")
|
||||
if(NOT DEFINED ENV{ANYPS5_REQUIRE_VULKAN} AND DEFINED VULKAN_PROBE)
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" -E env "APS5_PIPELINE_STATS=0" "${VULKAN_PROBE}"
|
||||
WORKING_DIRECTORY "${runDirectory}"
|
||||
RESULT_VARIABLE probeResult OUTPUT_VARIABLE probeOutput ERROR_VARIABLE probeError TIMEOUT 20
|
||||
)
|
||||
file(WRITE "${runDirectory}/vulkan-probe.log" "${probeOutput}\n${probeError}")
|
||||
if(probeResult STREQUAL "77")
|
||||
message(STATUS "compute pipeline inspection: skipped, no usable Vulkan device")
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
set(report "${runDirectory}/inspection.json")
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" -E env "APS5_PIPELINE_STATS=1" "${REPLAY}" --fixture --inspect --output "${report}"
|
||||
|
||||
Reference in new issue
Block a user