-
Notifications
You must be signed in to change notification settings - Fork 355
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 bindless support for SPIR-V #304
Comments
glslc now supports -fauto-bind-uniforms, which automatically assigns bindings to uniform variables that don't have an explicit binding. An example integration test is in https://github.com/google/shaderc/blob/master/glslc/test/option_fauto_bind_uniforms.py Does this satisfy your need? |
I forgot you mentioned OpenGL. Use --target-env=opengl to target OpenGL. Example: x.vert is:
Then
You can see that my_buf has a DescriptorSet decoration, but no Binding decoration. Is that what you mean? |
I mean bindless textures |
Yes. Sorry I was confused. Shaderc depends on github.com/KhronosGroup/glslang for core compilation features for GLSL. So the functionality has to be added there. If I read glslang's test code, bindless textures are not supported. I see you already asked in that project, in KhronosGroup/glslang#497 In this case, the underlying functionality would have to be made available both in SPIR-V (what operations are used in SPIR-V), and in the target environment (does OpenGL with SPIR-V extensions support it; or does Vulkan support this). I believe there is no way in SPIR-V to produce an image object from a 64bit handle. So as describe in the glslang bug, first SPIR-V extension would need to be written to add that functionality, and a corresponding extension to the client API to enable that SPIR-V. |
I ask another question. How to bind array of 256 textures with different sizes and formats? |
I assume you mean for Vulkan? That's a Vulkan question. The closest thing would be a texture array, but those must share a common format. For example, see https://www.khronos.org/registry/vulkan/specs/misc/GL_KHR_vulkan_glsl.txt |
We preparing to support SPIR-V, but I want ask question. Will shaderc and SPV support bindless texture? When I tried to compile, I got errors that extension not support.
The text was updated successfully, but these errors were encountered: