Skip to content

Commit

Permalink
api-dump: Use layer settings library
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Sep 6, 2023
1 parent 4c63d7a commit c11aa3a
Show file tree
Hide file tree
Showing 15 changed files with 766 additions and 268 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
endif()

option(BUILD_TESTS "Build tests")
option(BUILD_TESTS_DEBUG "Build tests for debugging layers" OFF)

if(BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
Expand Down
14 changes: 11 additions & 3 deletions layersvt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (BUILD_APIDUMP)

set_target_properties(generate_api_cpp generate_api_text_h generate_api_html_h generate_api_json_h
generate_api_video_text_h generate_api_video_html_h generate_api_video_json_h
PROPERTIES FOLDER ${VULKANTOOLS_TARGET_FOLDER})
PROPERTIES FOLDER VkLayer_api_dump/${VULKANTOOLS_TARGET_FOLDER})
endif()

if (NOT APPLE)
Expand Down Expand Up @@ -90,7 +90,8 @@ if (WIN32)
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
set_target_properties(copy-${target}-def-file PROPERTIES FOLDER ${VULKANTOOLS_TARGET_FOLDER})
set_target_properties(copy-${target}-def-file PROPERTIES FOLDER "VkLayer_${target}")
set_target_properties(VkLayer_${target} PROPERTIES FOLDER "VkLayer_${target}")
endmacro()
else()
macro(add_vk_layer target)
Expand Down Expand Up @@ -162,7 +163,7 @@ if(BUILD_APIDUMP)
run_vulkantools_video_xml_generate(api_dump_generator.py api_dump_video_html.h)
run_vulkantools_video_xml_generate(api_dump_generator.py api_dump_video_json.h)

add_vk_layer(api_dump api_dump.cpp api_dump.h vk_layer_table.cpp vk_layer_table.h VkLayer_api_dump.def api_dump_layer.md VkLayer_api_dump.json.in)
add_vk_layer(api_dump api_dump.cpp api_dump.h vk_layer_table.cpp vk_layer_table.h VkLayer_api_dump.def api_dump_layer.md VkLayer_api_dump.json.in ../scripts/api_dump_generator.py)
add_dependencies(VkLayer_api_dump generate_api_cpp generate_api_text_h generate_api_html_h generate_api_json_h
generate_api_video_text_h generate_api_video_html_h generate_api_video_json_h)
endif ()
Expand Down Expand Up @@ -202,6 +203,7 @@ foreach(TARGET_NAME ${TARGET_NAMES})
)

add_custom_target(${TARGET_NAME}-json ALL COMMAND ${CMAKE_COMMAND} ${CONFIG_DEFINES} -P "${CMAKE_CURRENT_BINARY_DIR}/generator.cmake")
set_target_properties(${TARGET_NAME}-json PROPERTIES FOLDER "${TARGET_NAME}")

# Add target for JSON file install.
if(NOT WIN32)
Expand All @@ -218,3 +220,9 @@ foreach(TARGET_NAME ${TARGET_NAMES})
endif()

endforeach()

if (NOT ANDROID)
if (BUILD_TESTS_DEBUG)
add_subdirectory(test)
endif ()
endif ()
2 changes: 1 addition & 1 deletion layersvt/VkLayer_api_dump.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
]
},
{
"key": "show_timestamp",
"key": "timestamp",
"env": "VK_APIDUMP_TIMESTAMP",
"label": "Show Timestamp",
"description": "Show the timestamp of function calls since start in microseconds",
Expand Down
Loading

0 comments on commit c11aa3a

Please sign in to comment.