Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix layer installation code #1940

Merged
merged 1 commit into from
Nov 14, 2023
Merged

Fix layer installation code #1940

merged 1 commit into from
Nov 14, 2023

Conversation

juan-lunarg
Copy link
Contributor

closes #1923

@ci-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 83288.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2837 running.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2837 failed.

CMakeLists.txt Show resolved Hide resolved
file(COPY ${IMAGES} DESTINATION ${CMAKE_BINARY_DIR}/layersvt/images)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_definitions(-DVK_USE_PLATFORM_WIN32_KHR -DVK_USE_PLATFORM_WIN32_KHX -DWIN32_LEAN_AND_MEAN -DNOMINMAX)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VK_USE_PLATFORM_WIN32_KHX doesn't exist.

file(COPY ${IMAGES} DESTINATION ${CMAKE_BINARY_DIR}/layersvt/images)

if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_definitions(-DVK_USE_PLATFORM_WIN32_KHR -DVK_USE_PLATFORM_WIN32_KHX -DWIN32_LEAN_AND_MEAN -DNOMINMAX)
set(DisplayServer Win32)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DisplayServer isn't / wasn't used anywhere.

add_compile_definitions(VK_USE_PLATFORM_ANDROID_KHR)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU")
option(BUILD_WSI_XCB_SUPPORT "Build XCB WSI support" ON)
option(BUILD_WSI_XLIB_SUPPORT "Build Xlib WSI support" ON)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

XLIB wasn't used anywhere. Only XCB for the monitor layer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file wasn't used anywhere and did nothing.

Comment on lines +6 to +7
"library_path": "@JSON_LIBRARY_PATH@",
"api_version": "@JSON_VERSION@",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches what the vulkan extension layers currently do.

Comment on lines +49 to +52
# If the target doesn't exist continue.
if (NOT TARGET "VkLayer_${test_item}")
continue()
endif()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much more robust check.

DEPENDS ${VULKAN_REGISTRY}/vk.xml ${VULKAN_REGISTRY}/generator.py ${VULKANTOOLS_SCRIPTS_DIR}/${dependency} ${VULKANTOOLS_SCRIPTS_DIR}/vt_genvk.py ${VULKAN_REGISTRY}/reg.py
)
endfunction()
if(BUILD_APIDUMP)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved all the API dump code inside this block which makes it MUCH clearer what is happening.

@ci-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 83299.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2838 running.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2838 failed.

@ci-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 83307.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2839 running.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2839 passed.

@juan-lunarg
Copy link
Contributor Author

CI VulkanTools build # 2839 passed.

CI passed. Had to fix generating PDBs on release builds. I also learned vkvia doesn't work if you set WIN32_LEAN_AND_MEAN since it uses functionality from that Windows.h

CMakeLists.txt Show resolved Hide resolved
layersvt/CMakeLists.txt Show resolved Hide resolved
@juan-lunarg
Copy link
Contributor Author

Does that mean the apple build of vulkantools fails when it tries to build these layers, or that it doesn't fail the build (but doesn't successfully create the layers either)

These layers don't compile/support Apple at the moment and will fail. Just turn it off to avoid issues.

Layers now install properly for WIN32. With PDBs for Release
builds.

closes #1923
@ci-tester-lunarg
Copy link

CI VulkanTools build queued with queue ID 83335.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2840 running.

Comment on lines +93 to +98
if(CMAKE_SYSTEM_NAME MATCHES "Linux|BSD|DragonFly|GNU")
target_compile_definitions(VkLayer_api_dump PRIVATE VK_USE_PLATFORM_XLIB_KHR)

# Add Wayland API dump support
# target_compile_definitions(VkLayer_api_dump PRIVATE VK_USE_PLATFORM_XLIB_KHR)
endif()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ci-tester-lunarg
Copy link

CI VulkanTools build # 2840 passed.

Copy link
Contributor

@charles-lunarg charles-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed every issue I had.

@juan-lunarg juan-lunarg merged commit bbd34b4 into LunarG:main Nov 14, 2023
7 checks passed
@juan-lunarg juan-lunarg deleted the juan/1923 branch November 14, 2023 21:42
@juan-lunarg
Copy link
Contributor Author

As a sanity check layer testing still works.

Test project /home/juan/projects/LUNARG-VulkanTools/build
    Start 1: test_api_dump_layer
1/3 Test #1: test_api_dump_layer ..............   Passed    2.01 sec
    Start 2: test_monitor_layer
2/3 Test #2: test_monitor_layer ...............   Passed    1.97 sec
    Start 3: test_screenshot_layer
3/3 Test #3: test_screenshot_layer ............   Passed    2.03 sec

100% tests passed, 0 tests failed out of 3

Total Test time (real) =   6.01 sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WIN32 layer installation issues
3 participants