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>2019-03-24 01:47:12 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-24 01:47:12 +0300
commit53cd37d5102bc68da686e742b73aff023a4880b4 (patch)
treec5de4c361c3b575144645b32fe4605950e20568e /source/blender/gpu
parented9af18c762cf55947f51f3dae939a76fdb19d9a (diff)
GPU: State: Disable polygon smooth and line smooth when running --debug-gpu
This might prove usefull when debugging some driver perf issues.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_state.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_state.c b/source/blender/gpu/intern/gpu_state.c
index b77fc047473..765bbd5e751 100644
--- a/source/blender/gpu/intern/gpu_state.c
+++ b/source/blender/gpu/intern/gpu_state.c
@@ -20,6 +20,8 @@
#include "DNA_userdef_types.h"
+#include "BKE_global.h"
+
#include "GPU_glew.h"
#include "GPU_state.h"
#include "GPU_extensions.h"
@@ -92,7 +94,7 @@ bool GPU_depth_test_enabled()
void GPU_line_smooth(bool enable)
{
- if (enable) {
+ if (enable && ((G.debug & G_DEBUG_GPU) == 0)) {
glEnable(GL_LINE_SMOOTH);
}
else {
@@ -116,7 +118,7 @@ void GPU_point_size(float size)
void GPU_polygon_smooth(bool enable)
{
- if (enable) {
+ if (enable && ((G.debug & G_DEBUG_GPU) == 0)) {
glEnable(GL_POLYGON_SMOOTH);
}
else {