ryta1203

Getting thread index from cs kernel

Discussion created by ryta1203 on Sep 15, 2009
Latest reply on Sep 16, 2009 by ryta1203

I'm trying to get the thread index from a cs kernel and put it into that index's address in the global buffer as follows:

Any ideas how to do this properly?

il_cs_2_0 dcl_num_thread_per_group 64 dcl_cb cb0[1] dcl_resource_id(0)_type(2d,unnorm)_fmtx(float)_fmty(float)_fmtz(float)_fmtw(float) dcl_resource_id(1)_type(2d,unnorm)_fmtx(float)_fmty(float)_fmtz(float)_fmtw(float) dcl_resource_id(2)_type(2d,unnorm)_fmtx(float)_fmty(float)_fmtz(float)_fmtw(float) mov g[vaTid.x], vAbsTidFlat.x ret_dyn end

Outcomes