mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #2310] [MERGED] shader_recompiler: Add workaround for drivers with unexpected unorm rounding behavior. #2640
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#2640
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/2310
Author: @squidbus
Created: 2/1/2025
Status: ✅ Merged
Merged: 2/4/2025
Merged by: @squidbus
Base:
main← Head:unorm-fix📝 Commits (1)
cbdf877shader_recompiler: Add workaround for drivers with unexpected unorm rounding behavior.📊 Changes
3 files changed (+17 additions, -1 deletions)
View changed files
📝
src/shader_recompiler/frontend/translate/export.cpp(+5 -1)📝
src/shader_recompiler/runtime_info.h(+1 -0)📝
src/video_core/renderer_vulkan/vk_pipeline_cache.cpp(+11 -0)📄 Description
This is a bit of an ugly hack but it fixes some incorrect unorm rounding behavior seen in CUSA05637 on macOS. This workaround was discovered by reverse-engineering what Apple's D3DMetal does to solve the same issue for Direct3D games. So presumably this has to be done in order to get the correct results, at least for now. I'm still investigating why this is needed and whether it can/should be done at the driver level instead.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.