summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-27 22:05:14 +0200
committerGitHub <noreply@github.com>2020-04-27 22:05:14 +0200
commit1517cba8ca24005e8ea521a539b0e2a1142dfbbd (patch)
tree6d8258b73d93499762d170202377baeb4f7e9512 /src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
parentMerge pull request #3756 from ReinUsesLisp/integrated-devices (diff)
parentvk_rasterizer: Pack texceptions and color formats on invalid formats (diff)
downloadyuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.tar
yuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.tar.gz
yuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.tar.bz2
yuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.tar.lz
yuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.tar.xz
yuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.tar.zst
yuzu-1517cba8ca24005e8ea521a539b0e2a1142dfbbd.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/fixed_pipeline_state.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
index be1c31978..a7f256ff9 100644
--- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
+++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp
@@ -140,6 +140,12 @@ void FixedPipelineState::BlendingAttachment::Fill(const Maxwell& regs, std::size
enable.Assign(1);
}
+void FixedPipelineState::Fill(const Maxwell& regs) {
+ rasterizer.Fill(regs);
+ depth_stencil.Fill(regs);
+ color_blending.Fill(regs);
+}
+
std::size_t FixedPipelineState::Hash() const noexcept {
const u64 hash = Common::CityHash64(reinterpret_cast<const char*>(this), sizeof *this);
return static_cast<std::size_t>(hash);
@@ -149,15 +155,6 @@ bool FixedPipelineState::operator==(const FixedPipelineState& rhs) const noexcep
return std::memcmp(this, &rhs, sizeof *this) == 0;
}
-FixedPipelineState GetFixedPipelineState(const Maxwell& regs) {
- FixedPipelineState fixed_state;
- fixed_state.rasterizer.Fill(regs);
- fixed_state.depth_stencil.Fill(regs);
- fixed_state.color_blending.Fill(regs);
- fixed_state.padding = {};
- return fixed_state;
-}
-
u32 FixedPipelineState::PackComparisonOp(Maxwell::ComparisonOp op) noexcept {
// OpenGL enums go from 0x200 to 0x207 and the others from 1 to 8
// If we substract 0x200 to OpenGL enums and 1 to the others we get a 0-7 range.