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

Rendering loop rewrite #339

Merged
merged 12 commits into from
Dec 2, 2023
Merged

Conversation

GranMinigun
Copy link
Contributor

Tested on Intel Core i5-7400 with integrated Intel HD Graphics 630 (max. clock is 1000 MHz), DDR4 2400 MHz, Mesa 23.2.1. Enabled xBRZ scaler, GBA colour correction, and LCD ghosting effect, the window size was set to 6x. Metrics reported by intel_gpu_top utility.

The current renderer results in 60+% utilization, at ~600 MHz GPU clock. This PR reduces that to 45-50% utilization, at 230±30 MHz GPU clock. May be a bit lower in fullscreen mode, possibly results will vary depending on showed content.

The output of xBRZ shader differs slightly due to being moved to the end of the chain, but it's barely noticeable. When both xBRZ and LCD ghosting are enabled, the former is placed before the latter.

Shout if you'd like to see commit messages changed, code style adjusted, and more comments added. I intentionally omitted whitespace and line ending changes, for the sake of simpler review process. Can introduce them in a separate commit.

Extracted from and is a prerequisite to #332.

@fleroviux
Copy link
Member

I tested this on macOS and Windows and it's looking good to me. I think the source code is fine as is. Thanks a lot @GranMinigun. Should I go ahead and merge or do you still want to make some changes?

Introduce ShaderPass object, which holds shader program and input/output
texture indices.
@GranMinigun
Copy link
Contributor Author

Missed indentation in one place, no functional changes. I can commit CRLF => LF conversion for touched files, if you want. But otherwise, go ahead.

@fleroviux fleroviux merged commit 570c333 into nba-emu:master Dec 2, 2023
@fleroviux
Copy link
Member

Thanks!

cedricwaltercastroson added a commit to cedricwaltercastroson/NanoBoyAdvance that referenced this pull request Dec 4, 2023
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.

None yet

2 participants