[Bf-blender-cvs] [53cd37d5102] master: GPU: State: Disable polygon smooth and line smooth when running --debug-gpu
Clément Foucault
noreply at git.blender.org
Sat Mar 23 23:54:29 CET 2019
Commit: 53cd37d5102bc68da686e742b73aff023a4880b4
Author: Clément Foucault
Date: Sat Mar 23 23:47:12 2019 +0100
Branches: master
https://developer.blender.org/rB53cd37d5102bc68da686e742b73aff023a4880b4
GPU: State: Disable polygon smooth and line smooth when running --debug-gpu
This might prove usefull when debugging some driver perf issues.
===================================================================
M source/blender/gpu/intern/gpu_state.c
===================================================================
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 {
More information about the Bf-blender-cvs
mailing list