Vulkan: Enable vk loader logging

Enable VK loader debug messages when running blender_debug_gpu_*
scripts.

Allows easier debugging for users not familiar with using terminal.
It won't log anything when using OpenGL.

Vulkan loading logging can be big (1000 lines) but gives a lot of insight
how vulkan and related applications are configured on the user system
Sadly it does contains actual paths but think it is OK as the user is still
responsible for uploading it in the tracker.

An example of a log has been attached.

See #135327.

Pull Request: https://projects.blender.org/blender/blender/pulls/135399
This commit is contained in:
Jeroen Bakker
2025-03-04 07:28:49 +01:00
parent c30c19ad64
commit 192d328f16
2 changed files with 2 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ setlocal
set PYTHONPATH=
set DEBUGLOGS="%temp%\blender\debug_logs"
set VK_LOADER_DEBUG=all
mkdir "%DEBUGLOGS%" > NUL 2>&1
"%~dp0\blender" --debug --debug-gpu --debug-cycles --python-expr "import bpy; bpy.context.preferences.filepaths.temporary_directory=r'%DEBUGLOGS%'; bpy.ops.wm.sysinfo(filepath=r'%DEBUGLOGS%\blender_system_info.txt')" > "%DEBUGLOGS%\blender_debug_output.txt" 2>&1 < %0

View File

@@ -14,6 +14,7 @@ setlocal
set PYTHONPATH=
set DEBUGLOGS="%temp%\blender\debug_logs"
set VK_LOADER_DEBUG=all
mkdir "%DEBUGLOGS%" > NUL 2>&1
"%~dp0\blender" --debug --debug-gpu --debug-gpu-force-workarounds --python-expr "import bpy; bpy.context.preferences.filepaths.temporary_directory=r'%DEBUGLOGS%'; bpy.ops.wm.sysinfo(filepath=r'%DEBUGLOGS%\blender_system_info.txt')" > "%DEBUGLOGS%\blender_debug_output.txt" 2>&1 < %0