Utilities: Add batch files to help launch Blender with different GPU backends
With Vulkan now having general feature parity with OpenGL, but with
some stability issues, it has become more important to offer ways for
users to quickly launch Blender with the OpenGL or Vulkan backend
in case Blender is unable to open with one of them.
This commit adds three new batch files to help with this:
- `blender_factory_startup_vulkan.cmd`
- Launches Blender with factory settings, but with Vulkan enabled.
Useful for helping test if a Vulkan crash at startup is related to
a addon.
- `blender_startup_opengl.cmd`
- Simply launches Blender with the OpenGL backend. It does not change
any other settings. Useful in case a user has complex user
preferences, enabled Vulkan for testing, and now Blender crashes on
startup. Now they want to switch back to OpenGL and they don't want
to lose their complex user preferences by using
`blender_factory_startup.cmd`
- `blender_startup_vulkan.cmd`
- Simply launches Blender with the Vulkan backend. It does not change
any other settings. Useful for people that encounter #127835 after
a Windows update. This issue can be worked around by using Vulkan.
But if you are experiencing the issue and are on the OpenGL
backend, you can't use the Blender interface and so you can't
easily switch to the Vulkan backend without the command line
or a script like this.
Pull Request: https://projects.blender.org/blender/blender/pulls/142169
This commit is contained in:
20
release/windows/batch/blender_factory_startup_vulkan.cmd
Normal file
20
release/windows/batch/blender_factory_startup_vulkan.cmd
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
echo Starting blender with factory settings, log files will be created
|
||||
echo in your temp folder, windows explorer will open after you close blender
|
||||
echo to help you find them.
|
||||
echo.
|
||||
echo If you report a bug on https://projects.blender.org you can attach these files
|
||||
echo by dragging them into the text area of your bug report, please include both
|
||||
echo blender_debug_output.txt and blender_system_info.txt in your report.
|
||||
echo.
|
||||
pause
|
||||
echo.
|
||||
echo Starting blender and waiting for it to exit....
|
||||
setlocal
|
||||
|
||||
set PYTHONPATH=
|
||||
set DEBUGLOGS="%temp%\blender\debug_logs"
|
||||
mkdir "%DEBUGLOGS%" > NUL 2>&1
|
||||
|
||||
"%~dp0\blender" --factory-startup --gpu-backend vulkan --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
|
||||
explorer "%DEBUGLOGS%"
|
||||
4
release/windows/batch/blender_startup_opengl.cmd
Normal file
4
release/windows/batch/blender_startup_opengl.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
echo Starting Blender with the OpenGL backend
|
||||
|
||||
"%~dp0\blender" --gpu-backend opengl
|
||||
4
release/windows/batch/blender_startup_vulkan.cmd
Normal file
4
release/windows/batch/blender_startup_vulkan.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
echo Starting Blender with the Vulkan backend
|
||||
|
||||
"%~dp0\blender" --gpu-backend vulkan
|
||||
@@ -1566,6 +1566,9 @@ elseif(WIN32)
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_gpu_glitchworkaround.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_debug_log.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_factory_startup.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_factory_startup_vulkan.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_startup_opengl.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_startup_vulkan.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/blender_oculus.cmd
|
||||
${CMAKE_SOURCE_DIR}/release/windows/batch/oculus.json
|
||||
DESTINATION ${TARGETDIR_EXE}
|
||||
|
||||
Reference in New Issue
Block a user