mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 15:56:00 +03:00
[PR #3261] [MERGED] texture_cache: Clamp buffer image height to microtile height #3344
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3344
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3261
Author: @raphaelthegreat
Created: 7/16/2025
Status: ✅ Merged
Merged: 7/18/2025
Merged by: @georgemoralis
Base:
main← Head:mip-height📝 Commits (2)
e040721texture_cache: Clamp buffer image height to microtile height354cdffMerge branch 'main' into mip-height📊 Changes
2 files changed (+12 additions, -13 deletions)
View changed files
📝
src/video_core/buffer_cache/buffer_cache.cpp(+3 -3)📝
src/video_core/texture_cache/texture_cache.cpp(+9 -10)📄 Description
When 2D array textures are used that have mipmaps with dimentions less than a tile (< 8) the size calculation will pad both the pitch and the height of the slice to microtile dimentions. The texture cache upload code used the correct pitch, but not the aligned height. This caused issues as some inbetween slices would receive the padding image data and not the intended, which at best will look the same and at worst would poison the image with NaNs.
Fix this by clamping the mip height to microtile height. This should work for macrotile images as well, since the lower mipmaps are downgraded to microtiled tiling
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.