summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_vulkan/fixed_pipeline_state.cpp')
-rw-r--r--src/video_core/renderer_vulkan/fixed_pipeline_state.cpp8
1 files changed, 8 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 648b1e71b..6cead3a28 100644
--- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
+++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <algorithm>
#include <cstring>
#include <tuple>
@@ -101,6 +102,12 @@ void FixedPipelineState::ColorBlending::Fill(const Maxwell& regs) noexcept {
}
}
+void FixedPipelineState::ViewportSwizzles::Fill(const Maxwell& regs) noexcept {
+ const auto& transform = regs.viewport_transform;
+ std::transform(transform.begin(), transform.end(), swizzles.begin(),
+ [](const auto& viewport) { return static_cast<u16>(viewport.swizzle.raw); });
+}
+
void FixedPipelineState::BlendingAttachment::Fill(const Maxwell& regs, std::size_t index) {
const auto& mask = regs.color_mask[regs.color_mask_common ? 0 : index];
@@ -144,6 +151,7 @@ void FixedPipelineState::Fill(const Maxwell& regs) {
rasterizer.Fill(regs);
depth_stencil.Fill(regs);
color_blending.Fill(regs);
+ viewport_swizzles.Fill(regs);
}
std::size_t FixedPipelineState::Hash() const noexcept {