diff options
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 11cd41ad7..8634c3316 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | |||
| @@ -568,12 +568,21 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 568 | if (!vertex_binding_divisors.empty()) { | 568 | if (!vertex_binding_divisors.empty()) { |
| 569 | vertex_input_ci.pNext = &input_divisor_ci; | 569 | vertex_input_ci.pNext = &input_divisor_ci; |
| 570 | } | 570 | } |
| 571 | const bool has_tess_stages = spv_modules[1] || spv_modules[2]; | ||
| 571 | auto input_assembly_topology = MaxwellToVK::PrimitiveTopology(device, key.state.topology); | 572 | auto input_assembly_topology = MaxwellToVK::PrimitiveTopology(device, key.state.topology); |
| 572 | if (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) { | 573 | if (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) { |
| 573 | if (!spv_modules[1] && !spv_modules[2]) { | 574 | if (!has_tess_stages) { |
| 574 | LOG_WARNING(Render_Vulkan, "Patch topology used without tessellation, using points"); | 575 | LOG_WARNING(Render_Vulkan, "Patch topology used without tessellation, using points"); |
| 575 | input_assembly_topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; | 576 | input_assembly_topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; |
| 576 | } | 577 | } |
| 578 | } else { | ||
| 579 | if (has_tess_stages) { | ||
| 580 | // The Vulkan spec requires patch list IA topology be used with tessellation | ||
| 581 | // shader stages. Forcing it fixes a crash on some drivers | ||
| 582 | LOG_WARNING(Render_Vulkan, | ||
| 583 | "Patch topology not used with tessellation, using patch list"); | ||
| 584 | input_assembly_topology = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; | ||
| 585 | } | ||
| 577 | } | 586 | } |
| 578 | const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci{ | 587 | const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci{ |
| 579 | .sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, | 588 | .sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, |