You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,10 @@ For those who don't want to build from source, there are few ways to get working
16
16
- For Android, each SDK tag will have binaries to download (example: [vulkan-sdk-1.3.280.0 tag](https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/tag/vulkan-sdk-1.3.280.0))
17
17
- Every change applied to the main branch runs through GitHub action and will [produce artifacts](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions?query=branch%3Amain) of the latest commit.
18
18
19
+
## Adjusting settings
20
+
21
+
See [settings documentation](./docs/settings.md).
22
+
19
23
## Community Assistance
20
24
21
25
Before submitting an issue to the validation layers or reaching out to the developers it may be prudent to reach out to the community first.
Copy file name to clipboardExpand all lines: docs/debug_printf.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,13 @@ The Debug Printf settings are managed by configuring the Validation Layer. These
25
25
26
26
Debug Printf settings can also be managed using the [Vulkan Configurator](https://vulkan.lunarg.com/doc/sdk/latest/windows/vkconfig.html) included with the Vulkan SDK.
27
27
28
+
For those who "just need to quick use it" there is also a `set VK_LAYER_PRINTF_ONLY_PRESET=1` environment variable that will turn on DebugPrintf and turn off all of the other validation logic.
29
+
28
30
### Settings
29
31
30
32
> All settings are found in Vulkan Configurator (`VkConfig`)
33
+
>
34
+
> Even if you use `VK_LAYER_PRINTF_ONLY_PRESET` you need to set those settings yourself as desired
31
35
32
36
There are currently 3 environment variables that are used for settings in Debug Printf
33
37
@@ -46,7 +50,7 @@ There are currently 3 environment variables that are used for settings in Debug
46
50
To use Debug Printf in GLSL shaders, you need to enable the GL_EXT_debug_printf extension.
47
51
Then add debugPrintfEXT calls at the locations in your shader where you want to print
48
52
messages and/or values
49
-
Here is a very simple example:
53
+
Here is a very simple example ([Try Online](https://godbolt.org/z/MnYGj8azM)):
50
54
```
51
55
#version 450
52
56
#extension GL_EXT_debug_printf : enable
@@ -64,7 +68,7 @@ in a vertex shader and a triangle was drawn, it would be printed 3 times.
64
68
65
69
## Using Debug Printf in HLSL Shaders
66
70
67
-
In HLSL, debug printf can be invoked as follows:
71
+
In HLSL, debug printf can be invoked as follows ([Try Online](https://godbolt.org/z/3ThznsdK8)):
68
72
```
69
73
void main() {
70
74
float myfloat = 3.1415;
@@ -182,8 +186,6 @@ Would print **"Here's a vector of floats 1.20, 2.20, 3.20, 4.20"**
182
186
Would print **"Unsigned long as decimal 2305843009213693953 and as hex 0x2000000000000001"**
183
187
184
188
### Limitations
185
-
* Debug Printf cannot be used at the same time as GPU Assisted Validation.
0 commit comments