3 Replies Latest reply on Jan 18, 2010 12:40 PM by hazeman

    IL compiler bug

      or am I missing something ?

      I belive the output from the following code should be

      R0 = (1.f,2.f,3.f,4.f) but for some strange reason I get  R0=(1.f,2.f,4.f,4.f). Is it a IL compiler bug ?

      PS. The IL code looks a little bit strange ( could be simpler ) because it's from IL generator i'm working on.

      PS2. Linux x64 + driver 9.12+fix

      il_cs_2_0 dcl_num_thread_per_group 128 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_literal l0, 0x0, 0x0, 0x0, 0x0 dcl_literal l3, 0x3f800000, 0x40000000, 0x0, 0x0 dcl_literal l2, 0x40400000, 0x40800000, 0x0, 0x0 dcl_literal l1, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff mov r1.x,cb0[0].z mov r3.x,cb0[0].y mov r5.x,cb0[0].x mov r6.xy,l2.xy mov r7.xy,l3.xy mov r10.x,l0.x mov r8.xy,r7.xy mov r8.zw,r6.xy mov r9,r8 mov g[r10.x],r9 end ShaderType = 3 TargetChip = w ;SC Dep components NumClauseTemps = 4 ; -------- Disassembly -------------------- 00 ALU: ADDR(32) CNT(6) 0 x: MOV R0.x, (0x3F800000, 1.0f).x y: MOV R0.y, (0x40000000, 2.0f).y z: MOV R0.z, (0x40800000, 4.0f).z w: MOV R0.w, (0x40800000, 4.0f).z 01 MEM_EXPORT_WRITE: DWORD_PTR[0], R0, ELEM_SIZE(3) VPM END_OF_PROGRAM

        • IL compiler bug

          Hi, hazeman

          The problem is here:

          mov r8.zw,r6.xy

          This instruction will be interpreted as

          mov r8.__zw, r6.xyyy

          This is an old bug in the shader compiler, old enough to be called as a feature.

          So use the following instruction:

          mov r8.__zw, r6.xyxy

          or even

          mov r8.zw, r6.xyxy


            • IL compiler bug

              OMG ? And for how long ATI can't fix it ?? This bug happens only with move or other instructions as well ( I think it doesn't happen with double instructions ) ?

              PS. Thank you for quick answer.

                • IL compiler bug

                  Ok I see how it works now. This kind of assignment is always in work, but usually it's not the problem due to the tricks in instructions output ( like double instructions copying result to xy and zw ).

                  Thank you again for quick response .