Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-12-05 05:05:39 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-05 05:05:39 +0300
commit1fa527bfa3a6f78e9f00a21649f396d21344420e (patch)
tree577a4939c43c81fb018faec26b2d12ff16ecc0d7
parent354b1c162a03617a8d73d9954be4079ba0c31077 (diff)
BKE: Add "--debug-gpu-force-workarounds" to force gpu workarounds
This is nice to test workarounds on other configs that may benefits from the existing workarounds.
-rw-r--r--source/blender/blenkernel/BKE_global.h1
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c6
-rw-r--r--source/creator/creator_args.c2
3 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 9a6560238ea..b2991679775 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -143,6 +143,7 @@ enum {
G_DEBUG_GPU = (1 << 16), /* gpu debug */
G_DEBUG_IO = (1 << 17), /* IO Debugging (for Collada, ...)*/
G_DEBUG_GPU_SHADERS = (1 << 18), /* GLSL shaders */
+ G_DEBUG_GPU_FORCE_WORKAROUNDS = (1 << 19), /* force gpu workarounds bypassing detections. */
};
#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM | G_DEBUG_JOBS | \
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 92d91bd440d..2309c6dc009 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -343,6 +343,12 @@ void gpu_extensions_init(void)
gpu_detect_mip_render_workaround();
+ if (G.debug & G_DEBUG_GPU_FORCE_WORKAROUNDS) {
+ GG.mip_render_workaround = true;
+ GG.depth_blitting_workaround = true;
+ GG.unused_fb_slot_workaround = true;
+ }
+
/* df/dy calculation factors, those are dependent on driver */
if ((strstr(vendor, "ATI") && strstr(version, "3.3.10750"))) {
GG.dfdyfactors[0] = 1.0;
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index 12d8cd1d5b8..5b976515dd8 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -1933,6 +1933,8 @@ void main_args_setup(bContext *C, bArgs *ba)
CB_EX(arg_handle_debug_mode_generic_set, gpumem), (void *)G_DEBUG_GPU_MEM);
BLI_argsAdd(ba, 1, NULL, "--debug-gpu-shaders",
CB_EX(arg_handle_debug_mode_generic_set, gpumem), (void *)G_DEBUG_GPU_SHADERS);
+ BLI_argsAdd(ba, 1, NULL, "--debug-gpu-force-workarounds",
+ CB_EX(arg_handle_debug_mode_generic_set, gpumem), (void *)G_DEBUG_GPU_FORCE_WORKAROUNDS);
BLI_argsAdd(ba, 1, NULL, "--verbose", CB(arg_handle_verbosity_set), NULL);