GPU: Disable SSBO support from commandline.
In heavy scenes containing many hairs/curves and volumetrics using SSBO can overwrite the binding information of the volumetric resolve shader. This has been detected during project Heist and is only reproducable on NVIDIA platform. This patch adds an debug option to disable SSBOs from the command line to replace the --debug-gpu-force-workarounds that has been used as a workaround on the render farm. Reason is that force workarounds will also add other limitations as well (number of texture binds for example)
This commit is contained in:
@@ -189,15 +189,16 @@ enum {
|
|||||||
* assigned to ID datablocks */
|
* assigned to ID datablocks */
|
||||||
G_DEBUG_DEPSGRAPH = (G_DEBUG_DEPSGRAPH_BUILD | G_DEBUG_DEPSGRAPH_EVAL | G_DEBUG_DEPSGRAPH_TAG |
|
G_DEBUG_DEPSGRAPH = (G_DEBUG_DEPSGRAPH_BUILD | G_DEBUG_DEPSGRAPH_EVAL | G_DEBUG_DEPSGRAPH_TAG |
|
||||||
G_DEBUG_DEPSGRAPH_TIME | G_DEBUG_DEPSGRAPH_UUID),
|
G_DEBUG_DEPSGRAPH_TIME | G_DEBUG_DEPSGRAPH_UUID),
|
||||||
G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */
|
G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */
|
||||||
G_DEBUG_GPU = (1 << 16), /* gpu debug */
|
G_DEBUG_GPU = (1 << 16), /* gpu debug */
|
||||||
G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */
|
G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */
|
||||||
G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */
|
G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */
|
||||||
G_DEBUG_XR = (1 << 19), /* XR/OpenXR messages */
|
G_DEBUG_GPU_FORCE_DISABLE_SSBO = (1 << 19), /* force disabling usage of SSBO's */
|
||||||
G_DEBUG_XR_TIME = (1 << 20), /* XR/OpenXR timing messages */
|
G_DEBUG_XR = (1 << 20), /* XR/OpenXR messages */
|
||||||
|
G_DEBUG_XR_TIME = (1 << 21), /* XR/OpenXR timing messages */
|
||||||
|
|
||||||
G_DEBUG_GHOST = (1 << 21), /* Debug GHOST module. */
|
G_DEBUG_GHOST = (1 << 22), /* Debug GHOST module. */
|
||||||
G_DEBUG_WINTAB = (1 << 22), /* Debug Wintab. */
|
G_DEBUG_WINTAB = (1 << 23), /* Debug Wintab. */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define G_DEBUG_ALL \
|
#define G_DEBUG_ALL \
|
||||||
|
|||||||
@@ -431,6 +431,12 @@ static void detect_workarounds()
|
|||||||
/* Minimum Per-Vertex stride is 1 byte for OpenGL. */
|
/* Minimum Per-Vertex stride is 1 byte for OpenGL. */
|
||||||
GCaps.minimum_per_vertex_stride = 1;
|
GCaps.minimum_per_vertex_stride = 1;
|
||||||
|
|
||||||
|
/* Force disable per feature. */
|
||||||
|
if (G.debug & G_DEBUG_GPU_FORCE_DISABLE_SSBO) {
|
||||||
|
printf("\n");
|
||||||
|
printf("GL: Force disabling SSBO support from commandline arguments.\n");
|
||||||
|
GCaps.shader_storage_buffer_objects_support = false;
|
||||||
|
}
|
||||||
} // namespace blender::gpu
|
} // namespace blender::gpu
|
||||||
|
|
||||||
/** Internal capabilities. */
|
/** Internal capabilities. */
|
||||||
|
|||||||
@@ -579,6 +579,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
|
|||||||
BLI_args_print_arg_doc(ba, "--debug-wintab");
|
BLI_args_print_arg_doc(ba, "--debug-wintab");
|
||||||
BLI_args_print_arg_doc(ba, "--debug-gpu");
|
BLI_args_print_arg_doc(ba, "--debug-gpu");
|
||||||
BLI_args_print_arg_doc(ba, "--debug-gpu-force-workarounds");
|
BLI_args_print_arg_doc(ba, "--debug-gpu-force-workarounds");
|
||||||
|
BLI_args_print_arg_doc(ba, "--debug-gpu-disable-ssbo");
|
||||||
BLI_args_print_arg_doc(ba, "--debug-wm");
|
BLI_args_print_arg_doc(ba, "--debug-wm");
|
||||||
# ifdef WITH_XR_OPENXR
|
# ifdef WITH_XR_OPENXR
|
||||||
BLI_args_print_arg_doc(ba, "--debug-xr");
|
BLI_args_print_arg_doc(ba, "--debug-xr");
|
||||||
@@ -990,6 +991,9 @@ static const char arg_handle_debug_mode_generic_set_doc_depsgraph_uuid[] =
|
|||||||
static const char arg_handle_debug_mode_generic_set_doc_gpu_force_workarounds[] =
|
static const char arg_handle_debug_mode_generic_set_doc_gpu_force_workarounds[] =
|
||||||
"\n\t"
|
"\n\t"
|
||||||
"Enable workarounds for typical GPU issues and disable all GPU extensions.";
|
"Enable workarounds for typical GPU issues and disable all GPU extensions.";
|
||||||
|
static const char arg_handle_debug_mode_generic_set_doc_gpu_disable_ssbo[] =
|
||||||
|
"\n\t"
|
||||||
|
"Disable usage of shader storage buffer objects.";
|
||||||
|
|
||||||
static int arg_handle_debug_mode_generic_set(int UNUSED(argc),
|
static int arg_handle_debug_mode_generic_set(int UNUSED(argc),
|
||||||
const char **UNUSED(argv),
|
const char **UNUSED(argv),
|
||||||
@@ -2212,6 +2216,11 @@ void main_args_setup(bContext *C, bArgs *ba)
|
|||||||
"--debug-gpu-force-workarounds",
|
"--debug-gpu-force-workarounds",
|
||||||
CB_EX(arg_handle_debug_mode_generic_set, gpu_force_workarounds),
|
CB_EX(arg_handle_debug_mode_generic_set, gpu_force_workarounds),
|
||||||
(void *)G_DEBUG_GPU_FORCE_WORKAROUNDS);
|
(void *)G_DEBUG_GPU_FORCE_WORKAROUNDS);
|
||||||
|
BLI_args_add(ba,
|
||||||
|
NULL,
|
||||||
|
"--debug-gpu-disable-ssbo",
|
||||||
|
CB_EX(arg_handle_debug_mode_generic_set, gpu_disable_ssbo),
|
||||||
|
(void *)G_DEBUG_GPU_FORCE_DISABLE_SSBO);
|
||||||
BLI_args_add(ba, NULL, "--debug-exit-on-error", CB(arg_handle_debug_exit_on_error), NULL);
|
BLI_args_add(ba, NULL, "--debug-exit-on-error", CB(arg_handle_debug_exit_on_error), NULL);
|
||||||
|
|
||||||
BLI_args_add(ba, NULL, "--verbose", CB(arg_handle_verbosity_set), NULL);
|
BLI_args_add(ba, NULL, "--verbose", CB(arg_handle_verbosity_set), NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user