OGL: Use GL_OES_texture_storage_multisample_2d_array when supported

See https://bugs.dolphin-emu.org/issues/13198
This commit is contained in:
Pokechu22
2023-03-05 22:03:26 -08:00
parent 3f143d1bc9
commit 8b0bd31e72
4 changed files with 36 additions and 3 deletions

View File

@ -130,12 +130,18 @@ OGLTexture::OGLTexture(const TextureConfig& tex_config, std::string_view name)
GLenum gl_internal_format = GetGLInternalFormatForTextureFormat(m_config.format, true);
if (tex_config.IsMultisampled())
{
if (g_ogl_config.bSupportsTextureStorage)
ASSERT(g_ogl_config.bSupportsMSAA);
if (g_ogl_config.SupportedMultisampleTexStorage != MultisampleTexStorageType::TexStorageNone)
{
glTexStorage3DMultisample(target, tex_config.samples, gl_internal_format, m_config.width,
m_config.height, m_config.layers, GL_FALSE);
}
else
{
ASSERT(!g_ogl_config.bIsES);
glTexImage3DMultisample(target, tex_config.samples, gl_internal_format, m_config.width,
m_config.height, m_config.layers, GL_FALSE);
}
}
else if (g_ogl_config.bSupportsTextureStorage)
{