I’m not at a computer with Cg installed right now, but my vague recollection is that Cg allows you to target some early ARB assembly profiles (such as the ones you mentioned), which should be supported by some non-NVidia GL drivers. However, the level of capability supported by these profiles is pretty basic.
Cg supports cross-compile of GLSL to assembly shaders. You might check the options to see if there’s any support for cross-compiling “to” GLSL. I doubt it, but that’s worth a double-check just to make sure you don’t have that option.
Also, Cg is fairly similar in syntax to GLSL. So it probably wouldn’t be too hard to hand-translate your Cg source to GLSL, which would be fairly universally portable.
I’m currently aware of everything you said above, the thing is to make it work compiled with the NVIDIA CG fp40 vp40 profiles on a Intel or AMD GPU so this is not an alternative.
The following error was fixed by loading S3TC in Mesa3D:
Mesa: User error: GL_INVALID_ENUM in glCompressedTexImage2D(internalFormat=GL_COMPRESSED_RGBA_S3TC_DXT1_EXT)
But these remains:
Mesa: 1 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glProgramString(bad program)
Mesa: User error: GL_INVALID_OPERATION in glProgramStringARB(invalid ARB fragment program option)
Mesa: 1 similar GL_INVALID_OPERATION errors
Mesa: User error: GL_INVALID_OPERATION in glProgramString(bad program)
Mesa: User error: GL_INVALID_OPERATION in glProgramStringARB(syntax error, unexpected $undefined, expecting ARBvp_10 or ARBfp_10)
Mesa: User error: GL_INVALID_OPERATION in glBegin(vertex program not valid)
Mesa: User error: GL_INVALID_OPERATION in glEnd