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

Transform shader LDC into constant buffer access if offset is constant #3672

Merged
merged 2 commits into from Sep 7, 2022

Conversation

gdkchan
Copy link
Member

@gdkchan gdkchan commented Sep 5, 2022

The LoadConstant IR operation is used for constant buffer loads with non-constant offset or constant buffer index. If both are constant, we can just use the regular "Cbuf" operand. Doing so allow bindless elimination to kick in on more cases (since it does not expect a LoadConstant operation, as those are usually used when the offset is not constant).

Improves rendering on Ys VIII: Lacrimosa of DANA:
Before:
image
After:
image

@gdkchan gdkchan added gpu Related to Ryujinx.Graphics fix Fix something labels Sep 5, 2022
Copy link
Member

@riperiperi riperiperi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch.

@gdkchan gdkchan merged commit 408bd63 into Ryujinx:master Sep 7, 2022
@gdkchan gdkchan deleted the ldc-to-cbuf branch September 7, 2022 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something gpu Related to Ryujinx.Graphics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants