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

Add support for GL_EXT_shader_framebuffer_fetch #72

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

s-inagaki923
Copy link

WIP. I'm reading the source code to implement this feature.

@s-inagaki923 s-inagaki923 marked this pull request as draft December 6, 2021 10:17
@s-inagaki923
Copy link
Author

@kakashidinho
I don't understand most of it yet.

Can it be implemented by simply modifying the code in this repository?
Do you have any ideas on how to implement this? (For example, files that you think will need to be modified.)

I would appreciate it if you could tell me about it.

@s-inagaki923
Copy link
Author

It seems that glslang does not support framebuffer fetch and I need to modify it.

@s-inagaki923
Copy link
Author

I noticed that there is a way to convert gl_LastFragColor and gl_LastFragData to subpass input of GLES for Vulkan.

"--msl-framebuffer-fetch" argument of spirv-cross is:

   [--msl-framebuffer-fetch]:
           Implement subpass inputs with frame buffer fetch.
           Emits [[color(N)]] inputs in fragment stage.
           Requires an Apple GPU.

@kakashidinho
Copy link
Owner

Sorry, I was busy with other stuffs lately. I believe adding GL_EXT_shader_framebuffer_fetch support, you will need to modify the current metal back-end logic as well. Not just shader compiler.
Haven't had time to take a closer look yet, but I will try when I have time later.

@s-inagaki923
Copy link
Author

Thank you!

@s-inagaki923
Copy link
Author

Now, it should work on the actual iOS device with framebuffer fetching and the iOS simulator without framebuffer fetching.

@s-inagaki923 s-inagaki923 marked this pull request as ready for review January 12, 2022 06:51
@kakashidinho
Copy link
Owner

Thanks for this awesome PR.

I will put it on hold for now, I will need to test it more before merging to master.

@s-inagaki923
Copy link
Author

I understand. I am looking forward to it.

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.

2 participants