-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
vk: Allow host GPU to synchronize directly with CELL via RSX semaphores #11568
Conversation
…of-order signals - This avoids crashes in some game engines which expect RSX semaphores to signal in the order they are submitted.
P.S For those curious, this is slower than using the regular simulated semaphores, so do not expect performance gains. |
@@ -16,6 +16,18 @@ namespace vk | |||
gpu = 1 | |||
}; | |||
|
|||
struct host_data_t // Pick a better name | |||
{ | |||
u64 magic = 0xCAFEBABE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 0xB0BAFEDD ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0xBEEFFACE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0xB16B00B5
Same issue in Toy Story 3 |
Removed toy story 3 from description, that game requires full zcull sync on a texture semaphore which is just dumb. Strict mode is still required for that due to the performance penalty. |
Hmm, AMD has the same error when binding but it doesn't matter for host allocations. I can technically apply the same workaround for Xe or just blacklist the driver, we'll see. |
"Some games have tightly synchronous engines that require RSX semaphores to be accurate. This is not a problem for OpenGL due to how the texture system works there, but vulkan has a simulated coherent FlexIO DMA layer which persists between draws." |
Pass host GPU state directly to CELL threads. CELL synchronizes with RSX, but this is handled on the CPU using fake signals that do not reflect the actual nature of data. Some games have tightly synchronous engines that require RSX semaphores to be accurate. This is not a problem for OpenGL due to how the texture system works there, but vulkan has a simulated coherent FlexIO DMA layer which persists between draws. This means that we need to tell the game when it is safe to clobber memory for example instead of just signaling the semaphores when we see them on the CPU side of things.
Fixes flickering vegetation in Avatar.
In theory, this should also fix flickering in Toy Story 3 without strict mode enabled.Note that the "Allow Host GPU Labels" toggle needs to be checked to enable this functionality.
Fixes #11552