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

rsx: Improve object reuse and lifetime management #6155

Merged
merged 6 commits into from Jul 3, 2019

Conversation

kd-11
Copy link
Contributor

@kd-11 kd-11 commented Jul 1, 2019

  • Fixes some old issues with resource management in violation handlers and the texture cache. Freeing buffers and event handles still queued for processing would cause drivers to re-issue them and cause strange results such as premature signaling and deadlocks due to use-after-free situations in the driver.
  • Handle dangling queries when doing an emergency commandlist close/submit. See Regressions caused by #6112 (optimizations) #6135.
  • Minor optimization by reusing temporary objects in the discard pile instead of allocating new ones. Should help lower memory utilization and may improve performance since allocations are quite expensive. The nature of identical frame-to-frame operation in games means that it is almost never required to invoke allocations unless the scene suddenly changes.

Fixes #6135

@raveskirza
Copy link

raveskirza commented Jul 1, 2019

in B2S get the below error, doesnt happen in Master

F {SPU[0x2000004] Thread (QDSpursCellSpursKernel4) [0x057f0]} RSX: g_access_violation_handler(0x40a06000, 0): Verification failed (e=0x7f):
(in file c:\projects\rpcs3\rpcs3\emu\rsx\vk\vktexturecache.h:296)

@stride21
Copy link

stride21 commented Jul 1, 2019

Battlefield: Bad Company crashes when going ingame with Vulkan.
rpcs3log.zip

@arabek
Copy link
Contributor

arabek commented Jul 2, 2019

Introduces flickering in main menu and track selector in GT6.

@kd-11 kd-11 changed the title rsx: Improve object reuse and lifetime management [WIP] rsx: Improve object reuse and lifetime management Jul 2, 2019
@kd-11
Copy link
Contributor Author

kd-11 commented Jul 2, 2019

The temp image lifetime usage is pretty awful, I'm working on it. Relegated to WIP until then.

@kd-11
Copy link
Contributor Author

kd-11 commented Jul 2, 2019

@arabek @stride21 Retest please.

@arabek
Copy link
Contributor

arabek commented Jul 2, 2019

Flickering in GT6 menus now gone.

@stride21
Copy link

stride21 commented Jul 2, 2019

Battlefield: Bad Company is fixed.

kd-11 added 6 commits July 3, 2019 12:18
- Tagged eventIDs can be used to safely delete resources that are no
longer used
- TODO: Expand gc to collect images as well
- TODO: Fix the texture cache to avoid over-allocating image resources
objects
- Memory allocations are surprisingly expensive when spammed
@kd-11 kd-11 changed the title [WIP] rsx: Improve object reuse and lifetime management rsx: Improve object reuse and lifetime management Jul 3, 2019
@Emulator-Team-2

This comment has been minimized.

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.

Regressions caused by #6112 (optimizations)
5 participants