[PR #2045] [MERGED] image_info: Add Neo mode macro tile extents. #2459

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/2045
Author: @squidbus
Created: 1/4/2025
Status: Merged
Merged: 1/4/2025
Merged by: @psucien

Base: mainHead: neo-macro


📝 Commits (1)

  • a0ad3c5 image_info: Add Neo mode macro tile extents.

📊 Changes

3 files changed (+352 additions, -190 deletions)

View changed files

📝 src/video_core/texture_cache/image_info.cpp (+4 -190)
📝 src/video_core/texture_cache/image_info.h (+1 -0)
src/video_core/texture_cache/tile.h (+347 -0)

📄 Description

  • Adds Neo mode macro tile extent lookup tables. I've included a comment explaining how the tables were calculated, and I re-calculated the original tables as well and they matched with the existing tables, verifying my logic is correct.
    • One exception: Samples = 1, Tiling Index = 0x0C, Bits Per Pixel = 128 had the wrong height value, corrected now.
  • Moved the lookup table constants and tile size functions to a separate file.

Will still need updates to de-tiling process, but many games don't actually need to de-tile some of these images currently (CPU loaded images for sampling are not being used with alt mode), and for games like CUSA04551 this fixes some cases of hitting ASSERT(image_info.resources > tex_cache_image.info.resources); in the texture cache due to wrong size calculations when in Pro mode.


🔄 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/2045 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 1/4/2025 **Status:** ✅ Merged **Merged:** 1/4/2025 **Merged by:** [@psucien](https://github.com/psucien) **Base:** `main` ← **Head:** `neo-macro` --- ### 📝 Commits (1) - [`a0ad3c5`](https://github.com/shadps4-emu/shadPS4/commit/a0ad3c5e853b473e88bbc4ca0a7f457ed5c4a913) image_info: Add Neo mode macro tile extents. ### 📊 Changes **3 files changed** (+352 additions, -190 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/texture_cache/image_info.cpp` (+4 -190) 📝 `src/video_core/texture_cache/image_info.h` (+1 -0) ➕ `src/video_core/texture_cache/tile.h` (+347 -0) </details> ### 📄 Description * Adds Neo mode macro tile extent lookup tables. I've included a comment explaining how the tables were calculated, and I re-calculated the original tables as well and they matched with the existing tables, verifying my logic is correct. * One exception: Samples = 1, Tiling Index = 0x0C, Bits Per Pixel = 128 had the wrong height value, corrected now. * Moved the lookup table constants and tile size functions to a separate file. Will still need updates to de-tiling process, but many games don't actually need to de-tile some of these images currently (CPU loaded images for sampling are not being used with alt mode), and for games like CUSA04551 this fixes some cases of hitting `ASSERT(image_info.resources > tex_cache_image.info.resources);` in the texture cache due to wrong size calculations when in Pro mode. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:16:36 +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#2459
No description provided.