cancel
Showing results for 
Search instead for 
Did you mean: 

OpenGL & Vulkan

BoyBaykiller
Adept II

GL_EXT_scalar_block_layout extension in OpenGL

 

Since driver release 22.7.1 the GL_EXT_scalar_block_layout extension can be enabled in GLSL for OpenGL. One part of this extension allows using the std430 layout for uniform blocks which works fine.

However when attempting to apply the more useful scalar layout on a shader storage block I am getting this compile error:

ERROR: 0:140: 'scalar' : only allowed when using GLSL for Vulkan

I understand that scalar layout is a Vulkan concept but it's part of this extension which can be enabled inside OpenGL-GLSL.

GL_EXT_scalar_block_layout requires GL_KHR_vulkan_glsl so technically it shouldn't even be exposed in OpenGL. I've noticed that with a bunch of Vulkan-GLSL extensions and I wonder if thats even intentionell.

 

Anyway, so my questions would be:

What is the reason for disallowing use of scalar layout on shader storage blocks in OpenGL in this extension?

In the future, since it makes life so much easier, can we get scalar layout for OpenGL by simply lifting this restriction?

0 Likes
1 Solution

Below is the feedback from the OpenGL team:

"

This qualifier is only available for Vulkan.

Extension spec mentions: ‘This extension requires the GL_KHR_vulkan_glsl extension’ and “Written against Vulkan 1.1 with the VK_EXT_scalar_block_layout extension.

Ref: https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_scalar_block_layout.txt

If this extension is enabled in OpenGL in the future, Khronos would create a new request, and someone will remove those limits both in spec and codes.

"

Thanks.

View solution in original post

6 Replies

I think AMD has no any reason to support this extension for OpenGL, because Vulkan more important. Try to use Vulkan.

0 Likes
dipak
Big Boss

Hi @BoyBaykiller ,

Thanks for reporting the above issue. I will forward it to the OpenGL team.

It would be helpful if you please share the setup information.

Thanks.

0 Likes

I have a RX 5700 XT running driver version 23.3.2.

0 Likes

Thanks for the information. I have reported the issue to the OpenGL team.

0 Likes

Below is the feedback from the OpenGL team:

"

This qualifier is only available for Vulkan.

Extension spec mentions: ‘This extension requires the GL_KHR_vulkan_glsl extension’ and “Written against Vulkan 1.1 with the VK_EXT_scalar_block_layout extension.

Ref: https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_scalar_block_layout.txt

If this extension is enabled in OpenGL in the future, Khronos would create a new request, and someone will remove those limits both in spec and codes.

"

Thanks.

Ok, I understand that the spec would need to be adjusted.

I wonder how GL_EXT_nonuniform_qualifier made it into OpenGL drivers then, because that also requires GL_KHR_vulkan_glsl and I can use the nonuniformEXT function without any compile errors. Anyone knows how?

Anyway, thank you for the response and I'll accept this as solution.

0 Likes