Are the targets in calclCompile limited by the card in one's machine?

Discussion created by sgratton on Feb 1, 2011
Latest reply on Feb 9, 2011 by sgratton
Strange behaviour with Win 7 64-bit home premium, 4870, cal 11.1, vs2010 express


Hi there,


I've been trying to compile some shaders on a home machine with a 4870 in it using vs2010 express.  I know this is unsupported, but it works in many cases but fails in a strange way which leads me to suspect that the cause may be elsewhere.


If I compile a pixel shader with any target (770, CYPRESS, CAYMAN), things work fine.  But compute shaders will only compile with a 770 target.  See the attached code and try changing kern to/from test1/test2 and playing with the target.  Note I'm only compiling, not trying to run anything.

Has anybody else seen anything like this?  Is somehow the compiler implicitly being restricted by the driver installed on the machine?  Is this a bug?  Or is it something else and I am just unlikely?







#include <iostream> #include <calcl.h> using namespace std; const char test1[]="il_ps_2_0 \n" "end \n"; const char test2[]="il_cs_2_0 \n" "end \n"; void disp(const char* msg) { cout << msg; } int main() { CALuint version[3]; calclGetVersion(&version[0], &version[1], &version[2]); fprintf(stderr, "CAL Compiler version %d.%d.%d\n", version[0], version[1], version[2]); const char* kern=test2; //Nb. test1 is okay for all cal_targets... cout << endl << kern << endl; CALobject obj=NULL; CALresult err =calclCompile(&obj,CAL_LANGUAGE_IL,kern,CAL_TARGET_CYPRESS); cout << "Err: " << err << ", " << calclGetErrorString() << endl; CALimage img=NULL; calclLink(&img,&obj,1); calclDisassembleImage(img,disp); return 0; }