summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-09-28 22:39:42 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-09-28 22:39:42 +0200
commit6f35fb8d26311d976184ebfae4480d85bba4b131 (patch)
tree6485eb9cb531b7d7cec22e4b47e28d00fc69c64d
parentMerge pull request #7076 from ameerj/amd-botw (diff)
downloadyuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.tar
yuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.tar.gz
yuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.tar.bz2
yuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.tar.lz
yuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.tar.xz
yuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.tar.zst
yuzu-6f35fb8d26311d976184ebfae4480d85bba4b131.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp11
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,