diff options
author | bunnei <bunneidev@gmail.com> | 2021-10-05 00:37:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-05 00:37:32 +0200 |
commit | 158a69311195c1cb5c39bae3fddeaeaed3634078 (patch) | |
tree | 6d5ccd5b79d4016342e1b191cbc773b00f85c915 /src/video_core | |
parent | Merge pull request #7107 from astrelsky/iob_fix (diff) | |
parent | vk_graphics_pipeline: Force patch list topology when tessellation is used (diff) | |
download | yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.tar yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.tar.gz yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.tar.bz2 yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.tar.lz yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.tar.xz yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.tar.zst yuzu-158a69311195c1cb5c39bae3fddeaeaed3634078.zip |
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) { if (!vertex_binding_divisors.empty()) { vertex_input_ci.pNext = &input_divisor_ci; } + const bool has_tess_stages = spv_modules[1] || spv_modules[2]; auto input_assembly_topology = MaxwellToVK::PrimitiveTopology(device, key.state.topology); if (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) { - if (!spv_modules[1] && !spv_modules[2]) { + if (!has_tess_stages) { LOG_WARNING(Render_Vulkan, "Patch topology used without tessellation, using points"); input_assembly_topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; } + } else { + if (has_tess_stages) { + // The Vulkan spec requires patch list IA topology be used with tessellation + // shader stages. Forcing it fixes a crash on some drivers + LOG_WARNING(Render_Vulkan, + "Patch topology not used with tessellation, using patch list"); + input_assembly_topology = VK_PRIMITIVE_TOPOLOGY_PATCH_LIST; + } } const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci{ .sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, |