diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-29 00:15:25 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-11-29 00:15:25 +0100 |
commit | 75cc501d521842cd4e6d2dd4dcef8acb02bd250f (patch) | |
tree | 5466385dca90c89b1bcf595e99eead0bdfea172f | |
parent | renderer_opengl: Move static definitions to anonymous namespace (diff) | |
download | yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.tar yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.tar.gz yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.tar.bz2 yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.tar.lz yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.tar.xz yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.tar.zst yuzu-75cc501d521842cd4e6d2dd4dcef8acb02bd250f.zip |
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 82b426223..23b60dbf4 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -97,40 +97,45 @@ std::array<GLfloat, 3 * 2> MakeOrthographicMatrix(float width, float height) { } const char* GetSource(GLenum source) { -#define RET(s) \ - case GL_DEBUG_SOURCE_##s: \ - return #s switch (source) { - RET(API); - RET(WINDOW_SYSTEM); - RET(SHADER_COMPILER); - RET(THIRD_PARTY); - RET(APPLICATION); - RET(OTHER); + case GL_DEBUG_SOURCE_API: + return "API"; + case GL_DEBUG_SOURCE_WINDOW_SYSTEM: + return "WINDOW_SYSTEM"; + case GL_DEBUG_SOURCE_SHADER_COMPILER: + return "SHADER_COMPILER"; + case GL_DEBUG_SOURCE_THIRD_PARTY: + return "THIRD_PARTY"; + case GL_DEBUG_SOURCE_APPLICATION: + return "APPLICATION"; + case GL_DEBUG_SOURCE_OTHER: + return "OTHER"; default: UNREACHABLE(); return "Unknown source"; } -#undef RET } const char* GetType(GLenum type) { -#define RET(t) \ - case GL_DEBUG_TYPE_##t: \ - return #t switch (type) { - RET(ERROR); - RET(DEPRECATED_BEHAVIOR); - RET(UNDEFINED_BEHAVIOR); - RET(PORTABILITY); - RET(PERFORMANCE); - RET(OTHER); - RET(MARKER); + case GL_DEBUG_TYPE_ERROR: + return "ERROR"; + case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: + return "DEPRECATED_BEHAVIOR"; + case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: + return "UNDEFINED_BEHAVIOR"; + case GL_DEBUG_TYPE_PORTABILITY: + return "PORTABILITY"; + case GL_DEBUG_TYPE_PERFORMANCE: + return "PERFORMANCE"; + case GL_DEBUG_TYPE_OTHER: + return "OTHER"; + case GL_DEBUG_TYPE_MARKER: + return "MARKER"; default: UNREACHABLE(); return "Unknown type"; } -#undef RET } void APIENTRY DebugHandler(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, |