diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-04-23 12:33:21 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 03:51:29 +0200 |
commit | 5b1b06f11e4520ec9d0b7864dc822daea3e3be0c (patch) | |
tree | 3714404b8c9aae4eb3938c94edc3e5289c98893d /src/video_core | |
parent | shader: Fix storage type when reading patches on tess control (diff) | |
download | yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.tar yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.tar.gz yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.tar.bz2 yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.tar.lz yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.tar.xz yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.tar.zst yuzu-5b1b06f11e4520ec9d0b7864dc822daea3e3be0c.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index a8b402253..2bc1f67ae 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -345,12 +345,18 @@ void GraphicsPipeline::MakePipeline(const Device& device, VkRenderPass render_pa if (!vertex_binding_divisors.empty()) { vertex_input_ci.pNext = &input_divisor_ci; } - const auto input_assembly_topology = MaxwellToVK::PrimitiveTopology(device, state.topology); + auto input_assembly_topology = MaxwellToVK::PrimitiveTopology(device, state.topology); + if (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) { + if (!spv_modules[1] && !spv_modules[2]) { + LOG_WARNING(Render_Vulkan, "Patch topology used without tessellation, using points"); + input_assembly_topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; + } + } const VkPipelineInputAssemblyStateCreateInfo input_assembly_ci{ .sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, .pNext = nullptr, .flags = 0, - .topology = MaxwellToVK::PrimitiveTopology(device, state.topology), + .topology = input_assembly_topology, .primitiveRestartEnable = state.primitive_restart_enable != 0 && SupportsPrimitiveRestart(input_assembly_topology), }; |