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: Ignore or recover from unknown primitives #7077

Merged
merged 1 commit into from
Dec 10, 2019

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Dec 7, 2019

From hw tests: as long as there are no vertex ranges/draw commands passed while in_begin_end = true, it is allowed to begin and end with an invalid primitive, otheriwise crashes on realhw.
Where realhw crashes I've put fifo recovery as usual.

Known to improve stability in Beyond Two Souls.
Possibly improves stability in Metal Gear Solid 4 as it also happens with it (testers are welcome).

This also fixes a bug when recovering FIFO or creating such recovery point inside in_begin_end == true scope.

@elad335
Copy link
Contributor Author

elad335 commented Dec 7, 2019

@kd-11
Copy link
Contributor

kd-11 commented Dec 7, 2019

The backend already have their own handlers for empty draw commands. No need to diverge the path here and its also likely just what the realhw does anyway. If end() is called with no draw calls, nothing will happen. No draw calls will be emitted.

@kd-11
Copy link
Contributor

kd-11 commented Dec 7, 2019

What I mean is. go through begin/end as usual, just remember to empty the queue if its invalid and raise error if there actually exists draw calls for some reason. I'm trying to avoid turning the dispatch methods into a soupy mess of infinitely branching logic just to satiate some random game that will crash a few milliseconds later anyway.

@kd-11
Copy link
Contributor

kd-11 commented Dec 7, 2019

On second thought, just leave it, I'll change it properly later.

@elad335
Copy link
Contributor Author

elad335 commented Dec 7, 2019

Refactored it.

@elad335 elad335 force-pushed the rsx-primitive-fix branch 3 times, most recently from 8b84a54 to 5bfbfce Compare December 7, 2019 18:52
@elad335 elad335 changed the title rsx: Recover/ignore (depends) from invalid primitive writes rsx: Recover/ignore (depends) from unknown primitives Dec 7, 2019
@Xcedf
Copy link

Xcedf commented Dec 8, 2019

Also happens in Naughty Dog's games, but very randomly, will try anyway.

@elad335 elad335 force-pushed the rsx-primitive-fix branch 2 times, most recently from 9f7b3cc to a15a72e Compare December 10, 2019 18:08
@elad335 elad335 changed the title rsx: Recover/ignore (depends) from unknown primitives rsx: Ignore or recover from unknown primitives Dec 10, 2019
@elad335 elad335 force-pushed the rsx-primitive-fix branch 2 times, most recently from 633c791 to 39aaa6b Compare December 10, 2019 19:09
@Nekotekina
Copy link
Member

Nekotekina commented Dec 10, 2019

To 39aaa6b : does have effect != does make sense. It doesn't really make any sense to rely on this fragile feature.

This also fixes a bug when recovering FIFO or creating such recovery point inside in_begin_end == true scope.
@Nekotekina Nekotekina merged commit 7260af0 into RPCS3:master Dec 10, 2019
@elad335 elad335 deleted the rsx-primitive-fix branch December 11, 2019 05:55
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