maxwell_to_gl: Rename VertexType() to VertexFormat()

This commit is contained in:
Morph 2020-06-29 11:48:38 -04:00
parent 4a35df337b
commit 10eca7f651
2 changed files with 5 additions and 4 deletions

View file

@ -213,9 +213,10 @@ void RasterizerOpenGL::SetupVertexFormat() {
if (attrib.type == Maxwell::VertexAttribute::Type::SignedInt || if (attrib.type == Maxwell::VertexAttribute::Type::SignedInt ||
attrib.type == Maxwell::VertexAttribute::Type::UnsignedInt) { attrib.type == Maxwell::VertexAttribute::Type::UnsignedInt) {
glVertexAttribIFormat(gl_index, attrib.ComponentCount(), glVertexAttribIFormat(gl_index, attrib.ComponentCount(),
MaxwellToGL::VertexType(attrib), attrib.offset); MaxwellToGL::VertexFormat(attrib), attrib.offset);
} else { } else {
glVertexAttribFormat(gl_index, attrib.ComponentCount(), MaxwellToGL::VertexType(attrib), glVertexAttribFormat(gl_index, attrib.ComponentCount(),
MaxwellToGL::VertexFormat(attrib),
attrib.IsNormalized() ? GL_TRUE : GL_FALSE, attrib.offset); attrib.IsNormalized() ? GL_TRUE : GL_FALSE, attrib.offset);
} }
glVertexAttribBinding(gl_index, attrib.buffer); glVertexAttribBinding(gl_index, attrib.buffer);

View file

@ -24,7 +24,7 @@ namespace MaxwellToGL {
using Maxwell = Tegra::Engines::Maxwell3D::Regs; using Maxwell = Tegra::Engines::Maxwell3D::Regs;
inline GLenum VertexType(Maxwell::VertexAttribute attrib) { inline GLenum VertexFormat(Maxwell::VertexAttribute attrib) {
switch (attrib.type) { switch (attrib.type) {
case Maxwell::VertexAttribute::Type::UnsignedNorm: case Maxwell::VertexAttribute::Type::UnsignedNorm:
case Maxwell::VertexAttribute::Type::UnsignedScaled: case Maxwell::VertexAttribute::Type::UnsignedScaled:
@ -87,7 +87,7 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
} }
break; break;
} }
UNIMPLEMENTED_MSG("Unimplemented vertex type={} and size={}", attrib.TypeString(), UNIMPLEMENTED_MSG("Unimplemented vertex format of type={} and size={}", attrib.TypeString(),
attrib.SizeString()); attrib.SizeString());
return {}; return {};
} }