diff options
Diffstat (limited to 'Source/Core/VideoBackends/OGL/Render.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 5b046f71dc..3337bbc9eb 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -78,10 +78,6 @@ enum MultisampleMode { MULTISAMPLE_2X, MULTISAMPLE_4X, MULTISAMPLE_8X, - MULTISAMPLE_CSAA_8X, - MULTISAMPLE_CSAA_8XQ, - MULTISAMPLE_CSAA_16X, - MULTISAMPLE_CSAA_16XQ, MULTISAMPLE_SSAA_4X, }; @@ -99,7 +95,6 @@ static RasterFont* s_pfont = nullptr; // 1 for no MSAA. Use s_MSAASamples > 1 to check for MSAA. static int s_MSAASamples = 1; -static int s_MSAACoverageSamples = 0; static int s_LastMultisampleMode = 0; static u32 s_blendMode; @@ -131,15 +126,11 @@ int GetNumMSAASamples(int MSAAMode) break; case MULTISAMPLE_4X: - case MULTISAMPLE_CSAA_8X: - case MULTISAMPLE_CSAA_16X: case MULTISAMPLE_SSAA_4X: samples = 4; break; case MULTISAMPLE_8X: - case MULTISAMPLE_CSAA_8XQ: - case MULTISAMPLE_CSAA_16XQ: samples = 8; break; @@ -154,31 +145,6 @@ int GetNumMSAASamples(int MSAAMode) return g_ogl_config.max_samples; } -int GetNumMSAACoverageSamples(int MSAAMode) -{ - int samples; - switch (g_ActiveConfig.iMultisampleMode) - { - case MULTISAMPLE_CSAA_8X: - case MULTISAMPLE_CSAA_8XQ: - samples = 8; - break; - - case MULTISAMPLE_CSAA_16X: - case MULTISAMPLE_CSAA_16XQ: - samples = 16; - break; - - default: - samples = 0; - } - if (g_ogl_config.bSupportCoverageMSAA || samples == 0) return samples; - - // TODO: move this to InitBackendInfo - OSD::AddMessage("CSAA Anti Aliasing isn't supported by your GPU.", 10000); - return 0; -} - void ApplySSAASettings() { // GLES3 doesn't support SSAA if (GLInterface->GetMode() == GLInterfaceMode::MODE_OPENGL) @@ -489,7 +455,7 @@ Renderer::Renderer() g_ogl_config.bSupportsGLSync = GLExtensions::Supports("GL_ARB_sync"); g_ogl_config.bSupportsGLBaseVertex = GLExtensions::Supports("GL_ARB_draw_elements_base_vertex"); g_ogl_config.bSupportsGLBufferStorage = GLExtensions::Supports("GL_ARB_buffer_storage"); - g_ogl_config.bSupportCoverageMSAA = GLExtensions::Supports("GL_NV_framebuffer_multisample_coverage"); + g_ogl_config.bSupportsMSAA = GLExtensions::Supports("GL_ARB_texture_multisample"); g_ogl_config.bSupportSampleShading = GLExtensions::Supports("GL_ARB_sample_shading"); g_ogl_config.bSupportOGL31 = GLExtensions::Version() >= 310; g_ogl_config.bSupportViewportFloat = GLExtensions::Supports("GL_ARB_viewport_array"); @@ -565,7 +531,7 @@ Renderer::Renderer() } glGetIntegerv(GL_MAX_SAMPLES, &g_ogl_config.max_samples); - if (g_ogl_config.max_samples < 1) + if (g_ogl_config.max_samples < 1 || !g_ogl_config.bSupportsMSAA) g_ogl_config.max_samples = 1; UpdateActiveConfig(); @@ -584,13 +550,12 @@ Renderer::Renderer() g_ogl_config.bSupportsGLBaseVertex ? "" : "BaseVertex ", g_ogl_config.bSupportsGLBufferStorage ? "" : "BufferStorage ", g_ogl_config.bSupportsGLSync ? "" : "Sync ", - g_ogl_config.bSupportCoverageMSAA ? "" : "CSAA ", + g_ogl_config.bSupportsMSAA ? "" : "MSAA ", g_ogl_config.bSupportSampleShading ? "" : "SSAA " ); s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode; s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode); - s_MSAACoverageSamples = GetNumMSAACoverageSamples(s_LastMultisampleMode); ApplySSAASettings(); // Decide framebuffer size @@ -681,7 +646,7 @@ void Renderer::Init() { // Initialize the FramebufferManager g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height, - s_MSAASamples, s_MSAACoverageSamples); + s_MSAASamples); s_pfont = new RasterFont(); @@ -1609,12 +1574,11 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl { s_LastMultisampleMode = g_ActiveConfig.iMultisampleMode; s_MSAASamples = GetNumMSAASamples(s_LastMultisampleMode); - s_MSAACoverageSamples = GetNumMSAACoverageSamples(s_LastMultisampleMode); ApplySSAASettings(); delete g_framebuffer_manager; g_framebuffer_manager = new FramebufferManager(s_target_width, s_target_height, - s_MSAASamples, s_MSAACoverageSamples); + s_MSAASamples); } } |
