From 3a4c238d5095cfd4302ee8e6cae57f12bda36403 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 19 Sep 2023 14:22:32 +0200 Subject: [PATCH] Command Line: Remove Disabling SSBO Blender has the option to disable SSBO support. This was accessible as a command line option `--debug-gpu-disable-ssbo`. Blender 4.0 has a hard requirement for OpenGL 4.3 which includes SSBO support by default. This PR removes the command line option as it makes no sense to have it anymore. Related to #112224 Pull Request: https://projects.blender.org/blender/blender/pulls/112571 --- source/blender/blenkernel/BKE_global.h | 19 +++++++++---------- source/blender/gpu/opengl/gl_backend.cc | 7 ------- source/creator/creator_args.cc | 9 --------- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 19022df014f..ddd6cc7a052 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -203,17 +203,16 @@ enum { * assigned to ID datablocks */ 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_SIMDATA = (1 << 15), /* sim debug data display */ - G_DEBUG_GPU = (1 << 16), /* gpu debug */ - 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_DISABLE_SSBO = (1 << 19), /* force disabling usage of SSBO's */ - G_DEBUG_GPU_RENDERDOC = (1 << 20), /* Enable RenderDoc integration. */ - G_DEBUG_XR = (1 << 21), /* XR/OpenXR messages */ - G_DEBUG_XR_TIME = (1 << 22), /* XR/OpenXR timing messages */ + G_DEBUG_SIMDATA = (1 << 15), /* sim debug data display */ + G_DEBUG_GPU = (1 << 16), /* gpu debug */ + G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...). */ + G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 18), /* force gpu workarounds bypassing detections. */ + G_DEBUG_GPU_RENDERDOC = (1 << 19), /* Enable RenderDoc integration. */ + G_DEBUG_XR = (1 << 20), /* XR/OpenXR messages */ + G_DEBUG_XR_TIME = (1 << 21), /* XR/OpenXR timing messages */ - G_DEBUG_GHOST = (1 << 23), /* Debug GHOST module. */ - G_DEBUG_WINTAB = (1 << 24), /* Debug Wintab. */ + G_DEBUG_GHOST = (1 << 22), /* Debug GHOST module. */ + G_DEBUG_WINTAB = (1 << 23), /* Debug Wintab. */ }; #define G_DEBUG_ALL \ diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 86866ca16ed..fbd55f1d381 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -457,13 +457,6 @@ static void detect_workarounds() /* Minimum Per-Vertex stride is 1 byte for OpenGL. */ 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 /** Internal capabilities. */ diff --git a/source/creator/creator_args.cc b/source/creator/creator_args.cc index 08be2ac96c5..456ad54c9db 100644 --- a/source/creator/creator_args.cc +++ b/source/creator/creator_args.cc @@ -663,7 +663,6 @@ static void print_help(bArgs *ba, bool all) BLI_args_print_arg_doc(ba, "--debug-wintab"); 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-disable-ssbo"); if (defs.with_renderdoc) { BLI_args_print_arg_doc(ba, "--debug-gpu-renderdoc"); } @@ -1113,9 +1112,6 @@ 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[] = "\n\t" "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 /*argc*/, const char ** /*argv*/, void *data) { @@ -2480,11 +2476,6 @@ void main_args_setup(bContext *C, bArgs *ba, bool all) "--debug-gpu-force-workarounds", CB_EX(arg_handle_debug_mode_generic_set, gpu_force_workarounds), (void *)G_DEBUG_GPU_FORCE_WORKAROUNDS); - BLI_args_add(ba, - nullptr, - "--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, nullptr, "--debug-exit-on-error", CB(arg_handle_debug_exit_on_error), nullptr); BLI_args_add(ba, nullptr, "--verbose", CB(arg_handle_verbosity_set), nullptr);