glsl: Index into ctx->Const.Program[] rather than using ad-hoc code.