diff options
| author | 2021-06-01 20:37:45 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:34 -0400 | |
| commit | 46bd362d0dfab27e8c8d49f11eb4e3f373bf8f23 (patch) | |
| tree | e2ab695352aa7e3516e79f4992d8349b764f0029 /src | |
| parent | vk_swapchain: Avoid recreating the swapchain on each frame (diff) | |
| download | yuzu-46bd362d0dfab27e8c8d49f11eb4e3f373bf8f23.tar.gz yuzu-46bd362d0dfab27e8c8d49f11eb4e3f373bf8f23.tar.xz yuzu-46bd362d0dfab27e8c8d49f11eb4e3f373bf8f23.zip | |
fixed_pipeline_state: Use regular for loop instead of ranges for perf
MSVC generates better code for it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp index 3a43c329f..1486d088a 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp | |||
| @@ -84,9 +84,10 @@ void FixedPipelineState::Refresh(Tegra::Engines::Maxwell3D& maxwell3d, | |||
| 84 | early_z.Assign(regs.force_early_fragment_tests != 0 ? 1 : 0); | 84 | early_z.Assign(regs.force_early_fragment_tests != 0 ? 1 : 0); |
| 85 | depth_enabled.Assign(regs.zeta_enable != 0 ? 1 : 0); | 85 | depth_enabled.Assign(regs.zeta_enable != 0 ? 1 : 0); |
| 86 | depth_format.Assign(static_cast<u32>(regs.zeta.format)); | 86 | depth_format.Assign(static_cast<u32>(regs.zeta.format)); |
| 87 | std::ranges::transform(regs.rt, color_formats.begin(), | ||
| 88 | [](const auto& rt) { return static_cast<u8>(rt.format); }); | ||
| 89 | 87 | ||
| 88 | for (size_t i = 0; i < regs.rt.size(); ++i) { | ||
| 89 | color_formats[i] = static_cast<u8>(regs.rt[i].format); | ||
| 90 | } | ||
| 90 | alpha_test_ref = Common::BitCast<u32>(regs.alpha_test_ref); | 91 | alpha_test_ref = Common::BitCast<u32>(regs.alpha_test_ref); |
| 91 | point_size = Common::BitCast<u32>(regs.point_size); | 92 | point_size = Common::BitCast<u32>(regs.point_size); |
| 92 | 93 | ||