Is there any wrong with the program?

Discussion created by lxp121 on Dec 3, 2008
Latest reply on Dec 3, 2008 by MicahVillmow

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





    "dcl_input_position_interp(linear_noperspective) vWinCoord0.xy__\n"
    "dcl_output_generic o0\n"
    "dcl_cb cb0[1]\n"
    "dcl_cb cb1[1]\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"
    "    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"
    "mov o0, r3\n"