diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 24 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 14 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_shader_decompiler.cpp | 6 |
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 ef66dd141..aad0c895b 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -371,8 +371,22 @@ vk::Format VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttr | |||
| 371 | } | 371 | } |
| 372 | case Maxwell::VertexAttribute::Type::UnsignedScaled: | 372 | case Maxwell::VertexAttribute::Type::UnsignedScaled: |
| 373 | switch (size) { | 373 | switch (size) { |
| 374 | case Maxwell::VertexAttribute::Size::Size_8: | ||
| 375 | return vk::Format::eR8Uscaled; | ||
| 374 | case Maxwell::VertexAttribute::Size::Size_8_8: | 376 | case Maxwell::VertexAttribute::Size::Size_8_8: |
| 375 | return vk::Format::eR8G8Uscaled; | 377 | return vk::Format::eR8G8Uscaled; |
| 378 | case Maxwell::VertexAttribute::Size::Size_8_8_8: | ||
| 379 | return vk::Format::eR8G8B8Uscaled; | ||
| 380 | case Maxwell::VertexAttribute::Size::Size_8_8_8_8: | ||
| 381 | return vk::Format::eR8G8B8A8Uscaled; | ||
| 382 | case Maxwell::VertexAttribute::Size::Size_16: | ||
| 383 | return vk::Format::eR16Uscaled; | ||
| 384 | case Maxwell::VertexAttribute::Size::Size_16_16: | ||
| 385 | return vk::Format::eR16G16Uscaled; | ||
| 386 | case Maxwell::VertexAttribute::Size::Size_16_16_16: | ||
| 387 | return vk::Format::eR16G16B16Uscaled; | ||
| 388 | case Maxwell::VertexAttribute::Size::Size_16_16_16_16: | ||
| 389 | return vk::Format::eR16G16B16A16Uscaled; | ||
| 376 | default: | 390 | default: |
| 377 | break; | 391 | break; |
| 378 | } | 392 | } |
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}; |