summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video_core/renderer_opengl/maxwell_to_gl.h24
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp14
-rw-r--r--src/video_core/renderer_vulkan/vk_shader_decompiler.cpp6
3 files changed, 40 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h
index 7ed505628..d3dea3659 100644
--- a/src/video_core/renderer_opengl/maxwell_to_gl.h
+++ b/src/video_core/renderer_opengl/maxwell_to_gl.h
@@ -92,8 +92,32 @@ inline GLenum VertexType(Maxwell::VertexAttribute attrib) {
92 } 92 }
93 case Maxwell::VertexAttribute::Type::UnsignedScaled: 93 case Maxwell::VertexAttribute::Type::UnsignedScaled:
94 switch (attrib.size) { 94 switch (attrib.size) {
95 case Maxwell::VertexAttribute::Size::Size_8:
95 case Maxwell::VertexAttribute::Size::Size_8_8: 96 case Maxwell::VertexAttribute::Size::Size_8_8:
97 case Maxwell::VertexAttribute::Size::Size_8_8_8:
98 case Maxwell::VertexAttribute::Size::Size_8_8_8_8:
96 return GL_UNSIGNED_BYTE; 99 return GL_UNSIGNED_BYTE;
100 case Maxwell::VertexAttribute::Size::Size_16:
101 case Maxwell::VertexAttribute::Size::Size_16_16:
102 case Maxwell::VertexAttribute::Size::Size_16_16_16:
103 case Maxwell::VertexAttribute::Size::Size_16_16_16_16:
104 return GL_UNSIGNED_SHORT;
105 default:
106 LOG_ERROR(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString());
107 return {};
108 }
109 case Maxwell::VertexAttribute::Type::SignedScaled:
110 switch (attrib.size) {
111 case Maxwell::VertexAttribute::Size::Size_8:
112 case Maxwell::VertexAttribute::Size::Size_8_8:
113 case Maxwell::VertexAttribute::Size::Size_8_8_8:
114 case Maxwell::VertexAttribute::Size::Size_8_8_8_8:
115 return GL_BYTE;
116 case Maxwell::VertexAttribute::Size::Size_16:
117 case Maxwell::VertexAttribute::Size::Size_16_16:
118 case Maxwell::VertexAttribute::Size::Size_16_16_16:
119 case Maxwell::VertexAttribute::Size::Size_16_16_16_16:
120 return GL_SHORT;
97 default: 121 default:
98 LOG_ERROR(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString()); 122 LOG_ERROR(Render_OpenGL, "Unimplemented vertex size={}", attrib.SizeString());
99 return {}; 123 return {};
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index 5403c3ab7..f26746dc6 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -370,8 +370,22 @@ vk::Format VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttr
370 } 370 }
371 case Maxwell::VertexAttribute::Type::UnsignedScaled: 371 case Maxwell::VertexAttribute::Type::UnsignedScaled:
372 switch (size) { 372 switch (size) {
373 case Maxwell::VertexAttribute::Size::Size_8:
374 return vk::Format::eR8Uscaled;
373 case Maxwell::VertexAttribute::Size::Size_8_8: 375 case Maxwell::VertexAttribute::Size::Size_8_8:
374 return vk::Format::eR8G8Uscaled; 376 return vk::Format::eR8G8Uscaled;
377 case Maxwell::VertexAttribute::Size::Size_8_8_8:
378 return vk::Format::eR8G8B8Uscaled;
379 case Maxwell::VertexAttribute::Size::Size_8_8_8_8:
380 return vk::Format::eR8G8B8A8Uscaled;
381 case Maxwell::VertexAttribute::Size::Size_16:
382 return vk::Format::eR16Uscaled;
383 case Maxwell::VertexAttribute::Size::Size_16_16:
384 return vk::Format::eR16G16Uscaled;
385 case Maxwell::VertexAttribute::Size::Size_16_16_16:
386 return vk::Format::eR16G16B16Uscaled;
387 case Maxwell::VertexAttribute::Size::Size_16_16_16_16:
388 return vk::Format::eR16G16B16A16Uscaled;
375 default: 389 default:
376 break; 390 break;
377 } 391 }
diff --git a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
index 2da622d15..f64354a0c 100644
--- a/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
+++ b/src/video_core/renderer_vulkan/vk_shader_decompiler.cpp
@@ -2211,16 +2211,14 @@ private:
2211 switch (specialization.attribute_types.at(location)) { 2211 switch (specialization.attribute_types.at(location)) {
2212 case Maxwell::VertexAttribute::Type::SignedNorm: 2212 case Maxwell::VertexAttribute::Type::SignedNorm:
2213 case Maxwell::VertexAttribute::Type::UnsignedNorm: 2213 case Maxwell::VertexAttribute::Type::UnsignedNorm:
2214 case Maxwell::VertexAttribute::Type::UnsignedScaled:
2215 case Maxwell::VertexAttribute::Type::SignedScaled:
2214 case Maxwell::VertexAttribute::Type::Float: 2216 case Maxwell::VertexAttribute::Type::Float:
2215 return {Type::Float, t_in_float, t_in_float4}; 2217 return {Type::Float, t_in_float, t_in_float4};
2216 case Maxwell::VertexAttribute::Type::SignedInt: 2218 case Maxwell::VertexAttribute::Type::SignedInt:
2217 return {Type::Int, t_in_int, t_in_int4}; 2219 return {Type::Int, t_in_int, t_in_int4};
2218 case Maxwell::VertexAttribute::Type::UnsignedInt: 2220 case Maxwell::VertexAttribute::Type::UnsignedInt:
2219 return {Type::Uint, t_in_uint, t_in_uint4}; 2221 return {Type::Uint, t_in_uint, t_in_uint4};
2220 case Maxwell::VertexAttribute::Type::UnsignedScaled:
2221 case Maxwell::VertexAttribute::Type::SignedScaled:
2222 UNIMPLEMENTED();
2223 return {Type::Float, t_in_float, t_in_float4};
2224 default: 2222 default:
2225 UNREACHABLE(); 2223 UNREACHABLE();
2226 return {Type::Float, t_in_float, t_in_float4}; 2224 return {Type::Float, t_in_float, t_in_float4};