I write a IL kernel in order to test the performance of 4870x2. cb0 is the loop number, and cb1 is a constant .
i hope it work as :
for(int i=0; i<loopnum; i++){
C = A * constant + B;}
but when i run this kernel, the system halt!!!why?
Windows xp 64bit
CAL 1.2
4870x2
thanks!
"il_ps_2_0\n"
"dcl_input_position_interp(linear_noperspective) vWinCoord0.xy__\n"
"dcl_output_generic o0\n"
"dcl_cb cb0[1]\n"
"dcl_cb cb1[1]\n"
"dcl_resource_id(0)_type(2d,unnorm)_fmtx(float)_fmty(float)_fmtz(float)_fmtw(float)\n"
"dcl_resource_id(1)_type(2d,unnorm)_fmtx(float)_fmty(float)_fmtz(float)_fmtw(float)\n"
"sample_resource(0)_sampler(0) r0, vWinCoord0\n"
"sample_resource(1)_sampler(1) r1, vWinCoord0\n"
"dcl_literal l0, 0x00000000, 0x00000000, 0x00000000, 0x00000000\n"
"mov r2.x___, l0\n"
"dcl_literal l1, 0x00000000, 0x00000000, 0x00000000, 0x00000000\n"
"mov r3, l1\n"
"whileloop\n"
" mad_ieee r3, cb1[0], r0, r1\n"
" ieq r5.x___, r2.x, cb0[0].x\n"
" break_logicalnz r5.x \n"
" dcl_literal l2, 0x00000001, 0x00000001, 0x00000001, 0x00000001\n"
" iadd r2.x___, r2.x, l2\n"
"endloop\n"
"mov o0, r3\n"
"ret_dyn\n"
"end\n";