[PR #3471] [MERGED] vk_graphics_pipeline: Prioritize depth clip when separate clip/clamp control is not supported. #3492

Closed
opened 2026-02-27 22:03:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3471
Author: @squidbus
Created: 8/29/2025
Status: Merged
Merged: 8/29/2025
Merged by: @squidbus

Base: mainHead: depthclip


📝 Commits (1)

  • e69f257 vk_graphics_pipeline: Prioritize depth clip when separate clip/clamp control is not supported.

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+2 -2)

📄 Description

When separate depth clip control is not supported, the current logic prioritizes depth clamp over clip. However in the common case that both clamping and clipping are being performed with the same depth range, it makes more sense to prioritize clipping as it will effectively no-op the clamp. Adjust the logic to only use depth clamp if enabled and either clip is disabled or separate control is supported.

Fixes rendering issues in CUSA16404 on MoltenVK, which does not support separate clip control.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/3471 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 8/29/2025 **Status:** ✅ Merged **Merged:** 8/29/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `depthclip` --- ### 📝 Commits (1) - [`e69f257`](https://github.com/shadps4-emu/shadPS4/commit/e69f25749f94bbd9cd50b7ec9027e9d9f96f094c) vk_graphics_pipeline: Prioritize depth clip when separate clip/clamp control is not supported. ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+2 -2) </details> ### 📄 Description When separate depth clip control is not supported, the current logic prioritizes depth clamp over clip. However in the common case that both clamping and clipping are being performed with the same depth range, it makes more sense to prioritize clipping as it will effectively no-op the clamp. Adjust the logic to only use depth clamp if enabled and either clip is disabled or separate control is supported. Fixes rendering issues in CUSA16404 on MoltenVK, which does not support separate clip control. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#3492
No description provided.