Add a fallback for intel on linux.
When workaround with alpha_channel=true failed, then fallback to the path with disabled srgb framebuffer.
This commit is contained in:
parent
6794670510
commit
c1e17f0593
@ -238,13 +238,19 @@ void CentralVideoSettings::init()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if visual is sRGB-capable
|
// Check if visual is sRGB-capable
|
||||||
if (GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB_WORKAROUND2) &&
|
if (!GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB) &&
|
||||||
|
GraphicsRestrictions::isDisabled(GraphicsRestrictions::GR_FRAMEBUFFER_SRGB_WORKAROUND2) &&
|
||||||
m_glsl == true)
|
m_glsl == true)
|
||||||
{
|
{
|
||||||
GLint param = GL_SRGB;
|
GLint param = GL_SRGB;
|
||||||
glGetFramebufferAttachmentParameteriv(GL_DRAW_FRAMEBUFFER, GL_BACK_LEFT,
|
glGetFramebufferAttachmentParameteriv(GL_DRAW_FRAMEBUFFER, GL_BACK_LEFT,
|
||||||
GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, ¶m);
|
GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, ¶m);
|
||||||
m_need_srgb_visual_workaround = (param != GL_SRGB);
|
m_need_srgb_visual_workaround = (param != GL_SRGB);
|
||||||
|
|
||||||
|
if (m_need_srgb_visual_workaround)
|
||||||
|
{
|
||||||
|
hasSRGBFramebuffer = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (m_glsl == true)
|
if (m_glsl == true)
|
||||||
|
@ -490,8 +490,7 @@ void IrrDriver::initDevice()
|
|||||||
// Though we are able to force to use the proper format on mesa side by
|
// Though we are able to force to use the proper format on mesa side by
|
||||||
// setting WithAlphaChannel parameter.
|
// setting WithAlphaChannel parameter.
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
else if (CVS->isARBSRGBFramebufferUsable() &&
|
else if (CVS->needsSRGBCapableVisualWorkaround())
|
||||||
CVS->needsSRGBCapableVisualWorkaround())
|
|
||||||
{
|
{
|
||||||
Log::warn("irr_driver", "Created visual is not sRGB-capable. "
|
Log::warn("irr_driver", "Created visual is not sRGB-capable. "
|
||||||
"Re-creating device to workaround the issue.");
|
"Re-creating device to workaround the issue.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user