Have added option to restrict a function to only certain modes
of the shader processor. For example the discard function is only
availble when creating a fragment shader.