[PR #1067] [MERGED] renderer_vulkan: Refactor surface and depth format mapping. #1911

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1067
Author: @squidbus
Created: 9/25/2024
Status: Merged
Merged: 9/25/2024
Merged by: @georgemoralis

Base: mainHead: format-support


📝 Commits (2)

  • b57bbe7 renderer_vulkan: Refactor surface and depth format mapping.
  • c0d0e00 image: Convert usage to feature flags for format support checks.

📊 Changes

8 files changed (+491 additions, -377 deletions)

View changed files

📝 src/video_core/amdgpu/pixel_format.h (+17 -0)
📝 src/video_core/renderer_vulkan/liverpool_to_vk.cpp (+360 -311)
📝 src/video_core/renderer_vulkan/liverpool_to_vk.h (+15 -1)
📝 src/video_core/renderer_vulkan/vk_instance.cpp (+66 -52)
📝 src/video_core/renderer_vulkan/vk_instance.h (+5 -10)
📝 src/video_core/texture_cache/image.cpp (+24 -1)
📝 src/video_core/texture_cache/image.h (+1 -0)
📝 src/video_core/texture_cache/image_view.cpp (+3 -2)

📄 Description

  • Refactors surface and depth format mappings to be thoroughly catalogued, with a list of AMD GPU formats to their equivalent Vulkan format and possible usages from the docs. All formats that were represented before are still represented now.
  • Refines boot-time format support logging to check and report using exactly the possible usages by the AMD GPU. Also downgraded to warnings since they may not be used by a game.
  • Adds a few missing DataFormat values from the GPU docs.
  • Adds a few additional format mappings where there was an equivalent Vulkan format.

There are still a few areas that could use work, for example the alternate color buffer formats are not well catalogued and the alternate format system could be refined a bit. Probably something for a future PR if I can think of a good way to clean those up.


🔄 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/1067 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 9/25/2024 **Status:** ✅ Merged **Merged:** 9/25/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `format-support` --- ### 📝 Commits (2) - [`b57bbe7`](https://github.com/shadps4-emu/shadPS4/commit/b57bbe72ee1e78bb670a2ca2ed50d17b74576472) renderer_vulkan: Refactor surface and depth format mapping. - [`c0d0e00`](https://github.com/shadps4-emu/shadPS4/commit/c0d0e00c1d565d6a87489accd4472d8322f80527) image: Convert usage to feature flags for format support checks. ### 📊 Changes **8 files changed** (+491 additions, -377 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/amdgpu/pixel_format.h` (+17 -0) 📝 `src/video_core/renderer_vulkan/liverpool_to_vk.cpp` (+360 -311) 📝 `src/video_core/renderer_vulkan/liverpool_to_vk.h` (+15 -1) 📝 `src/video_core/renderer_vulkan/vk_instance.cpp` (+66 -52) 📝 `src/video_core/renderer_vulkan/vk_instance.h` (+5 -10) 📝 `src/video_core/texture_cache/image.cpp` (+24 -1) 📝 `src/video_core/texture_cache/image.h` (+1 -0) 📝 `src/video_core/texture_cache/image_view.cpp` (+3 -2) </details> ### 📄 Description * Refactors surface and depth format mappings to be thoroughly catalogued, with a list of AMD GPU formats to their equivalent Vulkan format and possible usages from the docs. All formats that were represented before are still represented now. * Refines boot-time format support logging to check and report using exactly the possible usages by the AMD GPU. Also downgraded to warnings since they may not be used by a game. * Adds a few missing `DataFormat` values from the GPU docs. * Adds a few additional format mappings where there was an equivalent Vulkan format. There are still a few areas that could use work, for example the alternate color buffer formats are not well catalogued and the alternate format system could be refined a bit. Probably something for a future PR if I can think of a good way to clean those up. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:14:25 +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#1911
No description provided.