1 Reply Latest reply on Aug 7, 2009 5:21 AM by gaurav.garg

    Can I get the thread number in the kernel?



      After the .br file was complied by brcc, I find the code below in the generated .hlsl file


      struct csThreadInfo 

          int tid : SV_RelThreadId; 

          int atid : SV_AbsThreadId; 

          int gid : SV_ThreadGroupId; 




      main (csThreadInfo __threadInfo)


      int4 __indexof_c;

      int4 __indexofoutput;

      __indexofoutput = __getOutputIndex(__threadInfo.atid, __outputStreamShape, __outputBufferShape);

      __indexof_c = __indexofoutput;


      __indexof_c );



      Can I get the tid, atid, gid information in the kernel, written in Brook+?