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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-13 21:15:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-02-14 16:00:48 +0300
commit7028a11db9ec3d29282739f7ad9a0343711ebc24 (patch)
tree29433d298eaed8f4f3e26a695e8c97f9f00ef952 /source/blender/gpu/intern
parent8049ad21b07d94ebedb2baec321735d5022befe4 (diff)
GPU: don't use multisample for entire window, only for offscreen 3D viewport.
Now that the new 3D viewport draws to a multisample offscreen buffer, there is no good reason anymore to create an entire multisample window and pay the performance/memory cost for other regions that don't need it. GL_MULTISAMPLE now only gets enabled for offscreen buffers, so we don't need to check for it throughout the UI code anymore. Differential Revision: https://developer.blender.org/D3062
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_draw.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index fae181138ce..6440e6ebfe3 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -2095,7 +2095,7 @@ int GPU_scene_object_lights(ViewLayer *view_layer, float viewmat[4][4], int orth
return count;
}
-static void gpu_multisample(bool enable)
+static void gpu_disable_multisample()
{
#ifdef __linux__
/* changing multisample from the default (enabled) causes problems on some
@@ -2111,16 +2111,10 @@ static void gpu_multisample(bool enable)
}
if (toggle_ok) {
- if (enable)
- glEnable(GL_MULTISAMPLE);
- else
- glDisable(GL_MULTISAMPLE);
+ glDisable(GL_MULTISAMPLE);
}
#else
- if (enable)
- glEnable(GL_MULTISAMPLE);
- else
- glDisable(GL_MULTISAMPLE);
+ glDisable(GL_MULTISAMPLE);
#endif
}
@@ -2152,7 +2146,7 @@ void GPU_state_init(void)
glCullFace(GL_BACK);
glDisable(GL_CULL_FACE);
- gpu_multisample(false);
+ gpu_disable_multisample();
}
void GPU_enable_program_point_size(void)