mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #834] [MERGED] shader_recompiler: Add buffer offset calculation when swizzle is enabled. #1799
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#1799
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/834
Author: @squidbus
Created: 9/7/2024
Status: ✅ Merged
Merged: 9/12/2024
Merged by: @raphaelthegreat
Base:
main← Head:buffer-swizzle-enable📝 Commits (1)
7233f51shader_recompiler: Add buffer offset calculation when swizzle is enabled.📊 Changes
6 files changed (+41 additions, -3 deletions)
View changed files
📝
src/shader_recompiler/backend/spirv/emit_spirv_instructions.h(+2 -0)📝
src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp(+8 -0)📝
src/shader_recompiler/ir/ir_emitter.cpp(+4 -0)📝
src/shader_recompiler/ir/ir_emitter.h(+1 -0)📝
src/shader_recompiler/ir/opcodes.inc(+2 -0)📝
src/shader_recompiler/ir/passes/resource_tracking_pass.cpp(+24 -3)📄 Description
Adds the swizzled buffer addressing offset calculation as described in the GPU reference documentation:
For the purposes of this code, rewritten into index and offset parts as:
To support this calculation, IR instructions have been added for modulo operations.
This is used by CUSA02799 (The Witch and the Hundred Knight: Revival Edition); without it a fragment shader fails to compile on boot due to the assert.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.