-
Notifications
You must be signed in to change notification settings - Fork 248
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
Better legacy GLSL compatibility #42
Comments
I've met the same problem. And this works for me when I try to use it for es 300 in WebGL2 since Separate Shader Objects feature is not supported until 310. |
Thanks. I'll add your change. It looks like appending descriptor binding info into uniform names is a temporally workaround for extracting information. It can be replaced by a future reflection APIs. |
I have to remove the appending descriptor binding info into uniform names. Because the spv::Decoration::DecorationBinding is different on macOS. The test can't pass with it. |
A regression happens after update the SPIRV-Cross. The "in_var_xxx" is changed to "in.var.xxx". Need to adopt this change. |
…nges in SPIRV-Cross Related work item: Github #42
Is your feature request related to a problem? Please describe.
My engine supports GLES2 / WebGL1 in addition to newer OpenGL versions and Vulkan/DX12/Metal. By default, the shaders generated don't play well with the legacy GLSL versions. Since it's still a major target, I suggest some improvements & conventions to make it work out of the box.
Describe the solution you'd like
I suggest two improvements using SPRIVCross's shader reflection API:
Describe alternatives you've considered
The minor changes I propose should cover most of the use cases, but there might be a way to do this more generically with callbacks etc, although I feel it would go against the super streamlined design of ShaderConductor and would leak implementation details into user code.
Additional context
This is the code I'm using currently in ConvertBinary():
The text was updated successfully, but these errors were encountered: