GLSL icon indicating copy to clipboard operation
GLSL copied to clipboard

Operating on 8/16-bit data types inside compute shaders

Open emilmasoumi opened this issue 4 years ago • 3 comments

When enabling extensions that support 8-bit and 16-bit int and float data types in compute shaders, a warning is given that the respective extension is not supported in compute shaders and an error will be generated if any of its types or functions is used. What is the reason for not allowing these extensions in compute shaders particularly?

Such extensions are GL_EXT_shader_explicit_arithmetic_types and GL_EXT_shader_16bit_storage.

emilmasoumi avatar Jul 09 '20 18:07 emilmasoumi

You didn't specify where the warnings are coming from or if you are using GL or Vulkan, but those extension are AFAIK only supported for Vulkan via glslang.

dgkoch avatar Jul 09 '20 18:07 dgkoch

The warnings are from OpenGL when compiling the shader with glCompileShader. The specification specifies that the extensions can be applied to OpenGL GLSL.

emilmasoumi avatar Jul 09 '20 22:07 emilmasoumi

It possibly can apply to OpenGL, but it's only going to work if the implementation advertises the extension string, and I'm not aware of any implementations that do.

dgkoch avatar Jul 10 '20 01:07 dgkoch