[PR #3241] [MERGED] renderer_vulkan: Handle more miscellaneous GPU settings #3328

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3241
Author: @raphaelthegreat
Created: 7/14/2025
Status: Merged
Merged: 7/14/2025
Merged by: @georgemoralis

Base: mainHead: new-exts


📝 Commits (10+)

  • 3393694 renderer_vulkan: Respect provoking vertex setting
  • 23ebe5e renderer_vulkan: Handle rasterization discard
  • 4cc2220 renderer_vulkan: Implement logic ops
  • 20ab2ca renderer_vulkan: Properly implement depth clamp and clip
  • d487ccc renderer_vulkan: Handle line width
  • d59015a Fix build
  • 6798338 vk_pipeline_cache: Don't check depth clamp without a depth buffer
  • f271190 liverpool: Fix line control offset
  • 2a38b7e vk_pipeline_cache: Don't run search if depth clamp is disabled
  • 4375fad vk_pipeline_cache: Allow using viewport range when it's more restrictive then depth clamp

📊 Changes

13 files changed (+323 additions, -67 deletions)

View changed files

📝 src/video_core/amdgpu/liverpool.h (+41 -10)
📝 src/video_core/renderer_vulkan/liverpool_to_vk.cpp (+40 -0)
📝 src/video_core/renderer_vulkan/liverpool_to_vk.h (+2 -0)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp (+62 -17)
📝 src/video_core/renderer_vulkan/vk_graphics_pipeline.h (+21 -11)
📝 src/video_core/renderer_vulkan/vk_instance.cpp (+23 -0)
📝 src/video_core/renderer_vulkan/vk_instance.h (+23 -0)
📝 src/video_core/renderer_vulkan/vk_pipeline_cache.cpp (+68 -17)
📝 src/video_core/renderer_vulkan/vk_pipeline_cache.h (+2 -0)
📝 src/video_core/renderer_vulkan/vk_rasterizer.cpp (+9 -7)
📝 src/video_core/renderer_vulkan/vk_rasterizer.h (+1 -0)
📝 src/video_core/renderer_vulkan/vk_scheduler.cpp (+9 -1)
📝 src/video_core/renderer_vulkan/vk_scheduler.h (+22 -4)

📄 Description

While wondering radv_cmd_buffer.c noticed there are a few things that were not handled at all, or handled incorrectly. This PR is a collection of some easier ones to implement.

The most complicated one is the depth clamp/clip commit. The existing code would clamp the viewport minDepth/maxDepth but that is actually incorrect as those affect the transformation of the Z values. The new depth clamp control extension gives us the ability to specify a custom depth clamp range, aside from the default behavior or using viewport setting.


🔄 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/3241 **Author:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Created:** 7/14/2025 **Status:** ✅ Merged **Merged:** 7/14/2025 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `new-exts` --- ### 📝 Commits (10+) - [`3393694`](https://github.com/shadps4-emu/shadPS4/commit/3393694b44af242413229ca442e5cb2541c91036) renderer_vulkan: Respect provoking vertex setting - [`23ebe5e`](https://github.com/shadps4-emu/shadPS4/commit/23ebe5e0e9eba5868735cde2b2e3fd5d6e30c199) renderer_vulkan: Handle rasterization discard - [`4cc2220`](https://github.com/shadps4-emu/shadPS4/commit/4cc2220f2f0a048020f3970bf46e393a3f58ad56) renderer_vulkan: Implement logic ops - [`20ab2ca`](https://github.com/shadps4-emu/shadPS4/commit/20ab2cabc9edda2ac172f7f568268e56f2c4d7a0) renderer_vulkan: Properly implement depth clamp and clip - [`d487ccc`](https://github.com/shadps4-emu/shadPS4/commit/d487ccc93cf267b2af66ddaa40fbaba13cb6c93c) renderer_vulkan: Handle line width - [`d59015a`](https://github.com/shadps4-emu/shadPS4/commit/d59015a695a3b729a41ccf36413666a7b298862f) Fix build - [`6798338`](https://github.com/shadps4-emu/shadPS4/commit/67983387c3d0d4c6ff18184c2db4b67413dbad81) vk_pipeline_cache: Don't check depth clamp without a depth buffer - [`f271190`](https://github.com/shadps4-emu/shadPS4/commit/f27119041af4633c27a9c0c55a4356110ddbe2ec) liverpool: Fix line control offset - [`2a38b7e`](https://github.com/shadps4-emu/shadPS4/commit/2a38b7e79948d23943bb9e640fb096ad553eae3a) vk_pipeline_cache: Don't run search if depth clamp is disabled - [`4375fad`](https://github.com/shadps4-emu/shadPS4/commit/4375fad6d1630692ed73df387ec315b172f15bee) vk_pipeline_cache: Allow using viewport range when it's more restrictive then depth clamp ### 📊 Changes **13 files changed** (+323 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/amdgpu/liverpool.h` (+41 -10) 📝 `src/video_core/renderer_vulkan/liverpool_to_vk.cpp` (+40 -0) 📝 `src/video_core/renderer_vulkan/liverpool_to_vk.h` (+2 -0) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp` (+62 -17) 📝 `src/video_core/renderer_vulkan/vk_graphics_pipeline.h` (+21 -11) 📝 `src/video_core/renderer_vulkan/vk_instance.cpp` (+23 -0) 📝 `src/video_core/renderer_vulkan/vk_instance.h` (+23 -0) 📝 `src/video_core/renderer_vulkan/vk_pipeline_cache.cpp` (+68 -17) 📝 `src/video_core/renderer_vulkan/vk_pipeline_cache.h` (+2 -0) 📝 `src/video_core/renderer_vulkan/vk_rasterizer.cpp` (+9 -7) 📝 `src/video_core/renderer_vulkan/vk_rasterizer.h` (+1 -0) 📝 `src/video_core/renderer_vulkan/vk_scheduler.cpp` (+9 -1) 📝 `src/video_core/renderer_vulkan/vk_scheduler.h` (+22 -4) </details> ### 📄 Description While wondering radv_cmd_buffer.c noticed there are a few things that were not handled at all, or handled incorrectly. This PR is a collection of some easier ones to implement. The most complicated one is the depth clamp/clip commit. The existing code would clamp the viewport minDepth/maxDepth but that is actually incorrect as those affect the transformation of the Z values. The new depth clamp control extension gives us the ability to specify a custom depth clamp range, aside from the default behavior or using viewport setting. --- <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:18 +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#3328
No description provided.