Skip to content

Commit 58f6db9

Browse files
authored
Merge branch 'main' into Vulkan-OpenXR
2 parents 9a10a98 + f1be81e commit 58f6db9

249 files changed

Lines changed: 85933 additions & 28742 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.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ attachments/simple_engine/android/app/build/**
3030
attachments/simple_engine/android/gradle/wrapper/**
3131
attachments/simple_engine/android/gradlew
3232
attachments/simple_engine/android/gradlew.bat
33+
34+
attachments/template/build/**

antora/modules/ROOT/nav.adoc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
** xref:courses/18_Ray_tracing/05_Shadow_transparency.adoc[Shadow transparency]
6262
** xref:courses/18_Ray_tracing/06_Reflections.adoc[Reflections]
6363
** xref:courses/18_Ray_tracing/07_Conclusion.adoc[Conclusion]
64+
* xref:courses/siggraph2026_vk_tutorial/00_Overview.adoc[How to write a Vulkan application in 2026]
6465
* xref:90_FAQ.adoc[FAQ]
6566
* link:https://github.com/KhronosGroup/Vulkan-Tutorial[GitHub Repository, window=_blank]
6667
@@ -250,3 +251,50 @@
250251
*** xref:OpenXR_Vulkan_Spatial_Computing/20_Spatial_Diagnostics_CI_CD/03_automated_qa.adoc[Automated QA]
251252
*** xref:OpenXR_Vulkan_Spatial_Computing/20_Spatial_Diagnostics_CI_CD/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
252253
** xref:OpenXR_Vulkan_Spatial_Computing/conclusion.adoc[Conclusion]
254+
* Synchronization 2
255+
** xref:Synchronization/introduction.adoc[Introduction]
256+
** Anatomy of a Dependency
257+
*** xref:Synchronization/Anatomy_of_a_Dependency/01_introduction.adoc[Introduction]
258+
*** xref:Synchronization/Anatomy_of_a_Dependency/02_execution_vs_memory.adoc[Execution vs. Memory]
259+
*** xref:Synchronization/Anatomy_of_a_Dependency/03_sync2_advantage.adoc[Sync 2 Advantage]
260+
*** xref:Synchronization/Anatomy_of_a_Dependency/04_refined_pipeline_stages.adoc[Refined Pipeline Stages]
261+
*** xref:Synchronization/Anatomy_of_a_Dependency/05_conclusion.adoc[Conclusion]
262+
** Pipeline Barriers and Transitions
263+
*** xref:Synchronization/Pipeline_Barriers_Transitions/01_introduction.adoc[Introduction]
264+
*** xref:Synchronization/Pipeline_Barriers_Transitions/02_image_barrier.adoc[The Image Barrier]
265+
*** xref:Synchronization/Pipeline_Barriers_Transitions/03_queue_family_ownership.adoc[Queue Family Ownership]
266+
*** xref:Synchronization/Pipeline_Barriers_Transitions/04_global_vs_local_barriers.adoc[Global vs. Local Barriers]
267+
** Timeline Semaphores
268+
*** xref:Synchronization/Timeline_Semaphores/01_introduction.adoc[Introduction]
269+
*** xref:Synchronization/Timeline_Semaphores/02_unifying_sync.adoc[Unifying Sync]
270+
*** xref:Synchronization/Timeline_Semaphores/03_monotonic_counter.adoc[Monotonic Counter]
271+
*** xref:Synchronization/Timeline_Semaphores/04_wait_before_signal.adoc[Wait Before Signal]
272+
** Frame-in-Flight Architecture
273+
*** xref:Synchronization/Frame_in_Flight/01_introduction.adoc[Introduction]
274+
*** xref:Synchronization/Frame_in_Flight/02_managing_concurrent_frames.adoc[Managing Concurrent Frames]
275+
*** xref:Synchronization/Frame_in_Flight/03_resource_lifetimes.adoc[Resource Lifetimes]
276+
** Asynchronous Compute & Overlap
277+
*** xref:Synchronization/Async_Compute_Overlap/01_introduction.adoc[Introduction]
278+
*** xref:Synchronization/Async_Compute_Overlap/02_maximizing_throughput.adoc[Maximizing Throughput]
279+
*** xref:Synchronization/Async_Compute_Overlap/03_async_post_processing.adoc[Async Post-processing]
280+
*** xref:Synchronization/Async_Compute_Overlap/04_bubble_problem.adoc[The Bubble Problem]
281+
** Transfer Queues & Asset Streaming Sync
282+
*** xref:Synchronization/Transfer_Queues_Streaming/01_introduction.adoc[Introduction]
283+
*** xref:Synchronization/Transfer_Queues_Streaming/02_non_blocking_uploads.adoc[Non-blocking Uploads]
284+
*** xref:Synchronization/Transfer_Queues_Streaming/03_staging_sync.adoc[Staging Sync]
285+
** Synchronization in Dynamic Rendering
286+
*** xref:Synchronization/Dynamic_Rendering_Sync/01_introduction.adoc[Introduction]
287+
*** xref:Synchronization/Dynamic_Rendering_Sync/02_subpass_replacement.adoc[Subpass Replacement]
288+
*** xref:Synchronization/Dynamic_Rendering_Sync/03_local_read_sync.adoc[Local Read Sync]
289+
** Host Image Copies & Memory Mapped Sync
290+
*** xref:Synchronization/Host_Image_Copies_Memory_Sync/01_introduction.adoc[Introduction]
291+
*** xref:Synchronization/Host_Image_Copies_Memory_Sync/02_cpu_to_image_access.adoc[CPU-to-Image Access]
292+
*** xref:Synchronization/Host_Image_Copies_Memory_Sync/03_visibility_flushes.adoc[Visibility Flushes]
293+
** Debugging with Synchronization Validation
294+
*** xref:Synchronization/Synchronization_Validation/01_introduction.adoc[Introduction]
295+
*** xref:Synchronization/Synchronization_Validation/02_validation_layer.adoc[Validation Layer]
296+
*** xref:Synchronization/Synchronization_Validation/03_interpreting_vuids.adoc[Interpreting VUIDs]
297+
** Profiling, Batching, and Optimization
298+
*** xref:Synchronization/Profiling_Optimization/01_introduction.adoc[Introduction]
299+
*** xref:Synchronization/Profiling_Optimization/02_barrier_batching.adoc[Barrier Batching]
300+
*** xref:Synchronization/Profiling_Optimization/03_visualizing_stalls.adoc[Visualizing Stalls]

attachments/02_validation_layers.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ class HelloTriangleApplication
132132
if (!enableValidationLayers)
133133
return;
134134

135-
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose |
136-
vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
135+
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
137136
vk::DebugUtilsMessageSeverityFlagBitsEXT::eError);
138137
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags(
139138
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);

attachments/03_physical_device_selection.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,10 @@ class HelloTriangleApplication
138138
if (!enableValidationLayers)
139139
return;
140140

141-
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose |
142-
vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
141+
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
143142
vk::DebugUtilsMessageSeverityFlagBitsEXT::eError);
144143
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags(
145-
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
144+
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
146145
vk::DebugUtilsMessengerCreateInfoEXT debugUtilsMessengerCreateInfoEXT{.messageSeverity = severityFlags,
147146
.messageType = messageTypeFlags,
148147
.pfnUserCallback = &debugCallback};
@@ -168,10 +167,12 @@ class HelloTriangleApplication
168167
});
169168

170169
// Check if the physicalDevice supports the required features
171-
auto features =
172-
physicalDevice
173-
.template getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
174-
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
170+
auto features = physicalDevice.template getFeatures2<vk::PhysicalDeviceFeatures2,
171+
vk::PhysicalDeviceVulkan11Features,
172+
vk::PhysicalDeviceVulkan13Features,
173+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
174+
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan11Features>().shaderDrawParameters &&
175+
features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
175176
features.template get<vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>().extendedDynamicState;
176177

177178
// Return true if the physicalDevice meets all the criteria

attachments/04_logical_device.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,10 @@ class HelloTriangleApplication
143143
if (!enableValidationLayers)
144144
return;
145145

146-
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose |
147-
vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
146+
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
148147
vk::DebugUtilsMessageSeverityFlagBitsEXT::eError);
149148
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags(
150-
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
149+
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
151150
vk::DebugUtilsMessengerCreateInfoEXT debugUtilsMessengerCreateInfoEXT{.messageSeverity = severityFlags,
152151
.messageType = messageTypeFlags,
153152
.pfnUserCallback = &debugCallback};
@@ -173,10 +172,12 @@ class HelloTriangleApplication
173172
});
174173

175174
// Check if the physicalDevice supports the required features
176-
auto features =
177-
physicalDevice
178-
.template getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
179-
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
175+
auto features = physicalDevice.template getFeatures2<vk::PhysicalDeviceFeatures2,
176+
vk::PhysicalDeviceVulkan11Features,
177+
vk::PhysicalDeviceVulkan13Features,
178+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
179+
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan11Features>().shaderDrawParameters &&
180+
features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
180181
features.template get<vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>().extendedDynamicState;
181182

182183
// Return true if the physicalDevice meets all the criteria
@@ -206,11 +207,16 @@ class HelloTriangleApplication
206207
auto graphicsIndex = static_cast<uint32_t>(std::distance(queueFamilyProperties.begin(), graphicsQueueFamilyProperty));
207208

208209
// query for Vulkan 1.3 features
209-
vk::StructureChain<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT> featureChain = {
210-
{}, // vk::PhysicalDeviceFeatures2
211-
{.dynamicRendering = true}, // vk::PhysicalDeviceVulkan13Features
212-
{.extendedDynamicState = true} // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
213-
};
210+
vk::StructureChain<vk::PhysicalDeviceFeatures2,
211+
vk::PhysicalDeviceVulkan11Features,
212+
vk::PhysicalDeviceVulkan13Features,
213+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>
214+
featureChain = {
215+
{}, // vk::PhysicalDeviceFeatures2
216+
{.shaderDrawParameters = true}, // vk::PhysicalDeviceVulkan11Features
217+
{.dynamicRendering = true}, // vk::PhysicalDeviceVulkan13Features
218+
{.extendedDynamicState = true} // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
219+
};
214220

215221
// create a Device
216222
float queuePriority = 0.5f;

attachments/05_window_surface.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,10 @@ class HelloTriangleApplication
141141
if (!enableValidationLayers)
142142
return;
143143

144-
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose |
145-
vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
144+
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
146145
vk::DebugUtilsMessageSeverityFlagBitsEXT::eError);
147146
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags(
148-
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
147+
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
149148
vk::DebugUtilsMessengerCreateInfoEXT debugUtilsMessengerCreateInfoEXT{.messageSeverity = severityFlags,
150149
.messageType = messageTypeFlags,
151150
.pfnUserCallback = &debugCallback};
@@ -181,10 +180,12 @@ class HelloTriangleApplication
181180
});
182181

183182
// Check if the physicalDevice supports the required features
184-
auto features =
185-
physicalDevice
186-
.template getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
187-
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
183+
auto features = physicalDevice.template getFeatures2<vk::PhysicalDeviceFeatures2,
184+
vk::PhysicalDeviceVulkan11Features,
185+
vk::PhysicalDeviceVulkan13Features,
186+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
187+
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan11Features>().shaderDrawParameters &&
188+
features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
188189
features.template get<vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>().extendedDynamicState;
189190

190191
// Return true if the physicalDevice meets all the criteria
@@ -224,11 +225,16 @@ class HelloTriangleApplication
224225
}
225226

226227
// query for Vulkan 1.3 features
227-
vk::StructureChain<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT> featureChain = {
228-
{}, // vk::PhysicalDeviceFeatures2
229-
{.dynamicRendering = true}, // vk::PhysicalDeviceVulkan13Features
230-
{.extendedDynamicState = true} // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
231-
};
228+
vk::StructureChain<vk::PhysicalDeviceFeatures2,
229+
vk::PhysicalDeviceVulkan11Features,
230+
vk::PhysicalDeviceVulkan13Features,
231+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>
232+
featureChain = {
233+
{}, // vk::PhysicalDeviceFeatures2
234+
{.shaderDrawParameters = true}, // vk::PhysicalDeviceVulkan11Features
235+
{.dynamicRendering = true}, // vk::PhysicalDeviceVulkan13Features
236+
{.extendedDynamicState = true} // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
237+
};
232238

233239
// create a Device
234240
float queuePriority = 0.5f;

attachments/06_swap_chain_creation.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,10 @@ class HelloTriangleApplication
149149
if (!enableValidationLayers)
150150
return;
151151

152-
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose |
153-
vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
152+
vk::DebugUtilsMessageSeverityFlagsEXT severityFlags(vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
154153
vk::DebugUtilsMessageSeverityFlagBitsEXT::eError);
155154
vk::DebugUtilsMessageTypeFlagsEXT messageTypeFlags(
156-
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
155+
vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance | vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation);
157156
vk::DebugUtilsMessengerCreateInfoEXT debugUtilsMessengerCreateInfoEXT{.messageSeverity = severityFlags,
158157
.messageType = messageTypeFlags,
159158
.pfnUserCallback = &debugCallback};
@@ -189,10 +188,12 @@ class HelloTriangleApplication
189188
});
190189

191190
// Check if the physicalDevice supports the required features
192-
auto features =
193-
physicalDevice
194-
.template getFeatures2<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
195-
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
191+
auto features = physicalDevice.template getFeatures2<vk::PhysicalDeviceFeatures2,
192+
vk::PhysicalDeviceVulkan11Features,
193+
vk::PhysicalDeviceVulkan13Features,
194+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>();
195+
bool supportsRequiredFeatures = features.template get<vk::PhysicalDeviceVulkan11Features>().shaderDrawParameters &&
196+
features.template get<vk::PhysicalDeviceVulkan13Features>().dynamicRendering &&
196197
features.template get<vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>().extendedDynamicState;
197198

198199
// Return true if the physicalDevice meets all the criteria
@@ -232,11 +233,16 @@ class HelloTriangleApplication
232233
}
233234

234235
// query for Vulkan 1.3 features
235-
vk::StructureChain<vk::PhysicalDeviceFeatures2, vk::PhysicalDeviceVulkan13Features, vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT> featureChain = {
236-
{}, // vk::PhysicalDeviceFeatures2
237-
{.dynamicRendering = true}, // vk::PhysicalDeviceVulkan13Features
238-
{.extendedDynamicState = true} // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
239-
};
236+
vk::StructureChain<vk::PhysicalDeviceFeatures2,
237+
vk::PhysicalDeviceVulkan11Features,
238+
vk::PhysicalDeviceVulkan13Features,
239+
vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT>
240+
featureChain = {
241+
{}, // vk::PhysicalDeviceFeatures2
242+
{.shaderDrawParameters = true}, // vk::PhysicalDeviceVulkan11Features
243+
{.dynamicRendering = true}, // vk::PhysicalDeviceVulkan13Features
244+
{.extendedDynamicState = true} // vk::PhysicalDeviceExtendedDynamicStateFeaturesEXT
245+
};
240246

241247
// create a Device
242248
float queuePriority = 0.5f;

0 commit comments

Comments
 (0)