View Full Version : Running Cg Programs on the CPU
SoftwareGuy256
17-Feb-2007, 17:29
I looked at the sample declaration and I don't see anything special about it. Can someone explain how to run CG on the CPU?
Demirug
17-Feb-2007, 19:02
I have never heard that something like this is supported.
Anarchist4000
17-Feb-2007, 23:34
Cg or that CUDA emulator that was just recently released?
SoftwareGuy256
18-Feb-2007, 06:35
It's in the CG 1.5 manual near the middle. Personally I don't think that manual makes any sense.
Demirug
18-Feb-2007, 08:21
Look like I have overseen this so far.
The secret is not the Cg program itself. To run a Cg program on the CPU you first have to compile it with CG_PROFILE_GENERIC. Then you can pass the handle to your program to the cgEvaluateProgram function. This one is responsible to execute the program on the CPU. But the usage is limited as you can’t access any buffers for input and output only up to 4 elements of an vector.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.