1
0
Fork 0
forked from suyu/suyu

gl_rendering: Use NGLOG* for changed code.

This commit is contained in:
bunnei 2018-04-16 21:23:28 -04:00
parent 1a1af3fda3
commit 77bdc49343
2 changed files with 11 additions and 10 deletions

View file

@ -151,9 +151,9 @@ void RasterizerOpenGL::SetupVertexArray(u8* array_ptr, GLintptr buffer_offset) {
// to avoid OpenGL errors. // to avoid OpenGL errors.
for (unsigned index = 0; index < 16; ++index) { for (unsigned index = 0; index < 16; ++index) {
auto& attrib = regs.vertex_attrib_format[index]; auto& attrib = regs.vertex_attrib_format[index];
LOG_DEBUG(HW_GPU, "vertex attrib %d, count=%d, size=%s, type=%s, offset=%d, normalize=%d", NGLOG_DEBUG(HW_GPU, "vertex attrib {}, count={}, size={}, type={}, offset={}, normalize={}",
index, attrib.ComponentCount(), attrib.SizeString().c_str(), index, attrib.ComponentCount(), attrib.SizeString(), attrib.TypeString(),
attrib.TypeString().c_str(), attrib.offset.Value(), attrib.IsNormalized()); attrib.offset.Value(), attrib.IsNormalized());
glVertexAttribPointer(index, attrib.ComponentCount(), MaxwellToGL::VertexType(attrib), glVertexAttribPointer(index, attrib.ComponentCount(), MaxwellToGL::VertexType(attrib),
attrib.IsNormalized() ? GL_TRUE : GL_FALSE, vertex_array.stride, attrib.IsNormalized() ? GL_TRUE : GL_FALSE, vertex_array.stride,

View file

@ -31,7 +31,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
return GL_UNSIGNED_BYTE; 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(); UNREACHABLE();
return {}; return {};
} }
@ -40,7 +40,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
return GL_FLOAT; 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(); UNREACHABLE();
return {}; return {};
} }
@ -54,7 +54,7 @@ inline GLenum IndexFormat(Maxwell::IndexFormat index_format) {
case Maxwell::IndexFormat::UnsignedInt: case Maxwell::IndexFormat::UnsignedInt:
return GL_UNSIGNED_INT; return GL_UNSIGNED_INT;
} }
LOG_CRITICAL(Render_OpenGL, "Unimplemented index_format=%d", index_format); NGLOG_CRITICAL(Render_OpenGL, "Unimplemented index_format={}", static_cast<u32>(index_format));
UNREACHABLE(); UNREACHABLE();
return {}; return {};
} }
@ -66,7 +66,7 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) {
case Maxwell::PrimitiveTopology::TriangleStrip: case Maxwell::PrimitiveTopology::TriangleStrip:
return GL_TRIANGLE_STRIP; return GL_TRIANGLE_STRIP;
} }
LOG_CRITICAL(Render_OpenGL, "Unimplemented topology=%d", topology); NGLOG_CRITICAL(Render_OpenGL, "Unimplemented topology={}", static_cast<u32>(topology));
UNREACHABLE(); UNREACHABLE();
return {}; return {};
} }
@ -78,7 +78,7 @@ inline GLenum TextureFilterMode(Tegra::Texture::TextureFilter filter_mode) {
case Tegra::Texture::TextureFilter::Nearest: case Tegra::Texture::TextureFilter::Nearest:
return GL_NEAREST; return GL_NEAREST;
} }
LOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode=%u", NGLOG_CRITICAL(Render_OpenGL, "Unimplemented texture filter mode={}",
static_cast<u32>(filter_mode)); static_cast<u32>(filter_mode));
UNREACHABLE(); UNREACHABLE();
return {}; return {};
@ -89,7 +89,8 @@ inline GLenum WrapMode(Tegra::Texture::WrapMode wrap_mode) {
case Tegra::Texture::WrapMode::ClampToEdge: case Tegra::Texture::WrapMode::ClampToEdge:
return GL_CLAMP_TO_EDGE; 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(); UNREACHABLE();
return {}; return {};
} }