mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Properly support MSAA and SSAA as separate features(+GLES)
SSAA relies on MSAA being active to work. We only supports 4x SSAA while in fact you can enable SSAA at any MSAA level. I even managed to run 64xMSAA + SSAA on my Quadro which made some pretty sleek looking games. They were very cinematic though. With this, it properly fixes up SSAA and MSAA support in GLES as well. Before they were broken when stereo rendering was enabled. Now in GLES they can properly support MSAA and also stereo rendering with MSAA enabled(with proper extensions).
This commit is contained in:
@ -0,0 +1,11 @@
|
||||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "VideoBackends/OGL/GLExtensions/gl_common.h"
|
||||
|
||||
typedef void (*PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (*PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
|
||||
extern PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample;
|
||||
extern PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample;
|
@ -718,6 +718,10 @@ PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample;
|
||||
PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv;
|
||||
PFNGLSAMPLEMASKIPROC glSampleMaski;
|
||||
|
||||
// ARB_texture_storage_multisample
|
||||
PFNGLTEXSTORAGE2DMULTISAMPLEPROC glTexStorage2DMultisample;
|
||||
PFNGLTEXSTORAGE3DMULTISAMPLEPROC glTexStorage3DMultisample;
|
||||
|
||||
// ARB_ES2_compatibility
|
||||
PFNGLCLEARDEPTHFPROC glClearDepthf;
|
||||
PFNGLDEPTHRANGEFPROC glDepthRangef;
|
||||
@ -1183,6 +1187,11 @@ const GLFunc gl_function_array[] =
|
||||
GLFUNC_REQUIRES(glGetMultisamplefv, "GL_ARB_texture_multisample"),
|
||||
GLFUNC_REQUIRES(glSampleMaski, "GL_ARB_texture_multisample"),
|
||||
|
||||
// ARB_texture_storage_multisample
|
||||
GLFUNC_REQUIRES(glTexStorage2DMultisample, "GL_ARB_texture_storage_multisample"),
|
||||
GLFUNC_REQUIRES(glTexStorage3DMultisample, "GL_ARB_texture_storage_multisample"),
|
||||
GLFUNC_SUFFIX(glTexStorage3DMultisample, OES, "GL_OES_texture_storage_multisample_2d_array !VERSION_GLES_3_2"),
|
||||
|
||||
// ARB_ES2_compatibility
|
||||
GLFUNC_REQUIRES(glClearDepthf, "GL_ARB_ES2_compatibility"),
|
||||
GLFUNC_REQUIRES(glDepthRangef, "GL_ARB_ES2_compatibility"),
|
||||
@ -1231,6 +1240,9 @@ const GLFunc gl_function_array[] =
|
||||
// ARB_sample_shading
|
||||
GLFUNC_SUFFIX(glMinSampleShading, ARB, "GL_ARB_sample_shading"),
|
||||
|
||||
// OES_sample_shading
|
||||
GLFUNC_SUFFIX(glMinSampleShading, OES, "GL_OES_sample_shading !VERSION_GLES_3_2"),
|
||||
|
||||
// ARB_debug_output
|
||||
GLFUNC_REQUIRES(glDebugMessageCallbackARB, "GL_ARB_debug_output"),
|
||||
GLFUNC_REQUIRES(glDebugMessageControlARB, "GL_ARB_debug_output"),
|
||||
@ -1298,6 +1310,8 @@ const GLFunc gl_function_array[] =
|
||||
|
||||
// EXT_texture_buffer
|
||||
GLFUNC_SUFFIX(glTexBuffer, EXT, "GL_EXT_texture_buffer !GL_OES_texture_buffer !VERSION_GLES_3_2"),
|
||||
// GLES 3.1
|
||||
GLFUNC_REQUIRES(glTexStorage2DMultisample, "VERSION_GLES_3_1"),
|
||||
|
||||
// EXT_blend_func_extended
|
||||
GLFUNC_SUFFIX(glBindFragDataLocationIndexed, EXT, "GL_EXT_blend_func_extended"),
|
||||
@ -1317,6 +1331,7 @@ const GLFunc gl_function_array[] =
|
||||
GLFUNC_REQUIRES(glPushDebugGroup, "VERSION_GLES_3_2"),
|
||||
GLFUNC_REQUIRES(glCopyImageSubData, "VERSION_GLES_3_2"),
|
||||
GLFUNC_REQUIRES(glTexBuffer, "VERSION_GLES_3_2"),
|
||||
GLFUNC_REQUIRES(glTexStorage3DMultisample, "VERSION_GLES_3_2"),
|
||||
|
||||
// gl_1_1
|
||||
// OpenGL 1.1 is at the end due to a bug in Android's EGL stack.
|
||||
@ -1702,6 +1717,14 @@ namespace GLExtensions
|
||||
m_extension_list[it] = true;
|
||||
}
|
||||
case 310:
|
||||
{
|
||||
std::string gles310exts[] = {
|
||||
"GL_ARB_texture_storage_multisample",
|
||||
"VERSION_GLES_3_1",
|
||||
};
|
||||
for (auto it : gles310exts)
|
||||
m_extension_list[it] = true;
|
||||
}
|
||||
case 300:
|
||||
{
|
||||
std::string gles3exts[] = {
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_sampler_objects.h"
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_sync.h"
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_texture_multisample.h"
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_texture_storage_multisample.h"
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_uniform_buffer_object.h"
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_vertex_array_object.h"
|
||||
#include "VideoBackends/OGL/GLExtensions/ARB_viewport_array.h"
|
||||
|
Reference in New Issue
Block a user