Skip to content
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/dma: Initialize COW DMA block contents to avoid leaks #11541

Merged
merged 1 commit into from Feb 16, 2022

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Feb 15, 2022

It is possible to lose data when uploading since the result of map_dma can change types and handles. Not a problem when using passthrough DMA, but this extension does not work properly on NVIDIA + windows forcing us to fall back to mixed mode. When a copy-based slice takes over for a passthrough slice, leakage can occur. Simply initialize the block memory on creation instead of using uninitialized contents. It costs almost nothing and new blocks are spawned so rarely that it really shouldn't be a problem.

Fixes random weirdness on NVIDIA cards when running async texture streaming.

- It is possible to lose data when uploading since the result of map_dma can change types and handles.
- Consider sync-on-exit for inherited spans

Not a problem when using passthrough DMA, but this extension does not work properly on NVIDIA + windows
@ScottieD
Copy link

This does fix some weirdness I was having in Warhawk. For only a particular map, with ATS enabled everything was textured black. On this latest build it doesn't do that any more.

Before After
image image

@kd-11 kd-11 merged commit 254ddca into RPCS3:master Feb 16, 2022
@kd-11 kd-11 deleted the nv-async-leak branch October 16, 2022 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants