GPU: State: Disable polygon smooth and line smooth when running --debug-gpu

This might prove usefull when debugging some driver perf issues.
This commit is contained in:
Clément Foucault 2019-03-23 23:47:12 +01:00
parent ed9af18c76
commit 53cd37d510
1 changed files with 4 additions and 2 deletions

View File

@ -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 {