-
Notifications
You must be signed in to change notification settings - Fork 107
Add GL_EXT_relaxed_block_layout #295
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
base: main
Are you sure you want to change the base?
Add GL_EXT_relaxed_block_layout #295
Conversation
|
@gnl21 Could you take a look, please? If I've broken the established procedure for adding a new extension or if I don't have the rights to create an extension, please let me know. |
|
It's not clear to me what the goal of this extension is. I think scalar block layout is supported basically everywhere at this point, so why not just use that? |
|
Thanks for reply!
|
|
It's worth noting, though, that gpuinfo has VK_EXT_scalar_block_layout at 83% support. That will include older reports from devices that have been updated or are no longer in the wild, so the figure for current devices will be higher. I don't know about the range of implementations in the wild, but I'd be surprised if any performance penalty would make it worth implementing the extension, and it could be worked around by placing members using the offset decoration if needed. All of that doesn't take away from the extension's right to exist and one of the main blockers, having an implementation, is already clear. I guess the question is whether having this would make things more confusing for people looking at how to lay out their data when they might be better served by going straight to scalar layouts. |
I would agree, but it seems that you can't use any layout qualifiers, including (godbolt Example, SPIR-V output has the offsets)
I absolutely agree, scalar block layout is the most intuitive block layout. The relaxed block layout is a bit confusing, however the purpose of this extension is not to confuse, but rather to give developers the opportunity to use the most tightly packed block layout, provided that scalar block layout is not used due to possible performance degradation or lack of |


This extension is written to support
VK_KHR_relaxed_block_layoutVulkan extension. Currently there is onlyVK_EXT_scalar_block_layoutsupport -GL_EXT_scalar_block_layout. To correct this historical injustice, I present this extension.If GLSL Working Group approves this extension, then I will create a PR in glslang (link to fully working fork with the extension implementation).
The example of usage
GL_EXT_relaxed_block_layout: