diff options
| author | 2022-11-12 02:27:06 -0800 | |
|---|---|---|
| committer | 2022-11-12 02:27:06 -0800 | |
| commit | 08091ff3e38665181fedcc476a7b83b84159e7a4 (patch) | |
| tree | 8d059005c6e74fff1ccae781068b12e58ccdc816 /src/video_core/renderer_vulkan | |
| parent | Merge pull request #9224 from liamwhite/services-arent-processes (diff) | |
| parent | Fix regs regression with OpenGL two-sided stencil, and re-add data invalidati... (diff) | |
| download | yuzu-08091ff3e38665181fedcc476a7b83b84159e7a4.tar.gz yuzu-08091ff3e38665181fedcc476a7b83b84159e7a4.tar.xz yuzu-08091ff3e38665181fedcc476a7b83b84159e7a4.zip | |
Merge pull request #9226 from Kelebek1/regs_regression
[video_core] Fix a couple regs regressions
Diffstat (limited to 'src/video_core/renderer_vulkan')
| -rw-r--r-- | src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/fixed_pipeline_state.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | 12 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp index f85ed8e5b..98cc26679 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | |||
| @@ -90,6 +90,7 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d, | |||
| 90 | depth_format.Assign(static_cast<u32>(regs.zeta.format)); | 90 | depth_format.Assign(static_cast<u32>(regs.zeta.format)); |
| 91 | y_negate.Assign(regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft ? 1 : 0); | 91 | y_negate.Assign(regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft ? 1 : 0); |
| 92 | provoking_vertex_last.Assign(regs.provoking_vertex == Maxwell::ProvokingVertex::Last ? 1 : 0); | 92 | provoking_vertex_last.Assign(regs.provoking_vertex == Maxwell::ProvokingVertex::Last ? 1 : 0); |
| 93 | conservative_raster_enable.Assign(regs.conservative_raster_enable != 0 ? 1 : 0); | ||
| 93 | smooth_lines.Assign(regs.line_anti_alias_enable != 0 ? 1 : 0); | 94 | smooth_lines.Assign(regs.line_anti_alias_enable != 0 ? 1 : 0); |
| 94 | 95 | ||
| 95 | for (size_t i = 0; i < regs.rt.size(); ++i) { | 96 | for (size_t i = 0; i < regs.rt.size(); ++i) { |
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.h b/src/video_core/renderer_vulkan/fixed_pipeline_state.h index 43441209c..1afdef329 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.h +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.h | |||
| @@ -193,6 +193,7 @@ struct FixedPipelineState { | |||
| 193 | BitField<6, 5, u32> depth_format; | 193 | BitField<6, 5, u32> depth_format; |
| 194 | BitField<11, 1, u32> y_negate; | 194 | BitField<11, 1, u32> y_negate; |
| 195 | BitField<12, 1, u32> provoking_vertex_last; | 195 | BitField<12, 1, u32> provoking_vertex_last; |
| 196 | BitField<13, 1, u32> conservative_raster_enable; | ||
| 196 | BitField<14, 1, u32> smooth_lines; | 197 | BitField<14, 1, u32> smooth_lines; |
| 197 | }; | 198 | }; |
| 198 | std::array<u8, Maxwell::NumRenderTargets> color_formats; | 199 | std::array<u8, Maxwell::NumRenderTargets> color_formats; |
diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 1aa116cea..ef75c126c 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp | |||
| @@ -680,6 +680,15 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 680 | .lineStippleFactor = 0, | 680 | .lineStippleFactor = 0, |
| 681 | .lineStipplePattern = 0, | 681 | .lineStipplePattern = 0, |
| 682 | }; | 682 | }; |
| 683 | VkPipelineRasterizationConservativeStateCreateInfoEXT conservative_raster{ | ||
| 684 | .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, | ||
| 685 | .pNext = nullptr, | ||
| 686 | .flags = 0, | ||
| 687 | .conservativeRasterizationMode = key.state.conservative_raster_enable != 0 | ||
| 688 | ? VK_CONSERVATIVE_RASTERIZATION_MODE_OVERESTIMATE_EXT | ||
| 689 | : VK_CONSERVATIVE_RASTERIZATION_MODE_DISABLED_EXT, | ||
| 690 | .extraPrimitiveOverestimationSize = 0.0f, | ||
| 691 | }; | ||
| 683 | VkPipelineRasterizationProvokingVertexStateCreateInfoEXT provoking_vertex{ | 692 | VkPipelineRasterizationProvokingVertexStateCreateInfoEXT provoking_vertex{ |
| 684 | .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT, | 693 | .sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT, |
| 685 | .pNext = nullptr, | 694 | .pNext = nullptr, |
| @@ -690,6 +699,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { | |||
| 690 | if (IsLine(input_assembly_topology) && device.IsExtLineRasterizationSupported()) { | 699 | if (IsLine(input_assembly_topology) && device.IsExtLineRasterizationSupported()) { |
| 691 | line_state.pNext = std::exchange(rasterization_ci.pNext, &line_state); | 700 | line_state.pNext = std::exchange(rasterization_ci.pNext, &line_state); |
| 692 | } | 701 | } |
| 702 | if (device.IsExtConservativeRasterizationSupported()) { | ||
| 703 | conservative_raster.pNext = std::exchange(rasterization_ci.pNext, &conservative_raster); | ||
| 704 | } | ||
| 693 | if (device.IsExtProvokingVertexSupported()) { | 705 | if (device.IsExtProvokingVertexSupported()) { |
| 694 | provoking_vertex.pNext = std::exchange(rasterization_ci.pNext, &provoking_vertex); | 706 | provoking_vertex.pNext = std::exchange(rasterization_ci.pNext, &provoking_vertex); |
| 695 | } | 707 | } |