Reputation: 256
I have an AMD Radeon RX 480, and I wrote a fragment shader (GLSL 4.6) that makes use of the GL_ARB_gpu_shader_fp64 extension;
According to the Database, my GPU should support the GL_ARB_gpu_shader_fp64 extension, but when I compile the shader with the glslangValidator.exe, I get:
'#extension' : extension not supported: GL_ARB_gpu_shader_fp64
Same thing happens to my other pc, that has an Intel Graphics HD 620 (That supports that extension, too).
Can someone explain me what's happening?
Upvotes: 1
Views: 1564
Reputation: 474506
When compiling GLSL using glslang into SPIR-V of any form, the available set of extensions does not care about the nature of the platform you are compiling on. After all, the whole point of an intermediate language is to be able to pre-compile your shader on one platform, then ship it in compiled form to the place where the user will execute it. That is when any extensions will be checked against the available set of extensions for that platform.
So basically, glslang assumes any extensions which could be valid for the target language are valid.
However, when compiling GLSL into SPIR-V for Vulkan consumption, the set of extensions that glslang is aware of are those extensions which are appropriate for Vulkan consumption. These extensions can be found in this GLSL Github repo. This set of extensions is specific to Vulkan.
Upvotes: 2