Skip to content

Commit f374fca

Browse files
authored
Merge branch 'main' into melmet01/device_fault
2 parents 7ae8d4d + e6ada08 commit f374fca

109 files changed

Lines changed: 4652 additions & 710 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
cmake --build "build/${{ matrix.platform }}" --target vulkan_samples --config ${{ matrix.build_type }} ${{ env.PARALLEL }}
5757
5858
build_v2:
59-
name: "Build ${{ matrix.platform }} in ${{ matrix.build_type }}"
59+
name: "Build v2 Components ${{ matrix.platform }} in ${{ matrix.build_type }}"
6060
strategy:
6161
matrix:
6262
platform: [windows, ubuntu]

antora/modules/ROOT/nav.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
////
2-
- Copyright (c) 2023-2025, Holochip Inc
3-
- Copyright (c) 2023-2025, Sascha Willems
2+
- Copyright (c) 2023-2026, Holochip Inc
3+
- Copyright (c) 2023-2026, Sascha Willems
44
- Copyright (c) 2025, Arm Limited and Contributors
55
-
66
- SPDX-License-Identifier: Apache-2.0
@@ -85,6 +85,7 @@
8585
*** xref:samples/extensions/hpp_push_descriptors/README.adoc[Push descriptors (Vulkan-Hpp)]
8686
** xref:samples/extensions/ray_tracing_basic/README.adoc[Raytracing basic]
8787
** xref:samples/extensions/ray_tracing_extended/README.adoc[Raytracing extended]
88+
** xref:samples/extensions/ray_tracing_invocation_reorder/README.adoc[Ray tracing invocation reorder (SER)]
8889
** xref:samples/extensions/ray_queries/README.adoc[Ray queries]
8990
** xref:samples/extensions/ray_tracing_reflection/README.adoc[Ray tracing reflection]
9091
** xref:samples/extensions/ray_tracing_position_fetch/README.adoc[Ray tracing position fetch]

