PDA

View Full Version : Mesa3D, NVIDIA CG and OpenGL profiles vp40 fp40



Rayduxz
07-03-2017, 10:59 AM
Hello!

Does anyone knows if Mesa3D supports an app made with NVIDIA CG Toolkit 1.5 and OpenGL profiles vp40 fp40?

http://developer.download.nvidia.com/cg/Cg_1.5/1.5.0/Cg-1.5_ReleaseNotes.pdf

vp40 ARB_vertex_program + NV_vertex_program2 option
fp40 ARB_fragment_program + NV_fragment_program2 option

Those OpenGL profiles only works under NVIDIA cards, and I'm trying to use Mesa3D to make this app work under Intel and AMD (ATI).

So far I've tested it on an Intel HD Graphics (Braswell) and it gives a complete green screen, logs here: https://pastebin.com/dXTf97QE
No tests on AMD done yet.

Also tried Off-screen Rendering and no luck.

Any ideas?

Dark Photon
07-04-2017, 12:05 PM
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.

Rayduxz
07-04-2017, 01:27 PM
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_COMPRESSE D_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