diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-10-07 12:49:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-07 12:49:37 -0400 |
| commit | ce6e0114ba7bf1e9b98b9cf870d95a74acc8963f (patch) | |
| tree | 6b445dc5b441153c54202242322f7c4cd11fe2d1 /src/video_core/renderer_vulkan/blit_image.cpp | |
| parent | a365fea8fb46ccd72295095259c0a1d05c9265d2 (diff) | |
| parent | dd2d450e3fee3a2dee717abc820bda43719618bc (diff) | |
Merge pull request #11630 from Kelebek1/clear_stencil_requires_depth_test
Enable depth test on depthstencil clear path
Diffstat (limited to 'src/video_core/renderer_vulkan/blit_image.cpp')
| -rw-r--r-- | src/video_core/renderer_vulkan/blit_image.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/blit_image.cpp b/src/video_core/renderer_vulkan/blit_image.cpp index 1032c9d122..182057575d 100644 --- a/src/video_core/renderer_vulkan/blit_image.cpp +++ b/src/video_core/renderer_vulkan/blit_image.cpp @@ -609,6 +609,8 @@ void BlitImageHelper::ClearDepthStencil(const Framebuffer* dst_framebuffer, bool const VkPipelineLayout layout = *clear_color_pipeline_layout; scheduler.RequestRenderpass(dst_framebuffer); scheduler.Record([pipeline, layout, clear_depth, dst_region](vk::CommandBuffer cmdbuf) { + constexpr std::array blend_constants{0.0f, 0.0f, 0.0f, 0.0f}; + cmdbuf.SetBlendConstants(blend_constants.data()); cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); BindBlitState(cmdbuf, dst_region); cmdbuf.PushConstants(layout, VK_SHADER_STAGE_FRAGMENT_BIT, clear_depth); @@ -865,7 +867,7 @@ VkPipeline BlitImageHelper::FindOrEmplaceClearStencilPipeline( .sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, .pNext = nullptr, .flags = 0, - .depthTestEnable = VK_FALSE, + .depthTestEnable = key.depth_clear, .depthWriteEnable = key.depth_clear, .depthCompareOp = VK_COMPARE_OP_ALWAYS, .depthBoundsTestEnable = VK_FALSE, |
