@@ -70,9 +70,29 @@ bitflags::bitflags! {
70
70
///
71
71
/// When `Self::from_env()` is used takes value from `WGPU_DEBUG` environment variable.
72
72
const DEBUG = 1 << 0 ;
73
- /// Enable validation, if possible.
73
+ /// Enable validation in the backend API , if possible:
74
74
///
75
- /// When `Self::from_env()` is used takes value from `WGPU_VALIDATION` environment variable.
75
+ /// - On the Direct3D `dx12` backend, this calls [`ID3D12Debug::EnableDebugLayer`][dx12].
76
+ ///
77
+ /// - On the Vulkan backend, this enables the [Vulkan Validation Layer][vvl].
78
+ ///
79
+ /// - On the `gles` backend driving Windows OpenGL, this enables [debug
80
+ /// output][gl:do], effectively calling `glEnable(GL_DEBUG_OUTPUT)`.
81
+ ///
82
+ /// - On non-Windows `gles` backends, this calls
83
+ /// [`eglDebugMessageControlKHR`][gl:dm] to enable all debugging messages.
84
+ /// If the GLES implementation is ANGLE running on Vulkan, this also
85
+ /// enables the Vulkan validation layers by setting
86
+ /// [`EGL_PLATFORM_ANGLE_DEBUG_LAYERS_ENABLED`][gl:av].
87
+ ///
88
+ /// When `Self::from_env()` is used, this bit is set if the `WGPU_VALIDATION`
89
+ /// environment variable has any value but "0".
90
+ ///
91
+ /// [dx12]: https://learn.microsoft.com/en-us/windows/win32/api/d3d12sdklayers/nf-d3d12sdklayers-id3d12debug-enabledebuglayer
92
+ /// [vvl]: https://github.com/KhronosGroup/Vulkan-ValidationLayers
93
+ /// [gl:dm]: https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_debug.txt
94
+ /// [gl:do]: https://www.khronos.org/opengl/wiki/Debug_Output
95
+ /// [gl:av]: https://chromium.googlesource.com/angle/angle/+/HEAD/extensions/EGL_ANGLE_platform_angle.txt
76
96
const VALIDATION = 1 << 1 ;
77
97
/// Don't pass labels to wgpu-hal.
78
98
///
0 commit comments