diff options
| author | 2023-01-05 00:14:01 -0500 | |
|---|---|---|
| committer | 2023-01-05 00:14:01 -0500 | |
| commit | e82e3e06be0b419a4d30342a44a04d79fbbfc6cb (patch) | |
| tree | 03caef4f3c3a00a12cb04be128aaa65497cd0d4a | |
| parent | Merge pull request #9501 from FernandoS27/yfc-rel-2 (diff) | |
| parent | Vulkan: Fix drivers that don't support dynamic_state_2 up (diff) | |
| download | yuzu-e82e3e06be0b419a4d30342a44a04d79fbbfc6cb.tar.gz yuzu-e82e3e06be0b419a4d30342a44a04d79fbbfc6cb.tar.xz yuzu-e82e3e06be0b419a4d30342a44a04d79fbbfc6cb.zip | |
Merge pull request #9557 from FernandoS27/ooops-i-killed-the-shitty-drivers
Vulkan: Fix drivers that don't support dynamic_state_2 up
| -rw-r--r-- | src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp index 3d328a250..f8398b511 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | |||
| @@ -148,7 +148,7 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d, DynamicFe | |||
| 148 | }); | 148 | }); |
| 149 | } | 149 | } |
| 150 | if (!extended_dynamic_state_2_extra) { | 150 | if (!extended_dynamic_state_2_extra) { |
| 151 | dynamic_state.Refresh2(regs, topology, extended_dynamic_state_2); | 151 | dynamic_state.Refresh2(regs, topology_, extended_dynamic_state_2); |
| 152 | } | 152 | } |
| 153 | if (!extended_dynamic_state_3_blend) { | 153 | if (!extended_dynamic_state_3_blend) { |
| 154 | if (maxwell3d.dirty.flags[Dirty::Blending]) { | 154 | if (maxwell3d.dirty.flags[Dirty::Blending]) { |
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index d11383bf1..734c379b9 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | |||
| @@ -644,12 +644,15 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 644 | .pNext = nullptr, | 644 | .pNext = nullptr, |
| 645 | .flags = 0, | 645 | .flags = 0, |
| 646 | .topology = input_assembly_topology, | 646 | .topology = input_assembly_topology, |
| 647 | .primitiveRestartEnable = dynamic.primitive_restart_enable != 0 && | 647 | .primitiveRestartEnable = |
| 648 | ((input_assembly_topology != VK_PRIMITIVE_TOPOLOGY_PATCH_LIST && | 648 | dynamic.primitive_restart_enable != 0 && |
| 649 | device.IsTopologyListPrimitiveRestartSupported()) || | 649 | ((input_assembly_topology != VK_PRIMITIVE_TOPOLOGY_PATCH_LIST && |
| 650 | SupportsPrimitiveRestart(input_assembly_topology) || | 650 | device.IsTopologyListPrimitiveRestartSupported()) || |
| 651 | (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST && | 651 | SupportsPrimitiveRestart(input_assembly_topology) || |
| 652 | device.IsPatchListPrimitiveRestartSupported())), | 652 | (input_assembly_topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST && |
| 653 | device.IsPatchListPrimitiveRestartSupported())) | ||
| 654 | ? VK_TRUE | ||
| 655 | : VK_FALSE, | ||
| 653 | }; | 656 | }; |
| 654 | const VkPipelineTessellationStateCreateInfo tessellation_ci{ | 657 | const VkPipelineTessellationStateCreateInfo tessellation_ci{ |
| 655 | .sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, | 658 | .sType = VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, |
| @@ -699,7 +702,7 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 699 | .cullMode = static_cast<VkCullModeFlags>( | 702 | .cullMode = static_cast<VkCullModeFlags>( |
| 700 | dynamic.cull_enable ? MaxwellToVK::CullFace(dynamic.CullFace()) : VK_CULL_MODE_NONE), | 703 | dynamic.cull_enable ? MaxwellToVK::CullFace(dynamic.CullFace()) : VK_CULL_MODE_NONE), |
| 701 | .frontFace = MaxwellToVK::FrontFace(dynamic.FrontFace()), | 704 | .frontFace = MaxwellToVK::FrontFace(dynamic.FrontFace()), |
| 702 | .depthBiasEnable = (dynamic.depth_bias_enable == 0 ? VK_TRUE : VK_FALSE), | 705 | .depthBiasEnable = (dynamic.depth_bias_enable != 0 ? VK_TRUE : VK_FALSE), |
| 703 | .depthBiasConstantFactor = 0.0f, | 706 | .depthBiasConstantFactor = 0.0f, |
| 704 | .depthBiasClamp = 0.0f, | 707 | .depthBiasClamp = 0.0f, |
| 705 | .depthBiasSlopeFactor = 0.0f, | 708 | .depthBiasSlopeFactor = 0.0f, |