[PR #1381] [MERGED] video_core: Rework clear values #2077

Closed
opened 2026-02-27 21:15:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1381
Author: @LNDF
Created: 10/14/2024
Status: Merged
Merged: 10/16/2024
Merged by: @georgemoralis

Base: mainHead: clear-values-v2


📝 Commits (10+)

📊 Changes

7 files changed (+557 additions, -58 deletions)

View changed files

📝 .github/workflows/build.yml (+1 -1)
📝 CMakeLists.txt (+3 -4)
📝 externals/CMakeLists.txt (+4 -4)
src/common/number_utils.cpp (+161 -0)
src/common/number_utils.h (+28 -0)
📝 src/video_core/amdgpu/pixel_format.cpp (+18 -18)
📝 src/video_core/renderer_vulkan/liverpool_to_vk.cpp (+342 -31)

📄 Description

This PR reworks clear liverpool to vk clear values conversion. It handles all (most) formats and all swap modes.

I might be wrong but i think that formats are named backwards in types.h. (example: Format11_11_10 has 10 bits red and 11 for green and blue). If i'm wrong, I will revert. Source: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vulkan/radv_formats.c#L502

Draft since it needs testing.

Replaces #1367


🔄 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/1381 **Author:** [@LNDF](https://github.com/LNDF) **Created:** 10/14/2024 **Status:** ✅ Merged **Merged:** 10/16/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `clear-values-v2` --- ### 📝 Commits (10+) - [`ea95d83`](https://github.com/shadps4-emu/shadPS4/commit/ea95d83f320dfaf663985fe5adc7cc7400f0cd36) Clear color convertion - [`6de8e29`](https://github.com/shadps4-emu/shadPS4/commit/6de8e29550f573435c87ddcbcc1914aefb7c1300) Add missing formats - [`9834a5e`](https://github.com/shadps4-emu/shadPS4/commit/9834a5ea755d2de36816ed8ae9067a14f11a6782) Add swap handling - [`282d680`](https://github.com/shadps4-emu/shadPS4/commit/282d6801a44cec564f9012d07592cebf69678f53) Format bits and offsets - [`d7ae897`](https://github.com/shadps4-emu/shadPS4/commit/d7ae8970e293d97ef2c2cf54430e369e1aae05a6) clang-format - [`c3db374`](https://github.com/shadps4-emu/shadPS4/commit/c3db3745a9d83120f8e377dbd69f3fa57b048fe4) Make num_components const - [`665db9c`](https://github.com/shadps4-emu/shadPS4/commit/665db9c339ae3b008f96e866a8fd2941fb55a041) Initialize alpha to 1 - [`23f75bc`](https://github.com/shadps4-emu/shadPS4/commit/23f75bc6bb548af5482e3e4dc72eef7186ad28f9) Handle SnormNz as Snorm - [`400773f`](https://github.com/shadps4-emu/shadPS4/commit/400773f21d7115681e43295a7a7ed68ef3815b78) Don0t leave accidental nonzero values - [`e335fe2`](https://github.com/shadps4-emu/shadPS4/commit/e335fe28ce5884b35bc0abe69ddf78cc826d650d) parallel3 for linux-qt ### 📊 Changes **7 files changed** (+557 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+1 -1) 📝 `CMakeLists.txt` (+3 -4) 📝 `externals/CMakeLists.txt` (+4 -4) ➕ `src/common/number_utils.cpp` (+161 -0) ➕ `src/common/number_utils.h` (+28 -0) 📝 `src/video_core/amdgpu/pixel_format.cpp` (+18 -18) 📝 `src/video_core/renderer_vulkan/liverpool_to_vk.cpp` (+342 -31) </details> ### 📄 Description This PR reworks clear liverpool to vk clear values conversion. It handles all (most) formats and all swap modes. I might be wrong but i think that formats are named backwards in types.h. (example: Format11_11_10 has 10 bits red and 11 for green and blue). If i'm wrong, I will revert. Source: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/amd/vulkan/radv_formats.c#L502 Draft since it needs testing. Replaces #1367 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:06 +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#2077
No description provided.