diff options
author | bunnei <bunneidev@gmail.com> | 2020-05-12 00:22:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 00:22:51 +0200 |
commit | 1beaebe666ac97d34dbbd59731742b751a01e603 (patch) | |
tree | b4dd50f4bce8100d9be086e2b2313868486ab609 /src/video_core | |
parent | Merge pull request #3925 from ogniK5377/hid-SendKeyboardLockKeyEvent (diff) | |
parent | vk_graphics_pipeline: Implement rasterizer_enable on Vulkan (diff) | |
download | yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.tar yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.tar.gz yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.tar.bz2 yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.tar.lz yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.tar.xz yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.tar.zst yuzu-1beaebe666ac97d34dbbd59731742b751a01e603.zip |
Diffstat (limited to 'src/video_core')
-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 | 2 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp index 6cead3a28..568744e3c 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.cpp @@ -93,6 +93,7 @@ void FixedPipelineState::Rasterizer::Fill(const Maxwell& regs) noexcept { tessellation_clockwise.Assign(regs.tess_mode.cw.Value()); logic_op_enable.Assign(regs.logic_op.enable != 0 ? 1 : 0); logic_op.Assign(PackLogicOp(regs.logic_op.operation)); + rasterize_enable.Assign(regs.rasterize_enable != 0 ? 1 : 0); std::memcpy(&point_size, ®s.point_size, sizeof(point_size)); // TODO: C++20 std::bit_cast } diff --git a/src/video_core/renderer_vulkan/fixed_pipeline_state.h b/src/video_core/renderer_vulkan/fixed_pipeline_state.h index cecaee48d..31a6398f2 100644 --- a/src/video_core/renderer_vulkan/fixed_pipeline_state.h +++ b/src/video_core/renderer_vulkan/fixed_pipeline_state.h @@ -164,6 +164,7 @@ struct FixedPipelineState { BitField<23, 1, u32> tessellation_clockwise; BitField<24, 1, u32> logic_op_enable; BitField<25, 4, u32> logic_op; + BitField<29, 1, u32> rasterize_enable; }; // TODO(Rodrigo): Move this to push constants diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 5beea6a03..69b6bba00 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -281,7 +281,7 @@ vk::Pipeline VKGraphicsPipeline::CreatePipeline(const RenderPassParams& renderpa rasterization_ci.pNext = nullptr; rasterization_ci.flags = 0; rasterization_ci.depthClampEnable = rs.depth_clamp_disabled == 0 ? VK_TRUE : VK_FALSE; - rasterization_ci.rasterizerDiscardEnable = VK_FALSE; + rasterization_ci.rasterizerDiscardEnable = rs.rasterize_enable == 0 ? VK_TRUE : VK_FALSE; rasterization_ci.polygonMode = VK_POLYGON_MODE_FILL; rasterization_ci.cullMode = rs.cull_enable ? MaxwellToVK::CullFace(rs.CullFace()) : VK_CULL_MODE_NONE; |