diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-15 00:53:11 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-08-15 02:43:02 +0200 |
commit | dc876fd63a55ef7ec28a989d7da8ade4da508a89 (patch) | |
tree | 007f5307c9c98219b08b78203601629f0c20a7e8 /src | |
parent | Merge pull request #1055 from lioncash/init (diff) | |
download | yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.tar yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.tar.gz yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.tar.bz2 yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.tar.lz yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.tar.xz yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.tar.zst yuzu-dc876fd63a55ef7ec28a989d7da8ade4da508a89.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 83ea0cfc0..8f719fdd8 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h @@ -24,16 +24,25 @@ using Maxwell = Tegra::Engines::Maxwell3D::Regs; inline GLenum VertexType(Maxwell::VertexAttribute attrib) { switch (attrib.type) { + case Maxwell::VertexAttribute::Type::UnsignedInt: case Maxwell::VertexAttribute::Type::UnsignedNorm: { switch (attrib.size) { case Maxwell::VertexAttribute::Size::Size_8: case Maxwell::VertexAttribute::Size::Size_8_8: + case Maxwell::VertexAttribute::Size::Size_8_8_8: case Maxwell::VertexAttribute::Size::Size_8_8_8_8: return GL_UNSIGNED_BYTE; + case Maxwell::VertexAttribute::Size::Size_16: case Maxwell::VertexAttribute::Size::Size_16_16: + case Maxwell::VertexAttribute::Size::Size_16_16_16: case Maxwell::VertexAttribute::Size::Size_16_16_16_16: return GL_UNSIGNED_SHORT; + case Maxwell::VertexAttribute::Size::Size_32: + case Maxwell::VertexAttribute::Size::Size_32_32: + case Maxwell::VertexAttribute::Size::Size_32_32_32: + case Maxwell::VertexAttribute::Size::Size_32_32_32_32: + return GL_UNSIGNED_INT; case Maxwell::VertexAttribute::Size::Size_10_10_10_2: return GL_UNSIGNED_INT_2_10_10_10_REV; } @@ -43,16 +52,25 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { return {}; } + case Maxwell::VertexAttribute::Type::SignedInt: case Maxwell::VertexAttribute::Type::SignedNorm: { switch (attrib.size) { - case Maxwell::VertexAttribute::Size::Size_32_32_32: - return GL_INT; + case Maxwell::VertexAttribute::Size::Size_8: case Maxwell::VertexAttribute::Size::Size_8_8: + case Maxwell::VertexAttribute::Size::Size_8_8_8: case Maxwell::VertexAttribute::Size::Size_8_8_8_8: return GL_BYTE; + case Maxwell::VertexAttribute::Size::Size_16: case Maxwell::VertexAttribute::Size::Size_16_16: + case Maxwell::VertexAttribute::Size::Size_16_16_16: + case Maxwell::VertexAttribute::Size::Size_16_16_16_16: return GL_SHORT; + case Maxwell::VertexAttribute::Size::Size_32: + case Maxwell::VertexAttribute::Size::Size_32_32: + case Maxwell::VertexAttribute::Size::Size_32_32_32: + case Maxwell::VertexAttribute::Size::Size_32_32_32_32: + return GL_INT; case Maxwell::VertexAttribute::Size::Size_10_10_10_2: return GL_INT_2_10_10_10_REV; } @@ -62,9 +80,6 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) { return {}; } - case Maxwell::VertexAttribute::Type::UnsignedInt: - return GL_UNSIGNED_INT; - case Maxwell::VertexAttribute::Type::Float: return GL_FLOAT; } |