app/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2024, Arm Limited and Contributors
1+
# Copyright (c) 2019-2025, Arm Limited and Contributors
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -135,7 +135,7 @@ if(IOS)
135135
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY "YES"
136136
)
137137
endif ()
138-
# No need to search for Vulkan package or MoltenVK library, Vulkan cache variables already defined on Apple platforms by global_options.cmake
138+
# Vulkan cache variables already defined by main project CMakeLists and updated on Apple platforms by global_options.cmake
139139
if(Vulkan_LIBRARY AND ${Vulkan_VERSION} VERSION_GREATER_EQUAL 1.3.278)
140140
target_sources(${PROJECT_NAME} PRIVATE
141141
${Vulkan_Target_SDK}/iOS/share/vulkan
@@ -163,17 +163,24 @@ if(IOS)
163163
set(FRAMEWORKS_TO_EMBED)
164164
if(Vulkan_MoltenVK_LIBRARY)
165165
list(APPEND FRAMEWORKS_TO_EMBED "${Vulkan_MoltenVK_LIBRARY};")
166+
message(STATUS "Embedding Vulkan driver: ${Vulkan_MoltenVK_LIBRARY}")
167+
# add support for potentially other iOS Vulkan drivers here...
168+
#elseif(OTHER_IOS_VULKAN_DRIVER)
169+
#list(APPEND FRAMEWORKS_TO_EMBED "${OTHER_IOS_VULKAN_DRIVER};")
170+
#message(STATUS "Embedding Vulkan driver: ${OTHER_IOS_VULKAN_DRIVER}")
166171
else()
167-
message(FATAL_ERROR "Can't find MoltenVK library. Please install the Vulkan SDK or MoltenVK project and set VULKAN_SDK.")
172+
message(FATAL_ERROR "Can't find Vulkan driver for iOS. Please install the Vulkan SDK and run: 'source <MY_SDK_PATH>/iOS/setup-env.sh'")
168173
endif()
169174
if(Vulkan_LIBRARY)
170175
list(APPEND FRAMEWORKS_TO_EMBED "${Vulkan_LIBRARY};")
176+
message(STATUS "Embedding Vulkan loader: ${Vulkan_LIBRARY}")
171177
endif()
172178
if(Vulkan_Layer_VALIDATION)
173179
# trouble is can't turn this on/off if XCode decides to build debug and we're configured for release. Need to revist
174180
# note the Vulkan validation layer must be present and enabled even in release mode for the shader_debugprintf sample
175181
#if(("${VKB_DEBUG}" STREQUAL "ON") OR ("${VKB_VALIDATION_LAYERS}" STREQUAL "ON"))
176182
list(APPEND FRAMEWORKS_TO_EMBED "${Vulkan_Layer_VALIDATION}")
183+
message(STATUS "Embedding Vulkan Validation Layer: ${Vulkan_Layer_VALIDATION}")
177184
#endif()
178185
endif()
179186
set_target_properties(${PROJECT_NAME} PROPERTIES

bldsys/cmake/global_options.cmake

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ endif()
3333

3434
if(APPLE)
3535
cmake_minimum_required(VERSION 3.24)
36-
set(VKB_ENABLE_PORTABILITY ON CACHE BOOL "Enable portability enumeration and subset features in the framework. This is required to be set when running on Apple platforms." FORCE)
36+
option(VKB_ENABLE_PORTABILITY "Enable portability enumeration and subset features in the framework. This is default ON for Apple platforms." ON)
3737

38+
# the following assumes MoltenVK is used for these cases: a) standalone deployment on macOS (i.e. set USE_MoltenVK=ON), and b) for iOS deployment
39+
# if this assumption changes (e.g. KosmicKrisp adds standalone or iOS support), then this section will require modification to handle optionality
3840
find_package(Vulkan QUIET OPTIONAL_COMPONENTS MoltenVK)
3941
if(USE_MoltenVK OR (IOS AND (NOT Vulkan_MoltenVK_FOUND OR ${CMAKE_OSX_SYSROOT} STREQUAL "iphonesimulator")))
40-
# if using MoltenVK, or MoltenVK for iOS was not found, or using iOS Simulator, look for MoltenVK in the Vulkan SDK and MoltenVK project locations
42+
# if using MoltenVK standalone, or MoltenVK for iOS not found or using iOS Simulator, look for MoltenVK in Vulkan SDK and MoltenVK project paths
4143
if(NOT Vulkan_MoltenVK_LIBRARY)
4244
# since both are available in the Vulkan SDK and MoltenVK github project, make sure we look for MoltenVK framework on iOS and dylib on macOS
4345
set(_saved_cmake_find_framework ${CMAKE_FIND_FRAMEWORK})
@@ -58,7 +60,8 @@ if(APPLE)
5860
# on iOS we can control Vulkan library loading priority by selecting which libraries are embedded in the iOS application bundle
5961
if(IOS)
6062
add_compile_definitions(_HPP_VULKAN_LIBRARY="MoltenVK.framework/MoltenVK")
61-
# unset FindVulkan.cmake cache variables so Vulkan loader, Validation Layer, and icd/layer json files are not embedded on iOS
63+
# unset FindVulkan.cmake cache variables so Vulkan loader and Validation Layer libraries are not embedded on iOS Simulator
64+
# the iOS Simulator supports arm64 & x86_64 hosts, but the Vulkan loader and Validation Layer are compiled for arm64 only
6265
unset(Vulkan_LIBRARY CACHE)
6366
unset(Vulkan_Layer_VALIDATION CACHE)
6467

@@ -69,15 +72,18 @@ if(APPLE)
6972
add_compile_definitions(_GLFW_VULKAN_LIBRARY="libMoltenVK.dylib")
7073
set(ENV{DYLD_LIBRARY_PATH} "${MoltenVK_LIBRARY_PATH}:$ENV{DYLD_LIBRARY_PATH}")
7174
else()
72-
message(FATAL_ERROR "Vulkan library found in MoltenVK search path. Please set VULKAN_SDK to the MoltenVK project install location.")
75+
message(FATAL_ERROR "Vulkan loader found in MoltenVK search path. Please set VULKAN_SDK to the MoltenVK project install location.")
7376
endif()
74-
message(STATUS "Using MoltenVK: ${Vulkan_MoltenVK_LIBRARY}")
77+
message(STATUS "Using MoltenVK standalone: ${Vulkan_MoltenVK_LIBRARY}")
7578
else()
7679
message(FATAL_ERROR "Can't find MoltenVK library. Please install the Vulkan SDK or MoltenVK project and set VULKAN_SDK.")
7780
endif()
78-
elseif(IOS)
79-
# if not using MoltenVK on iOS, set up global Vulkan Library define for iOS Vulkan loader
80-
add_compile_definitions(_HPP_VULKAN_LIBRARY="vulkan.framework/vulkan")
81+
#elseif(OTHER_VULKAN_DRIVER)
82+
# handle any special processing here for other Vulkan driver (e.g. KosmicKrisp) for standalone usage on macOS or deployment to iOS
83+
# would likely require extensions to CMake find_package() OPTIONAL_COMPONENTS and library variables to identify & use other driver
84+
#else()
85+
# if not using standalone driver, retain find_package() results for Vulkan driver, Vulkan loader, and Validation Layer library variables
86+
# no need to override with _HPP_VULKAN_LIBRARY in this case since Vulkan DynamicLoader will find/load Vulkan library on macOS & iOS
8187
endif()
8288

8389
if(CMAKE_GENERATOR MATCHES "Xcode")
@@ -103,6 +109,8 @@ if(APPLE)
103109
set(CMAKE_SUPPRESS_REGENERATION ON)
104110
endif()
105111
endif()
112+
else()
113+
option(VKB_ENABLE_PORTABILITY "Enable portability enumeration and subset features in the framework. This is default OFF for non-Apple platforms." OFF)
106114
endif()
107115

108116
set(VKB_WARNINGS_AS_ERRORS ON CACHE BOOL "Enable Warnings as Errors")

docs/build.adoc

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -182,33 +182,14 @@ Please make sure, when running any sample, that you either:
182182
* Run Command Prompt or Visual Studio as administrator
183183
____
184184

185-
`Step 1.` The following command will generate the VS project
186-
187-
----
188-
cmake -G "Visual Studio 15 2017 Win64" -S . -Bbuild/windows
189-
----
190-
191-
(Prior to CMake v3.13)
192-
193-
----
194-
cmake -G "Visual Studio 15 2017 Win64" . -Bbuild/windows
195-
----
196-
197-
(New in CMake v3.14.
198-
Visual Studio 2019 must be installed)
199-
200-
----
201-
cmake -G "Visual Studio 16 2019" -A x64 -S . -Bbuild/windows
202-
----
203-
204-
(New in CMake v3.21.
205-
Visual Studio 2022 must be installed)
185+
`Step 1.` Generate the VS solution from the root of the repository
206186

187+
(For other VS versions please refer to https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#id15[CMake Generators])
207188
----
208189
cmake -G "Visual Studio 17 2022" -A x64 -S . -Bbuild/windows
209190
----
210191

211-
Open the *vulkan_samples.sln* VS project inside build/windows and build with Ctrl-Shift-B. To run Vulkan Samples, use Visual Studio's Debug Properties selection and set the Debugging Command Arguments to --help. Click the "Local Windows Debugger" button and you should see the help output in the terminal. For convenience, the default setting is to run the hello_triangle sample; just edit that to your desired sample to run.
192+
Open the *vulkan_samples.sln* or *vulkan_samples.slnx* VS solution inside *build/windows* and build with Ctrl-Shift-B. To run Vulkan Samples, use Visual Studio's Debug Properties selection and set the Debugging Command Arguments to --help. Click the "Local Windows Debugger" button and you should see the help output in the terminal. For convenience, the default setting is to run the hello_triangle sample; just edit that to your desired sample to run.
212193

213194
Alternatively, for command line builds use the steps below:
214195

framework/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ set(RENDERING_SUBPASSES_FILES
130130
rendering/subpasses/hpp_forward_subpass.h
131131
# Source files
132132
rendering/subpasses/forward_subpass.cpp
133-
rendering/subpasses/lighting_subpass.cpp
134-
rendering/subpasses/geometry_subpass.cpp)
133+
rendering/subpasses/lighting_subpass.cpp)
135134

136135
set(SCENE_GRAPH_FILES
137136
# Header Files
@@ -178,7 +177,6 @@ set(SCENE_GRAPH_COMPONENT_FILES
178177
scene_graph/components/material.cpp
179178
scene_graph/components/mesh.cpp
180179
scene_graph/components/pbr_material.cpp
181-
scene_graph/components/sampler.cpp
182180
scene_graph/components/sub_mesh.cpp
183181
scene_graph/components/texture.cpp
184182
scene_graph/components/transform.cpp

framework/api_vulkan_sample.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct SwapchainBuffer
5959
struct Texture
6060
{
6161
std::unique_ptr<vkb::sg::Image> image;
62-
VkSampler sampler;
62+
VkSampler sampler = VK_NULL_HANDLE;
6363
};
6464

6565
/**

framework/core/command_pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class CommandPool : private vkb::core::CommandPoolBase
6868
uint32_t queue_family_index,
6969
vkb::rendering::RenderFrame<bindingType> *render_frame = nullptr,
7070
size_t thread_index = 0,
71-
vkb::CommandBufferResetMode reset_mode = vkb::CommandBufferResetMode::ResetPool);
71+
vkb::CommandBufferResetMode reset_mode = vkb::CommandBufferResetMode::ResetIndividually);
7272
CommandPool(CommandPool<bindingType> const &) = delete;
7373
CommandPool(CommandPool<bindingType> &&other) = default;
7474
CommandPool &operator=(CommandPool<bindingType> const &) = delete;

framework/core/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ inline void Device<bindingType>::init(std::unordered_map<const char *, bool> con
638638
if (gpu.has_high_priority_graphics_queue() &&
639639
(vkb::common::get_queue_family_index(queue_family_properties, vk::QueueFlagBits::eGraphics) == queue_family_index))
640640
{
641-
queue_priorities.back()[0] = 1.0f;
641+
queue_priorities.back()[0] = 0.5f;
642642
}
643643

644644
queue_create_infos.push_back({.queueFamilyIndex = queue_family_index,

framework/core/hpp_descriptor_set_layout.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ class HPPDescriptorSetLayout : private vkb::DescriptorSetLayout
6464
reinterpret_cast<vk::DescriptorSetLayoutBinding *>(vkb::DescriptorSetLayout::get_layout_binding(binding_index).release()));
6565
}
6666

67+
std::unique_ptr<vk::DescriptorSetLayoutBinding> get_layout_binding(std::string const &name) const
68+
{
69+
return std::unique_ptr<vk::DescriptorSetLayoutBinding>(
70+
reinterpret_cast<vk::DescriptorSetLayoutBinding *>(vkb::DescriptorSetLayout::get_layout_binding(name).release()));
71+
}
72+
6773
vk::DescriptorBindingFlagsEXT get_layout_binding_flag(const uint32_t binding_index) const
6874
{
6975
return static_cast<vk::DescriptorBindingFlagsEXT>(vkb::DescriptorSetLayout::get_layout_binding_flag(binding_index));

0 commit comments

Comments
 (0)