mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-26 08:15:59 +03:00
[PR #2092] [MERGED] amdgpu: Handle 8-bit float format case for stencil. #2486
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#2486
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/2092
Author: @squidbus
Created: 1/8/2025
Status: ✅ Merged
Merged: 1/10/2025
Merged by: @georgemoralis
Base:
main← Head:8float📝 Commits (1)
d29c78eamdgpu: Handle 8-bit float format case for stencil.📊 Changes
3 files changed (+13 additions, -4 deletions)
View changed files
📝
src/video_core/amdgpu/liverpool.h(+2 -1)📝
src/video_core/amdgpu/resource.h(+2 -2)📝
src/video_core/amdgpu/types.h(+9 -1)📄 Description
8-bit float format is sometimes used for stencil views of a depth-stencil image. It's possible that because float formats don't do conversion this just happens to work on a real GPU even though 8-bit floats aren't supported; the shaders I've seen just read it as uint anyway. Handle this case by changing 8-bit float format to 8-bit unsigned integer automatically, to match stencil format.
Unfortunately we can't really know if this will end up being used for a stencil view of an existing depth-stencil image as we need the format change to happen earlier than that point, e.g. to use the right types in the shader resources and resolve the Vulkan format for the
ImageViewInfo. Therefore, this just applies the conversion to all 8-bit float resources. If we do hit any non-stencil cases this should still work as it would on real hardware due to the lack of bit conversion for float formats.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.