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

OpenGL compatibility #167

Closed
msiglreith opened this issue Oct 28, 2020 · 5 comments · Fixed by #168
Closed

OpenGL compatibility #167

msiglreith opened this issue Oct 28, 2020 · 5 comments · Fixed by #168
Labels
t: enhancement A new feature or improvement to an existing one.

Comments

@msiglreith
Copy link
Contributor

msiglreith commented Oct 28, 2020

OpenGL supports binary SPIR-V shaders as source since 4.6, mostly feature compatible with Vulkan shader requirements.
Right now rust-gpu requires the Vulkan memory model which is not support. OpenGL only supports the GLSL450 model.
Would be interesting how deep the implementation relays on it. Quickly tweaking the capabilities and extensions towards GLSL results in a binary which can be passed to OpenGL.

(rather a feature request than a bug)

@msiglreith msiglreith added the t: bug Something isn't working label Oct 28, 2020
@repi repi added t: enhancement A new feature or improvement to an existing one. and removed t: bug Something isn't working labels Oct 28, 2020
@repi
Copy link
Contributor

repi commented Oct 28, 2020

Interesting, thanks for filing!

Do you have any specific use case of OpenGL with SPIRV where Vulkan is not available / appropriate?

@msiglreith
Copy link
Contributor Author

Do you have any specific use case of OpenGL with SPIRV where Vulkan is not available / appropriate?

No, I mainly use OpenGL for trying out stuff, as it's easier to setup and iterate for me compared to Vulkan. Combining it with rust-gpu sounds appealing to me as it might make is even more pleasant in the future!

@Jasper-Bekkers
Copy link
Contributor

Keep in mind that in the future some of the features might require the Vulkan Memory Model.

@khyperia
Copy link
Contributor

and further context, those features will be disabled on non-Vulkan, the same way kernel-mode ops are disabled on shader-mode today.

@msiglreith
Copy link
Contributor Author

Thanks, works perfectly! 🎉
Ported a small shader I saw on shadertoy:
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: enhancement A new feature or improvement to an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants