summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/OGLTexture.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2023-03-05 22:03:26 -0800
committerPokechu22 <Pokechu022@gmail.com>2023-04-08 15:32:27 -0700
commit8b0bd31e72beaacff3be2dbd9cb44208fc4b0442 (patch)
tree12a22dc312667a92c39890f23e37a1a38afdde35 /Source/Core/VideoBackends/OGL/OGLTexture.cpp
parent3f143d1bc979421afadcee9debe7988c887a1970 (diff)
OGL: Use GL_OES_texture_storage_multisample_2d_array when supported
See https://bugs.dolphin-emu.org/issues/13198
Diffstat (limited to 'Source/Core/VideoBackends/OGL/OGLTexture.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/OGLTexture.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp
index ad0e32bb39..f2b0081d86 100644
--- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp
@@ -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)
{