Hi,
I have a question regarding GLSL and the composition of subroutines. What I mean by the composition is something like:
subroutine float ComputeShadow(vec3 pos, ...);
subroutine float ExtractDepth(sampler2d depthmap ...);
subroutine uniform ComputeShadow u_CurrentShadowStrategy;
subroutine uniform ExtractDepth u_CurrentExtractDepth;
...
[subroutine(ComputeShadow)]
float SoftShadowAlgorithm(vec3 pos ..)
{
...
float depth = u_CurrentExtractDepth( ...);
..
}
void main()
{
..
float shadow = u_CurrentShadowStrategy( ..);
}
Current drivers simply crash given this piece of code when linking program for the fragment stage. The specification doesn’t mention this usage and this use-case seems to be logical for me. Can anybody give me an advice, whether it is bug in the driver, or whether I use subroutines in a bad way?
I am developing on a Linux platform, the driver version is 331.20