I’m using a somewhat complex shader that has a couple of overloaded functions, which should be legal as per the GLSL spec, however during shader compilation i have the following error:
ERROR: 0:200: error(#229) Overloaded functions must have the same return type: unsigned int
ERROR: 0:204: error(#229) Overloaded functions must have the same return type: uvec2
ERROR: 0:209: error(#229) Overloaded functions must have the same return type: uvec3
ERROR: 0:213: error(#229) Overloaded functions must have the same return type: uvec4
Has anybody encountered this problem before?
The problem arise only on my PC, a 2017 imac running windows 10 (dual boot) with a radeon pro 560 (driver updated).
The GLSL4.2 spec (p. 90) says:
Function names can be overloaded. The same function name can be used for multiple functions, as long as the parameter types differ. If a function name is declared twice with the same parameter types, then the return types and all qualifiers must also match, and it is the same function being declared.
Might this be a driver/compiler bug?