diff options
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index f91bb5a1d..baedc4424 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | |||
| @@ -548,31 +548,7 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 548 | static_vector<VkVertexInputBindingDescription, 32> vertex_bindings; | 548 | static_vector<VkVertexInputBindingDescription, 32> vertex_bindings; |
| 549 | static_vector<VkVertexInputBindingDivisorDescriptionEXT, 32> vertex_binding_divisors; | 549 | static_vector<VkVertexInputBindingDivisorDescriptionEXT, 32> vertex_binding_divisors; |
| 550 | static_vector<VkVertexInputAttributeDescription, 32> vertex_attributes; | 550 | static_vector<VkVertexInputAttributeDescription, 32> vertex_attributes; |
| 551 | if (key.state.dynamic_vertex_input) { | 551 | if (!key.state.dynamic_vertex_input) { |
| 552 | const size_t num_vertex_arrays = std::min( | ||
| 553 | key.state.attributes.size(), static_cast<size_t>(device.GetMaxVertexInputBindings())); | ||
| 554 | for (size_t index = 0; index < num_vertex_arrays; ++index) { | ||
| 555 | const u32 type = key.state.DynamicAttributeType(index); | ||
| 556 | if (!stage_infos[0].loads.Generic(index) || type == 0) { | ||
| 557 | continue; | ||
| 558 | } | ||
| 559 | vertex_attributes.push_back({ | ||
| 560 | .location = static_cast<u32>(index), | ||
| 561 | .binding = 0, | ||
| 562 | .format = type == 1 ? VK_FORMAT_R32_SFLOAT | ||
| 563 | : type == 2 ? VK_FORMAT_R32_SINT | ||
| 564 | : VK_FORMAT_R32_UINT, | ||
| 565 | .offset = 0, | ||
| 566 | }); | ||
| 567 | } | ||
| 568 | if (!vertex_attributes.empty()) { | ||
| 569 | vertex_bindings.push_back({ | ||
| 570 | .binding = 0, | ||
| 571 | .stride = 4, | ||
| 572 | .inputRate = VK_VERTEX_INPUT_RATE_VERTEX, | ||
| 573 | }); | ||
| 574 | } | ||
| 575 | } else { | ||
| 576 | const size_t num_vertex_arrays = std::min( | 552 | const size_t num_vertex_arrays = std::min( |
| 577 | Maxwell::NumVertexArrays, static_cast<size_t>(device.GetMaxVertexInputBindings())); | 553 | Maxwell::NumVertexArrays, static_cast<size_t>(device.GetMaxVertexInputBindings())); |
| 578 | for (size_t index = 0; index < num_vertex_arrays; ++index) { | 554 | for (size_t index = 0; index < num_vertex_arrays; ++index) { |