diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-17 17:34:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-17 17:34:22 +0200 |
commit | 0905dc1ff44ba87d73cee5620ea12a34959da50e (patch) | |
tree | 664653514751da1c4c92d186b06bd3e4616ae498 /src/video_core/renderer_opengl/maxwell_to_gl.h | |
parent | Merge pull request #338 from bunnei/unrequire-shared-font (diff) | |
parent | gl_rendering: Use NGLOG* for changed code. (diff) | |
download | yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.tar yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.tar.gz yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.tar.bz2 yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.tar.lz yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.tar.xz yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.tar.zst yuzu-0905dc1ff44ba87d73cee5620ea12a34959da50e.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/maxwell_to_gl.h')
-rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 7909dcfc3..632d14b78 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -31,7 +31,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { return GL_UNSIGNED_BYTE; } - LOG_CRITICAL(Render_OpenGL, "Unimplemented vertex size=%s", attrib.SizeString().c_str()); + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString()); UNREACHABLE(); return {}; } @@ -40,7 +40,21 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { return GL_FLOAT; } - LOG_CRITICAL(Render_OpenGL, "Unimplemented vertex type=%s", attrib.TypeString().c_str()); + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented vertex type={}", attrib.TypeString()); + UNREACHABLE(); + return {}; +} + +inline GLenum IndexFormat(Maxwell::IndexFormat index_format) { + switch (index_format) { + case Maxwell::IndexFormat::UnsignedByte: + return GL_UNSIGNED_BYTE; + case Maxwell::IndexFormat::UnsignedShort: + return GL_UNSIGNED_SHORT; + case Maxwell::IndexFormat::UnsignedInt: + return GL_UNSIGNED_INT; + } + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented index_format={}", static_cast<u32>(index_format)); UNREACHABLE(); return {}; } @@ -52,7 +66,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { case Maxwell::PrimitiveTopology::TriangleStrip: return GL_TRIANGLE_STRIP; } - LOG_CRITICAL(Render_OpenGL, "Unimplemented primitive topology=%d", topology); + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented topology={}", static_cast<u32>(topology)); UNREACHABLE(); return {}; } @@ -64,8 +78,8 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) { case Tegra::Texture::TextureFilter::Nearest: return GL_NEAREST; } - LOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode=%u", - static_cast<u32>(filter_mode)); + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode={}", + static_cast<u32>(filter_mode)); UNREACHABLE(); return {}; } @@ -75,7 +89,8 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) { case Tegra::Texture::WrapMode::ClampToEdge: return GL_CLAMP_TO_EDGE; } - LOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode=%u", static_cast<u32>(wrap_mode)); + NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture wrap mode={}", + static_cast<u32>(wrap_mode)); UNREACHABLE(); return {}; } |