-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Vulkan: Extend full bindless to cover cases with phi nodes #6853
Conversation
Getting an out of memory error that crashes the emulator when trying to load into East Rogueport from the main square, going from the main square through other loading zones (west, south, the pipe) does not crash. This crash does not happen for me on the latest master build (e65effc). |
Getting this as well. Downgrading back to the master build fixed it for me. |
Entering paper mode casues the game to blur a bit until game reset |
Happens for me too, even when attempting to enter East Rogueport from the sewers pipe. Black screen for a while, watch memory usage go up steadily, then an "ErrorOutOfDeviceMemory" crash. |
I rebased this on top of #6870 which should fix this crash. |
I East Rogueport doesn't crash for me after this changes |
It appears that surfaces, which have been fixed with this, display weird flickers. See the attached video for reference. Flickers in the video occur on:
All these surfaces were completely black prior to the fix. ttyd_ryujinx_flicker.mp4EDIT: It appears the save block in Rogueport is fine, no flickers. Very curious. |
This seems to be an issue with AMD graphics cards, again. I think it was also visible in Penny's Big Breakaway, so maybe it's an issue with how barriers work with texture arrays. |
I am also getting this. 2024-05-26.13-54-24.mp4Sadly, I can't provide logs due to Vulkan causing my logs to go haywire and write about 1 GB of logs per minute (this happens on the main branch too. This is not an issue specific to this PR, and likely just an issue with my hardware, but I'm not sure). Aside from that, the save block and crystal stars do work normally. |
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.
Looks good, I tested a varied bunch of games and it didn't trigger when unnecessary, which was really my only concern.
Update, this seems to not happen when my resolution scale is set to Native (the video has it set to 2x). The logs are sadly still multiple GB for me, but I'm hoping someone else with the same issue can post detailed logs of why the blur effect is being caused. I'm suspecting it has something to do with the resolution scale, since anything higher than native after entering paper mode seems to do nothing to the image. |
This is basically extending the "full bindless" mode implemented on #6577 to activate in more casses. This change allows it to activate when the handle comes from a phi node, when all sources are either a constant buffer, a storage buffer, or a shader input. It ignores other phi nodes that might be a possible source.
An example of case that is supported now is:
The
FMUL
instruction is not an actual possible source, but unfortunately it is also considered to be one right now due to the use of predicates. The shader generator does not know that this is basically a if-else construct. The fact that it skips other phi nodes right now is what makes it work, as if only sees the constant buffer, and theLDG
andFMUL
are "hidden behind" another phi node.I also added a log message when bindless elimination fails, since this seems to be a problem quite often.
This fixes save boxes being black on Paper Mario: The Thousand-Year Door.
Before:
After:
Testing is welcome. This might have performance impact as it enables "full bindless" in more cases, although I suspect this game was already triggering it before (I will update this after I can test it more).