diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-12-03 01:39:43 +0100 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-12-03 01:39:43 +0100 |
| commit | 40920b3823ee7dab04a9c964fab9ea20c4ddbf43 (patch) | |
| tree | c5027d145d4abdf7e308a49c00e0b59426326ec3 /Source/Core/VideoBackends/OGL/FramebufferManager.cpp | |
| parent | a888df14a835190126edb84be0993758a2a9bb55 (diff) | |
OGL: Don't use texture arrays for MSAA.
This solves a performance regression on AMD cards.
We don't currently support stereoscopy for MSAA anyway.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/FramebufferManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/FramebufferManager.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp index f24172e7e0..4ea9262625 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp @@ -99,17 +99,17 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms } else { - m_textureType = GL_TEXTURE_2D_MULTISAMPLE_ARRAY; + m_textureType = GL_TEXTURE_2D_MULTISAMPLE; GLenum resolvedType = GL_TEXTURE_2D_ARRAY; glBindTexture(m_textureType, m_efbColor); - glTexImage3DMultisample(m_textureType, m_msaaSamples, GL_RGBA, m_targetWidth, m_targetHeight, m_EFBLayers, false); + glTexImage2DMultisample(m_textureType, m_msaaSamples, GL_RGBA, m_targetWidth, m_targetHeight, false); glBindTexture(m_textureType, m_efbDepth); - glTexImage3DMultisample(m_textureType, m_msaaSamples, GL_DEPTH_COMPONENT24, m_targetWidth, m_targetHeight, m_EFBLayers, false); + glTexImage2DMultisample(m_textureType, m_msaaSamples, GL_DEPTH_COMPONENT24, m_targetWidth, m_targetHeight, false); glBindTexture(m_textureType, m_efbColorSwap); - glTexImage3DMultisample(m_textureType, m_msaaSamples, GL_RGBA, m_targetWidth, m_targetHeight, m_EFBLayers, false); + glTexImage2DMultisample(m_textureType, m_msaaSamples, GL_RGBA, m_targetWidth, m_targetHeight, false); glBindTexture(m_textureType, 0); // Although we are able to access the multisampled texture directly, we don't do it everywhere. @@ -181,9 +181,9 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms // This will lead to sample shading, but it's the only way to not loose // the values of each sample. sampler = - "SAMPLER_BINDING(9) uniform sampler2DMSArray samp9;\n" + "SAMPLER_BINDING(9) uniform sampler2DMS samp9;\n" "vec4 sampleEFB(ivec2 pos) {\n" - " return texelFetch(samp9, ivec3(pos, 0), gl_SampleID);\n" + " return texelFetch(samp9, pos, gl_SampleID);\n" "}\n"; } else @@ -192,11 +192,11 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms std::stringstream samples; samples << m_msaaSamples; sampler = - "SAMPLER_BINDING(9) uniform sampler2DMSArray samp9;\n" + "SAMPLER_BINDING(9) uniform sampler2DMS samp9;\n" "vec4 sampleEFB(ivec2 pos) {\n" " vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n" " for(int i=0; i<" + samples.str() + "; i++)\n" - " color += texelFetch(samp9, ivec3(pos, 0), i);\n" + " color += texelFetch(samp9, pos, i);\n" " return color / " + samples.str() + ";\n" "}\n"; } |
