Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
6a131c2
Add sample demonstrating VK_EXT_layer_settings usage
gpx1000 Oct 16, 2025
9097014
- Update README with GitHub repository link for sample
gpx1000 Oct 19, 2025
54f808c
Add local debug messenger and UI overlay for validation messages in L…
gpx1000 Oct 19, 2025
7fb2566
Adjust code formatting in LayerSettingsSample for improved readability
gpx1000 Oct 19, 2025
0856f47
Merge branch 'main' into VK_EXT_layer_settings
gpx1000 Jan 1, 2026
d46c09d
Add interactive validation scenarios with toggleable UI and message c…
gpx1000 Jan 1, 2026
04c9d5c
Update copyright year to 2026
gpx1000 Jan 1, 2026
7bd25b2
Refactor scenario state tracking from array to unordered_map and mode…
gpx1000 Jan 8, 2026
c229456
Fix indentation to use tabs consistently throughout layer_settings files
gpx1000 Jan 8, 2026
50dda0f
Replace std::format with fmt::format and refactor loop variable naming
gpx1000 Jan 8, 2026
fc29f84
Merge branch 'main' into VK_EXT_layer_settings
gpx1000 Jun 1, 2026
b4a2ab3
Add note requested by comments.
gpx1000 Jun 1, 2026
8169a00
Add instance extension and layer setting registration to VulkanSample…
gpx1000 Jun 1, 2026
c4bd157
Fix whitespace alignment in vulkan_sample.h and correct method name i…
gpx1000 Jun 1, 2026
4d13e7d
Merge branch 'refs/heads/main' into VK_EXT_layer_settings
gpx1000 Jun 15, 2026
6da3598
Revert the CRLF to Unix-style line endings that caused the whole file…
gpx1000 Jun 15, 2026
603fed7
Merge branch 'main' into VK_EXT_layer_settings
gpx1000 Jun 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
////
- Copyright (c) 2023-2025, Holochip Inc
- Copyright (c) 2023-2025, Sascha Willems
- Copyright (c) 2023-2026, Holochip Inc
- Copyright (c) 2023-2026, Sascha Willems
- Copyright (c) 2025, Arm Limited and Contributors
-
- SPDX-License-Identifier: Apache-2.0
Expand Down
3 changes: 2 additions & 1 deletion samples/extensions/README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
////
- Copyright (c) 2021-2025, The Khronos Group
- Copyright (c) 2025, Arm Limited and Contributors
- Copyright (c) 2021-2026, The Khronos Group
-
- SPDX-License-Identifier: Apache-2.0
-
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/layer_settings/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2025, Holochip Inc.
# Copyright (c) 2025-2026, Holochip Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
29 changes: 27 additions & 2 deletions samples/extensions/layer_settings/README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////
- Copyright (c) 2025, Holochip Inc
- Copyright (c) 2026, Holochip Inc
-
- SPDX-License-Identifier: Apache-2.0
-
Expand Down Expand Up @@ -38,7 +38,32 @@ VK_EXT_layer_settings supersedes the older `VK_EXT_validation_features` and `VK_
- Adds settings for the Khronos validation layer before the Vulkan instance is created:
- Enables Best Practices checks.
- Enables `debugPrintfEXT` support (so shader `debugPrintf` messages are emitted via validation).
Comment thread
asuessenbach marked this conversation as resolved.
Outdated
- Runs a minimal frame loop that presents without validation errors (uses a small per‑frame command buffer that transitions the swapchain image to `PRESENT`).
- Provides an interactive UI with toggleable validation scenarios that demonstrate common mistakes:
- *Wrong Buffer Flags*: Creates a buffer with `TRANSFER_DST` usage but binds it as a vertex buffer (missing `VERTEX_BUFFER_BIT`).
- *Suboptimal Transitions*: Performs image layout transitions to `GENERAL` instead of more optimal layouts like `COLOR_ATTACHMENT_OPTIMAL`.
- *Many Small Allocations*: Creates numerous small memory allocations (512 bytes each) instead of suballocating from larger blocks.
- Displays validation messages in real-time within the application UI, showing warning counts per scenario and total statistics.
- Works on all platforms without requiring terminal access to see validation output.

== How to use this sample

When you run the sample, you'll see an interactive UI with checkboxes for each validation scenario:

1. *Enable scenarios individually*: Check the boxes to activate specific Best Practices violations.
2. *Observe validation messages*: Watch the "Recent Validation Messages" section populate with warnings as scenarios trigger.
3. *Review statistics*: See warning counts per scenario and total counts at the bottom.
4. *Learn from mistakes*: Each scenario demonstrates a real-world mistake that Best Practices validation catches.

=== What each scenario teaches

*Wrong Buffer Flags*::
Demonstrates the importance of declaring correct usage flags at buffer creation time. Using a buffer without the appropriate usage bit (e.g., `VERTEX_BUFFER_BIT`) can lead to undefined behavior or performance issues on some implementations.

*Suboptimal Transitions*::
Shows why choosing the right image layout matters. Transitioning to `GENERAL` layout is legal but often suboptimal—specific layouts like `COLOR_ATTACHMENT_OPTIMAL` or `SHADER_READ_ONLY_OPTIMAL` enable better performance.

*Many Small Allocations*::
Demonstrates why suballocation is important. Creating hundreds of tiny memory allocations wastes resources and can hit driver limits. Use a memory allocator library (like VMA) or implement suballocation.

== When to use it vs. alternatives
- Prefer VK_EXT_layer_settings whenever you need to configure validation from within your app (development builds, samples, tools).
Expand Down
Loading
Loading