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

ShaderGen: Fix broken rendering on Adreno Vulkan drivers #7729

Merged
merged 2 commits into from
Jan 25, 2019
Merged

ShaderGen: Fix broken rendering on Adreno Vulkan drivers #7729

merged 2 commits into from
Jan 25, 2019

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented Jan 23, 2019

This PR fixes the broken rendering on Adreno with Android 9-era drivers.

Apparently qcom isn't very good at allocating varying locations, and their compiler spews errors about exceeding the output component limit, when clearly we're not. This only happens if the varyings are defined in an interface block.

We don't need the interface block anyway, since these drivers don't support geometry shaders. So just generate the varying locations incrementally.

Also gets rid of a couple of varyings in scenarios where they're not used. I guess this will only make a difference if the drivers are really terrible at cross-stage optimization :)

Removes the clipPos varying unless slow-depth is used, and the
clipDistance varyings if geometry shaders are not used.
@weihuoya
Copy link
Contributor

It works, awesome.

Doing so causes the Adreno driver to choke and spew errors about
too many output locations/components, when clearly we're under
the limit.
@stenzek
Copy link
Contributor Author

stenzek commented Jan 25, 2019

Tested on desktop (NV), Adreno (OnePlus 6), and Mac. Fifoci says no differences, so that covers Mesa too. According to @zackhow, works fine on NV Shield TV.

@stenzek stenzek merged commit 224b23b into dolphin-emu:master Jan 25, 2019
@stenzek stenzek deleted the adreno-sillyness branch January 25, 2019 01:07
@dolphin-emu dolphin-emu deleted a comment from Carlsfjr Apr 26, 2020
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.

2 participants