summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Morph2020-06-28 02:48:14 -0400
committerGravatar Morph2020-06-28 02:51:13 -0400
commit78d80d99a07893b79cecefbb613bf326c8e783eb (patch)
tree61d480004f19fcd779817583339566e9d9a0ee03 /src
parentMerge pull request #3396 from FernandoS27/prometheus-1 (diff)
downloadyuzu-78d80d99a07893b79cecefbb613bf326c8e783eb.tar.gz
yuzu-78d80d99a07893b79cecefbb613bf326c8e783eb.tar.xz
yuzu-78d80d99a07893b79cecefbb613bf326c8e783eb.zip
maxwell_to_gl: Add 32 bit component sizes to (un)signed scaled formats
Add 32 bit component sizes to (un)signed scaled formats and group (un)signed normalized, scaled, and integer formats together.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h
index 35e329240..8f3871e90 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -26,8 +26,9 @@ using Maxwell = Tegra::Engines::Maxwell3D::Regs;
26 26
27inline GLenum VertexType(Maxwell::VertexAttribute attrib) { 27inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
28 switch (attrib.type) { 28 switch (attrib.type) {
29 case Maxwell::VertexAttribute::Type::UnsignedInt:
30 case Maxwell::VertexAttribute::Type::UnsignedNorm: 29 case Maxwell::VertexAttribute::Type::UnsignedNorm:
30 case Maxwell::VertexAttribute::Type::UnsignedScaled:
31 case Maxwell::VertexAttribute::Type::UnsignedInt:
31 switch (attrib.size) { 32 switch (attrib.size) {
32 case Maxwell::VertexAttribute::Size::Size_8: 33 case Maxwell::VertexAttribute::Size::Size_8:
33 case Maxwell::VertexAttribute::Size::Size_8_8: 34 case Maxwell::VertexAttribute::Size::Size_8_8:
@@ -48,8 +49,9 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
48 return GL_UNSIGNED_INT_2_10_10_10_REV; 49 return GL_UNSIGNED_INT_2_10_10_10_REV;
49 } 50 }
50 break; 51 break;
51 case Maxwell::VertexAttribute::Type::SignedInt:
52 case Maxwell::VertexAttribute::Type::SignedNorm: 52 case Maxwell::VertexAttribute::Type::SignedNorm:
53 case Maxwell::VertexAttribute::Type::SignedScaled:
54 case Maxwell::VertexAttribute::Type::SignedInt:
53 switch (attrib.size) { 55 switch (attrib.size) {
54 case Maxwell::VertexAttribute::Size::Size_8: 56 case Maxwell::VertexAttribute::Size::Size_8:
55 case Maxwell::VertexAttribute::Size::Size_8_8: 57 case Maxwell::VertexAttribute::Size::Size_8_8:
@@ -84,34 +86,6 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
84 return GL_FLOAT; 86 return GL_FLOAT;
85 } 87 }
86 break; 88 break;
87 case Maxwell::VertexAttribute::Type::UnsignedScaled:
88 switch (attrib.size) {
89 case Maxwell::VertexAttribute::Size::Size_8:
90 case Maxwell::VertexAttribute::Size::Size_8_8:
91 case Maxwell::VertexAttribute::Size::Size_8_8_8:
92 case Maxwell::VertexAttribute::Size::Size_8_8_8_8:
93 return GL_UNSIGNED_BYTE;
94 case Maxwell::VertexAttribute::Size::Size_16:
95 case Maxwell::VertexAttribute::Size::Size_16_16:
96 case Maxwell::VertexAttribute::Size::Size_16_16_16:
97 case Maxwell::VertexAttribute::Size::Size_16_16_16_16:
98 return GL_UNSIGNED_SHORT;
99 }
100 break;
101 case Maxwell::VertexAttribute::Type::SignedScaled:
102 switch (attrib.size) {
103 case Maxwell::VertexAttribute::Size::Size_8:
104 case Maxwell::VertexAttribute::Size::Size_8_8:
105 case Maxwell::VertexAttribute::Size::Size_8_8_8:
106 case Maxwell::VertexAttribute::Size::Size_8_8_8_8:
107 return GL_BYTE;
108 case Maxwell::VertexAttribute::Size::Size_16:
109 case Maxwell::VertexAttribute::Size::Size_16_16:
110 case Maxwell::VertexAttribute::Size::Size_16_16_16:
111 case Maxwell::VertexAttribute::Size::Size_16_16_16_16:
112 return GL_SHORT;
113 }
114 break;
115 } 89 }
116 UNIMPLEMENTED_MSG("Unimplemented vertex type={} and size={}", attrib.TypeString(), 90 UNIMPLEMENTED_MSG("Unimplemented vertex type={} and size={}", attrib.TypeString(),
117 attrib.SizeString()); 91 attrib.SizeString());