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

VideoCommon: Add shader logic ops support for Apple Silicon GPUs #9990

Closed
wants to merge 12 commits into from

Conversation

OatmealDome
Copy link
Member

@OatmealDome OatmealDome commented Aug 3, 2021

This PR adds a shader logic ops implementation for Apple Silicon GPUs. While Metal does not support logic ops itself, it does support framebuffer fetch, allowing us to implement it in the fragment shader. (Note that Intel, AMD, and NVIDIA GPUs do not support framebuffer fetch, so this PR will not solve the logic ops problem on Intel Macs.)

Fixes Kirby's Air Ride and more on M1 Macs.

Depends on: #9981, #9988

@pizuz
Copy link

pizuz commented Aug 3, 2021

Do you know whether nVidia supports this? I could test (late 2012 iMac with nVidia on macOS Catalina).

@JMC47
Copy link
Contributor

JMC47 commented Aug 3, 2021

Confirmed on discord to fix things on Apple Silicon GPUs.

@OatmealDome
Copy link
Member Author

@pizuz

Do you know whether nVidia supports this? I could test (late 2012 iMac with nVidia on macOS Catalina).

Sorry, I forgot NVIDIA existed. Only Apple Silicon GPUs support framebuffer fetch, so this PR will not work on NVIDIA GPUs.

@OatmealDome OatmealDome force-pushed the m1-logic-ops branch 2 times, most recently from e1cd1ff to 0666978 Compare August 4, 2021 22:56
#ifdef __APPLE__
!host_config.backend_logic_op && host_config.backend_shader_framebuffer_fetch;
#else
false;
Copy link
Member Author

Choose a reason for hiding this comment

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

A separate PR to add shader logic ops support on OpenGL ES (Android) will be opened after this is merged.

@quinton-ashley
Copy link

merge please!

@OatmealDome
Copy link
Member Author

@quinton-ashley This PR is currently being blocked by some necessary infrastructure work on the Dolphin Project's part and can't be merged until that is completed.

@quinton-ashley
Copy link

ah okay, what's the eta on that being done?

@OatmealDome
Copy link
Member Author

Starting over on a new branch, will open another PR when it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants