Skip to content

liverpool: Implement PM4 MEM_SEMAPHORE. #2235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2025
Merged

Conversation

squidbus
Copy link
Collaborator

Implements the MEM_SEMAPHORE PM4 packet, which signals or yields for wait on a memory address semaphore value.

Used by CUSA01047

@StevenMiller123
Copy link
Contributor

Is this different from how #1815 did it?

@squidbus
Copy link
Collaborator Author

Is this different from how #1815 did it?

Yes, this implements what I believe should be the correct behavior while that PR just emitted a global barrier into the Vulkan command buffer.

@KITT1995
Copy link

Ratchet & Clank to menu
image

@ElBread3
Copy link
Contributor

ElBread3 commented Jan 24, 2025

@squidbus Shouldn't the mem_semaphore->Decrement(); call be inside the while loop instead of outside of it?

@squidbus
Copy link
Collaborator Author

Shouldn't the mem_semaphore->Decrement(); call be inside the while loop instead of outside of it?

No, semaphore waits for value to be greater than 0 (signalling either adds 1 or sets to 1) and then decrements it by 1.

@ElBread3
Copy link
Contributor

Got it, the code made it look slightly more overcomplicated than it really was, mb

@squidbus squidbus merged commit a5a1253 into shadps4-emu:main Jan 25, 2025
12 checks passed
@squidbus squidbus deleted the memsem branch January 27, 2025 12:54
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 12, 2025
This reverts commit a5a1253.

Revert "shader_recompiler: Fix image write swizzles. (shadps4-emu#2236)"

This reverts commit a51c8c1.

Revert "shader_recompiler: Implement shader export formats. (shadps4-emu#2226)"

This reverts commit 56f4b8a.
Xcedf added a commit to Xcedf/shadPS4 that referenced this pull request May 12, 2025
This reverts commit a5a1253.

Revert "shader_recompiler: Fix image write swizzles. (shadps4-emu#2236)"

This reverts commit a51c8c1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants