mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
glx do not use multisample visual config for front or pixmap
There is no guaranty that glXGetFBConfigs will return fbconfig ordered with non msaa config first. This patch make sure that non msaa config get choose. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 93b7b4c850dd928bf21ee168a95641a8d631f713)
This commit is contained in:
parent
98e3b57d0d
commit
1f84b5c9b4
@ -776,13 +776,20 @@ glx_attributes_from_framebuffer_config (CoglDisplay *display,
|
||||
attributes[i++] = GLX_STENCIL_SIZE;
|
||||
attributes[i++] = config->need_stencil ? 1: GLX_DONT_CARE;
|
||||
|
||||
if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 4 &&
|
||||
config->samples_per_pixel)
|
||||
if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 4)
|
||||
{
|
||||
attributes[i++] = GLX_SAMPLE_BUFFERS;
|
||||
attributes[i++] = 1;
|
||||
attributes[i++] = GLX_SAMPLES;
|
||||
attributes[i++] = config->samples_per_pixel;
|
||||
if (config->samples_per_pixel)
|
||||
{
|
||||
attributes[i++] = GLX_SAMPLE_BUFFERS;
|
||||
attributes[i++] = 1;
|
||||
attributes[i++] = GLX_SAMPLES;
|
||||
attributes[i++] = config->samples_per_pixel;
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes[i++] = GLX_SAMPLE_BUFFERS;
|
||||
attributes[i++] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
attributes[i++] = None;
|
||||
@ -2024,6 +2031,16 @@ get_fbconfig_for_depth (CoglContext *context,
|
||||
if (value != depth && (value - alpha) != depth)
|
||||
continue;
|
||||
|
||||
if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 4)
|
||||
{
|
||||
glx_renderer->glXGetFBConfigAttrib (dpy,
|
||||
fbconfigs[i],
|
||||
GLX_SAMPLES,
|
||||
&value);
|
||||
if (value > 1)
|
||||
continue;
|
||||
}
|
||||
|
||||
value = 0;
|
||||
if (depth == 32)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user