r300: Initial fragment program Using home directory: /home/jeff/.config/sauerbraten init: sdl init: net init: game init: video: mode init: video: misc init: gl Renderer: Gallium 0.4 on RV530 (X.Org R300 Project) Driver: 2.1 Mesa 7.10-devel Rendering using the OpenGL assembly/GLSL shader path. FRAG DCL IN[0], GENERIC[0], LINEAR DCL OUT[0], COLOR DCL SAMP[0] 0: TEX OUT[0], IN[0], SAMP[0], 2D 1: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: src0.xyz = temp[1], src0.w = temp[1] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1], input[0], 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], temp[0], 2D[0]; 2: src0.xyz = temp[2], src0.w = temp[2] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe402e400: src: 0 R/G/B/A dst: 2 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program init: console FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0] DCL TEMP[0] 0: TXP TEMP[0], IN[0], SAMP[0], 2D 1: MUL OUT[0].xyz, TEMP[0], CONST[0] 2: MOV OUT[0].w, CONST[0] 3: END Fragment Program: before compilation # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0].xyz, temp[0], const[0]; 2: MOV output[0].w, const[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: src0.xyz = temp[0], src1.xyz = const[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 2: src0.w = const[0] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TXP temp[0], input[0], 2D[0]; 2: src0.xyz = temp[0], src0.w = const[0], src1.xyz = const[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TXP temp[1], temp[0], 2D[0]; 2: src0.xyz = temp[1], src0.w = const[0], src1.xyz = const[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06c00000: id: 0 op:PROJ, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe401e400: src: 0 R/G/B/A dst: 1 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00040001:Addr0: 1t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000100:Addr0: 0c, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0] DCL TEMP[0] 0: TXP TEMP[0], IN[0], SAMP[0], 2D 1: MUL OUT[0], TEMP[0], CONST[0] 2: END Fragment Program: before compilation # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: MUL output[0], temp[0], const[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TXP temp[0], input[0], 2D[0]; 1: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = const[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TXP temp[0], input[0], 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = const[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TXP temp[1], temp[0], 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[0], src1.w = const[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06c00000: id: 0 op:PROJ, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe401e400: src: 0 R/G/B/A dst: 1 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00040001:Addr0: 1t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040001:Addr0: 1t, Addr1: 0c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program init: gl: effects FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: MUL OUT[0], IN[0], TEMP[0] 2: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], input[0], temp[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: src0.xyz = input[0], src0.w = input[0], src1.xyz = temp[0], src1.w = temp[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: src0.xyz = input[0], src0.w = input[0], src1.xyz = temp[0], src1.w = temp[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], temp[1], 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[2], src1.w = temp[2] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe402e401: src: 1 R/G/B/A dst: 2 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00000800:Addr0: 0t, Addr1: 2t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000800:Addr0: 0t, Addr1: 2t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program init: world init: sound init: cfg init: mainloop FRAG DCL IN[0], COLOR, LINEAR DCL OUT[0], COLOR 0: MOV OUT[0], IN[0] 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: src0.xyz = temp[0], src0.w = temp[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program attempting to connect to 109.73.51.58:10040 connected to server read map packages/base/venice.ogz (0.7 seconds) My own Venice - from GARCiA game mode is instagib team Instagib Team: You spawn with full rifle ammo and die instantly from one shot. There are no items. Frag the enemy team to score points for your team. connected: murdog connected: lucas connected: morgo connected: rapide connected: n00b|cheese connected: Earathon connected: poopsandwitch connected: 1400959 connected: S1rSt00p1d connected: zlyons connected: DaBesTwIZARD connected: bozco Welcome to vaQ clanserver Info: unnamed connected from United States Notice: Someone misbehaving? Let us know in #vaQ on irc.gamesurge.net or in our forum on our website: vaq-clan.de Earathon fragged n00b|cheese FRAG DCL IN[0], COLOR, PERSPECTIVE DCL OUT[0], COLOR 0: MOV OUT[0], IN[0] 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: src0.xyz = temp[0], src0.w = temp[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG 0: END Fragment Program: before compilation # Radeon Compiler Program Fragment Program: after 'rewrite depth out' # Radeon Compiler Program Fragment Program: after 'transform KILP' # Radeon Compiler Program Fragment Program: after 'unroll loops' # Radeon Compiler Program Fragment Program: after 'transform TEX' # Radeon Compiler Program Fragment Program: after 'native rewrite' # Radeon Compiler Program Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program Fragment Program: after 'dead constants' # Radeon Compiler Program Fragment Program: after 'pair translate' # Radeon Compiler Program Fragment Program: after 'pair scheduling' # Radeon Compiler Program Fragment Program: after 'dumb register allocation' # Radeon Compiler Program R500 Fragment Program: -------- 0 0:CMN_INST 0x00000005:OUT TEX_WAIT wmask: NONE omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..2] DCL TEMP[0..3] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[0], TEMP[0], CONST[0] 3: MUL_SAT TEMP[2], TEMP[0], TEMP[1] 4: MAD_SAT TEMP[3].x, IN[0].xxxx, CONST[1].xxxx, CONST[1].yyyy 5: LRP OUT[0].xyz, TEMP[3].xxxx, TEMP[2], CONST[2] 6: MOV OUT[0].w, TEMP[2] 7: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: ADD temp[4], temp[2], -const[2]; 6: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: ADD temp[4], temp[2], -const[2]; 6: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: ADD temp[4], temp[2], -const[2]; 6: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = const[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[2].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[2].w, src0.w, src1.w, src0.0 4: src0.xyz = input[0], src1.xyz = const[1] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy 5: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 6: src0.xyz = temp[3], src1.xyz = temp[4], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 7: src0.w = temp[2] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = const[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[2].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[2].w, src0.w, src1.w, src0.0 5: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 6: src0.xyz = input[0], src0.w = temp[2], src1.xyz = const[1] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 7: src0.xyz = temp[3], src1.xyz = temp[4], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[0], 2D[0]; 2: TEX temp[4], temp[1], 2D[1]; 3: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[0], src1.w = const[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[3].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[4], src1.w = temp[4] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[5].w, src0.w, src1.w, src0.0 5: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[2], src1.w = const[2] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[7].w, src0.w, src0.1, -src1.w 6: src0.xyz = temp[2], src0.w = temp[5], src1.xyz = const[1] MAD_SAT temp[6].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 7: src0.xyz = temp[6], src1.xyz = temp[7], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e400: src: 0 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040003:Addr0: 3t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040003:Addr0: 3t, Addr1: 0c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c030:MAD dest:3 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490030:MAD dest:3 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001003:Addr0: 3t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001003:Addr0: 3t, Addr1: 4t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c050:MAD dest:5 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21070:MAD dest:7 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 5 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125060:MAD dest:6 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 6 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10201c06:Addr0: 6t, Addr1: 7t, Addr2: 2c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[0] DCL CONST[2] DCL CONST[4..7] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: MUL_SAT TEMP[1].xyz, TEMP[6], TEMP[0] 26: MAD_SAT TEMP[9].x, IN[0].xxxx, CONST[6].xxxx, CONST[6].yyyy 27: LRP OUT[0].xyz, TEMP[9].xxxx, TEMP[1], CONST[7] 28: MOV OUT[0].w, TEMP[1] 29: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 27: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 28: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 27: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 28: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 27: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 28: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 27: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 28: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 27: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 28: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[10].w, temp[8].wwww; 20: MUL temp[10].w, temp[10].wwww, const[8].zzzz; 21: EX2 temp[8].w, temp[10].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 29: ADD temp[11], temp[1], -const[7]; 30: MAD output[0].xyz, temp[9].xxxx, temp[11], const[7]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[10].w, temp[8].wwww; 20: MUL temp[10].w, temp[10].wwww, const[8].zzzz; 21: EX2 temp[8].w, temp[10].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 29: ADD temp[11], temp[1], -const[7]; 30: MAD output[0].xyz, temp[9].xxxx, temp[11], const[7]; 31: MOV output[0].w, temp[1]; CONST[6] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[6].xxxx, -const[6].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[6].xxxx, -const[6].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[10].w, temp[8].wwww; 20: MUL temp[10].w, temp[10].wwww, const[6].zzzz; 21: EX2 temp[8].w, temp[10].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[9].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 29: ADD temp[11], temp[1], -const[5]; 30: MAD output[0].xyz, temp[9].xxxx, temp[11], const[5]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[10].w, src0.w 20: src0.xyz = const[6], src0.w = temp[10] MAD temp[10].w, src0.w, src0.z, src0.0 21: src0.w = temp[10] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = input[0], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy 29: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 30: src0.xyz = temp[9], src1.xyz = temp[11], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 31: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 7: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 11: src0.w = temp[8] RSQ temp[8].w, |src0.w| 12: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 13: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 14: BEGIN_TEX; 15: TEX temp[7], temp[5], 2D[3]; 16: TEX temp[6], temp[5], 2D[0]; 17: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 18: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 19: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 20: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 21: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[10].w, src0.w 22: src0.xyz = temp[0], src0.w = temp[10], src1.xyz = const[3], src2.xyz = const[6] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[10].w, src0.w, src2.z, src0.0 23: src0.w = temp[10] EX2 temp[8].w, src0.w 24: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 25: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 26: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 27: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 28: src0.xyz = temp[9], src1.xyz = temp[11], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[1], 2D[1]; 2: TEX temp[6], temp[1], 2D[2]; 3: TEX temp[8], temp[0], 2D[3]; 4: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[6] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[6].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 6: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[4] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[7].w, |src0.w| 7: src0.xyz = temp[2], src0.w = temp[7], src1.xyz = const[1], src1.w = temp[8] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 MAD temp[8].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[7], src0.w = temp[8], src1.xyz = temp[0], src1.w = temp[7], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src1.xyz MAD temp[9].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[6], src1.w = temp[6] MAD temp[12].xyz, src0.xyz, src0.111, src1.xyz MAD temp[12].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[12], src0.w = temp[12] DP3, src0.xyz, src0.xyz DP3 temp[12].w, src0.w, src0.w 11: src0.w = temp[12] RSQ temp[12].w, |src0.w| 12: src0.xyz = temp[12], src0.w = temp[12], src1.w = temp[4], src2.w = const[0] MAD temp[12].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[5].w, src1.w, src2.w, src0.0 13: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 14: BEGIN_TEX; 15: TEX temp[11], temp[9], 2D[3]; 16: TEX temp[10], temp[9], 2D[0]; 17: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 18: src0.xyz = temp[11], src1.xyz = const[6] MAD temp[11].xyz, src0.xyz, src1.xxx, -src1.yyy 19: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[11], src1.w = temp[11] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[12].w, src0.w, src1.w 20: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[6].xyz, src0.xyz, src1.xyz DP3_SAT temp[6].w, src0.w, src1.w 21: src0.xyz = temp[4], src0.w = temp[12], src1.xyz = temp[6] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[14].w, src0.w 22: src0.xyz = temp[4], src0.w = temp[14], src1.xyz = const[3], src2.xyz = const[6] MAX temp[4].xyz, src0.xyz, src1.xyz MAD temp[14].w, src0.w, src2.z, src0.0 23: src0.w = temp[14] EX2 temp[12].w, src0.w 24: src0.w = temp[12], src1.w = temp[10] MAD temp[12].w, src0.w, src1.w, src0.0 25: src0.xyz = const[2], src0.w = temp[12], src1.xyz = temp[10] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz 26: src0.xyz = temp[10], src1.xyz = temp[4] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src0.000 27: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[5], src1.w = const[5] MAD temp[15].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[15].w, src0.w, src0.1, -src1.w 28: src0.xyz = temp[13], src1.xyz = temp[15], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e400: src: 0 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925060:MAD dest:6 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041003:Addr0: 3t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250d0:MAD dest:13 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002007:Addr0: 7t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 9 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0cb:RSQ dest:12 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000100c:Addr0: 12t, Addr1: 4t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d050:MAD dest:5 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 12 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 16 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004180b:Addr0: 11t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 17 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000061:DP3 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001804:Addr0: 4t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c0e9:LN2 dest:14 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10640c04:Addr0: 4t, Addr1: 3c, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000045:MAX dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 21 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0c8:EX2 dest:12 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000280c:Addr0: 12t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 23 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002902:Addr0: 2c, Addr1: 10t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000100a:Addr0: 10t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210f0:MAD dest:15 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 26 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10503c0d:Addr0: 13t, Addr1: 15t, Addr2: 5c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..3] DCL TEMP[0..4] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: DPH_SAT TEMP[2].x, -IN[3], IN[3] 3: MAD TEMP[1].xyz, CONST[0], TEMP[2].xxxx, TEMP[1] 4: MUL TEMP[0], TEMP[0], CONST[1] 5: MUL_SAT TEMP[3], TEMP[0], TEMP[1] 6: MAD_SAT TEMP[4].x, IN[0].xxxx, CONST[2].xxxx, CONST[2].yyyy 7: LRP OUT[0].xyz, TEMP[4].xxxx, TEMP[3], CONST[3] 8: MOV OUT[0].w, TEMP[3] 9: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 8: MOV output[0].w, temp[3]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 8: MOV output[0].w, temp[3]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 8: MOV output[0].w, temp[3]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 8: MOV output[0].w, temp[3]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 8: MOV output[0].w, temp[3]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: ADD temp[5], temp[3], -const[3]; 8: MAD output[0].xyz, temp[4].xxxx, temp[5], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: ADD temp[5], temp[3], -const[3]; 8: MAD output[0].xyz, temp[4].xxxx, temp[5], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 7: ADD temp[5], temp[3], -const[3]; 8: MAD output[0].xyz, temp[4].xxxx, temp[5], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 3: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 6: src0.xyz = input[0], src1.xyz = const[2] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy 7: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[3], src1.w = const[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 8: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 9: src0.w = temp[3] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 7: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[3], src1.w = const[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 8: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[2] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 9: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[0], 2D[0]; 2: TEX temp[5], temp[1], 2D[1]; 3: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[1], src1.w = const[1] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[4].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[2], src0.w = temp[2] DP4_SAT temp[6].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[6], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = temp[5], src1.w = temp[5] MAD_SAT temp[7].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[7].w, src0.w, src1.w, src0.0 7: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[3], src1.w = const[3] MAD temp[9].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[9].w, src0.w, src0.1, -src1.w 8: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[2] MAD_SAT temp[8].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 9: src0.xyz = temp[8], src1.xyz = temp[9], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e400: src: 0 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000062:DP4 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00501900:Addr0: 0c, Addr1: 6t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001404:Addr0: 4t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001404:Addr0: 4t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c07:Addr0: 7t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c07:Addr0: 7t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21090:MAD dest:9 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 7 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040803:Addr0: 3t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125080:MAD dest:8 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 8 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10302408:Addr0: 8t, Addr1: 9t, Addr2: 3c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[0] DCL CONST[2] DCL CONST[4..8] DCL TEMP[0..10] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: MUL_SAT TEMP[1].xyz, TEMP[6], TEMP[0] 28: MAD_SAT TEMP[10].x, IN[0].xxxx, CONST[7].xxxx, CONST[7].yyyy 29: LRP OUT[0].xyz, TEMP[10].xxxx, TEMP[1], CONST[8] 30: MOV OUT[0].w, TEMP[1] 31: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL_SAT temp[1].xyz, temp[6], temp[0]; 30: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 31: ADD temp[12], temp[1], -const[8]; 32: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL_SAT temp[1].xyz, temp[6], temp[0]; 30: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 31: ADD temp[12], temp[1], -const[8]; 32: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 33: MOV output[0].w, temp[1]; CONST[7] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[7].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: MUL_SAT temp[1].xyz, temp[6], temp[0]; 30: MAD_SAT temp[10].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 31: ADD temp[12], temp[1], -const[6]; 32: MAD output[0].xyz, temp[10].xxxx, temp[12], const[6]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[11].w, src0.w 20: src0.xyz = const[7], src0.w = temp[11] MAD temp[11].w, src0.w, src0.z, src0.0 21: src0.w = temp[11] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = input[0], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy 31: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 32: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 33: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[7], temp[5], 2D[3]; 17: TEX temp[6], temp[5], 2D[0]; 18: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 20: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 21: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 22: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[11].w, src0.w 23: src0.xyz = temp[0], src0.w = temp[11], src1.xyz = const[3], src2.xyz = const[7] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[11].w, src0.w, src2.z, src0.0 24: src0.xyz = const[4], src0.w = temp[11], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 25: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 26: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 29: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[1]; 2: TEX temp[7], temp[1], 2D[2]; 3: TEX temp[9], temp[0], 2D[3]; 4: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[7].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[14].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 7: src0.xyz = temp[4], src0.w = temp[8], src1.xyz = const[5] MAD_SAT temp[15].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[8].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = const[1], src1.w = temp[9] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD temp[9].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[8], src0.w = temp[9], src1.xyz = temp[0], src1.w = temp[8], src2.w = temp[0] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz MAD temp[10].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] MAD temp[13].xyz, src0.xyz, src0.111, src1.xyz MAD temp[13].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[13], src0.w = temp[13] DP3, src0.xyz, src0.xyz DP3 temp[13].w, src0.w, src0.w 12: src0.w = temp[13] RSQ temp[13].w, |src0.w| 13: src0.xyz = temp[13], src0.w = temp[13], src1.w = temp[5], src2.w = const[0] MAD temp[13].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[6].w, src1.w, src2.w, src0.0 14: src0.w = temp[6] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[12], temp[10], 2D[3]; 17: TEX temp[11], temp[10], 2D[0]; 18: src0.xyz = temp[11], src1.xyz = const[0] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[12], src1.xyz = const[7] MAD temp[12].xyz, src0.xyz, src1.xxx, -src1.yyy 20: src0.xyz = temp[13], src0.w = temp[13], src1.xyz = temp[12], src1.w = temp[12] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[13].w, src0.w, src1.w 21: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT temp[7].xyz, src0.xyz, src1.xyz DP3_SAT temp[7].w, src0.w, src1.w 22: src0.xyz = temp[5], src0.w = temp[13], src1.xyz = temp[7] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[16].w, src0.w 23: src0.xyz = temp[5], src0.w = temp[16], src1.xyz = const[3], src2.xyz = const[7] MAX temp[5].xyz, src0.xyz, src1.xyz MAD temp[16].w, src0.w, src2.z, src0.0 24: src0.xyz = const[4], src0.w = temp[16], src1.xyz = temp[14], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[13].w, src0.w 25: src0.w = temp[13], src1.w = temp[11] MAD temp[13].w, src0.w, src1.w, src0.0 26: src0.xyz = const[2], src0.w = temp[13], src1.xyz = temp[11] MAD temp[11].xyz, src0.www, src0.xyz, src1.xyz 27: src0.xyz = temp[11], src1.xyz = temp[5] MAD_SAT temp[6].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[6], src1.w = const[6] MAD temp[17].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[17].w, src0.w, src0.1, -src1.w 29: src0.xyz = temp[15], src1.xyz = temp[17], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe409e400: src: 0 R/G/B/A dst: 9 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041c07:Addr0: 7t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925070:MAD dest:7 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000e2:DP4 dest:14 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041404:Addr0: 4t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c08b:RSQ dest:8 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250f0:MAD dest:15 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d090:MAD dest:9 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210d0:MAD dest:13 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0db:RSQ dest:13 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000140d:Addr0: 13t, Addr1: 5t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d060:MAD dest:6 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce40a: src: 10 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be40a: src: 10 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000b:Addr0: 11t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00041c0c:Addr0: 12t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250c0:MAD dest:12 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 18 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000071:DP3 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c05:Addr0: 5t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c109:LN2 dest:16 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10740c05:Addr0: 5t, Addr1: 3c, Addr2: 7c, srcp:0 2:ALPHA_ADDR 0x00000010:Addr0: 16t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c100:MAD dest:16 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000055:MAX dest:5 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00503904:Addr0: 4c, Addr1: 14t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000010:Addr0: 16t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0d8:EX2 dest:13 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0d:Addr0: 13t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 24 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002d02:Addr0: 2c, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210b0:MAD dest:11 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000140b:Addr0: 11t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c110:MAD dest:17 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21110:MAD dest:17 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 27 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1060440f:Addr0: 15t, Addr1: 17t, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..4] DCL TEMP[0..4] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: DPH_SAT TEMP[2].x, -IN[3], IN[3] 3: MAD TEMP[1].xyz, CONST[0], TEMP[2].xxxx, TEMP[1] 4: DPH_SAT TEMP[2].x, -IN[4], IN[4] 5: MAD TEMP[1].xyz, CONST[1], TEMP[2].xxxx, TEMP[1] 6: MUL TEMP[0], TEMP[0], CONST[2] 7: MUL_SAT TEMP[3], TEMP[0], TEMP[1] 8: MAD_SAT TEMP[4].x, IN[0].xxxx, CONST[3].xxxx, CONST[3].yyyy 9: LRP OUT[0].xyz, TEMP[4].xxxx, TEMP[3], CONST[4] 10: MOV OUT[0].w, TEMP[3] 11: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: ADD temp[5], temp[3], -const[4]; 10: MAD output[0].xyz, temp[4].xxxx, temp[5], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: ADD temp[5], temp[3], -const[4]; 10: MAD output[0].xyz, temp[4].xxxx, temp[5], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 9: ADD temp[5], temp[3], -const[4]; 10: MAD output[0].xyz, temp[4].xxxx, temp[5], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 3: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 4: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[1], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src1.w = const[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 8: src0.xyz = input[0], src1.xyz = const[3] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy 9: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[4], src1.w = const[4] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 10: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 11: src0.w = temp[3] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src1.w = const[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[1], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 9: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[4], src1.w = const[4] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 10: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[3] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 11: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[0], 2D[0]; 2: TEX temp[6], temp[1], 2D[1]; 3: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[2], src1.w = const[2] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[5].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[2], src0.w = temp[2] DP4_SAT temp[7].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[7], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[7].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = temp[6], src1.w = temp[6] MAD_SAT temp[8].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[8].w, src0.w, src1.w, src0.0 9: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = const[4], src1.w = const[4] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 10: src0.xyz = temp[4], src0.w = temp[8], src1.xyz = const[3] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 11: src0.xyz = temp[9], src1.xyz = temp[10], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e400: src: 0 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c050:MAD dest:5 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000072:DP4 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00601d00:Addr0: 0c, Addr1: 7t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000072:DP4 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00601d01:Addr0: 1c, Addr1: 7t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001805:Addr0: 5t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001805:Addr0: 5t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c080:MAD dest:8 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041008:Addr0: 8t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041008:Addr0: 8t, Addr1: 4c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210a0:MAD dest:10 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 9 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040c04:Addr0: 4t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125090:MAD dest:9 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10402809:Addr0: 9t, Addr1: 10t, Addr2: 4c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL IN[5], GENERIC[4], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..5] DCL TEMP[0..4] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: DPH_SAT TEMP[2].x, -IN[3], IN[3] 3: MAD TEMP[1].xyz, CONST[0], TEMP[2].xxxx, TEMP[1] 4: DPH_SAT TEMP[2].x, -IN[4], IN[4] 5: MAD TEMP[1].xyz, CONST[1], TEMP[2].xxxx, TEMP[1] 6: DPH_SAT TEMP[2].x, -IN[5], IN[5] 7: MAD TEMP[1].xyz, CONST[2], TEMP[2].xxxx, TEMP[1] 8: MUL TEMP[0], TEMP[0], CONST[3] 9: MUL_SAT TEMP[3], TEMP[0], TEMP[1] 10: MAD_SAT TEMP[4].x, IN[0].xxxx, CONST[4].xxxx, CONST[4].yyyy 11: LRP OUT[0].xyz, TEMP[4].xxxx, TEMP[3], CONST[5] 12: MOV OUT[0].w, TEMP[3] 13: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DPH_SAT temp[2].x, -input[5], input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: LRP output[0].xyz, temp[4].xxxx, temp[3], const[5]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DPH_SAT temp[2].x, -input[5], input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: LRP output[0].xyz, temp[4].xxxx, temp[3], const[5]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DPH_SAT temp[2].x, -input[5], input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: LRP output[0].xyz, temp[4].xxxx, temp[3], const[5]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DPH_SAT temp[2].x, -input[5], input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: LRP output[0].xyz, temp[4].xxxx, temp[3], const[5]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DPH_SAT temp[2].x, -input[5], input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: LRP output[0].xyz, temp[4].xxxx, temp[3], const[5]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DP4_SAT temp[2].x, input[5].-x-y-z1, input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: ADD temp[5], temp[3], -const[5]; 12: MAD output[0].xyz, temp[4].xxxx, temp[5], const[5]; 13: MOV output[0].w, temp[3]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DP4_SAT temp[2].x, input[5].-x-y-z1, input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: ADD temp[5], temp[3], -const[5]; 12: MAD output[0].xyz, temp[4].xxxx, temp[5], const[5]; 13: MOV output[0].w, temp[3]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: DP4_SAT temp[2].x, input[5].-x-y-z1, input[5]; 7: MAD temp[1].xyz, const[2], temp[2].xxxx, temp[1]; 8: MUL temp[0], temp[0], const[3]; 9: MUL_SAT temp[3], temp[0], temp[1]; 10: MAD_SAT temp[4].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 11: ADD temp[5], temp[3], -const[5]; 12: MAD output[0].xyz, temp[4].xxxx, temp[5], const[5]; 13: MOV output[0].w, temp[3]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 3: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 4: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[1], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[2], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 9: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 10: src0.xyz = input[0], src1.xyz = const[4] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy 11: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[5], src1.w = const[5] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 12: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 13: src0.w = temp[3] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[1], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 9: src0.xyz = const[2], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 11: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[5], src1.w = const[5] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 12: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[4] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 13: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[6], temp[0], 2D[0]; 2: TEX temp[7], temp[1], 2D[1]; 3: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[3], src1.w = const[3] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[6].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[2], src0.w = temp[2] DP4_SAT temp[8].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[8], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[8].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[1], src1.xyz = temp[8], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = temp[4], src0.w = temp[4] DP4_SAT temp[8].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 9: src0.xyz = const[2], src1.xyz = temp[8], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xxx, src2.xyz 10: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = temp[7], src1.w = temp[7] MAD_SAT temp[9].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[9].w, src0.w, src1.w, src0.0 11: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = const[5], src1.w = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 12: src0.xyz = temp[5], src0.w = temp[9], src1.xyz = const[4] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 13: src0.xyz = temp[10], src1.xyz = temp[11], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e400: src: 0 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c06:Addr0: 6t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c06:Addr0: 6t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000082:DP4 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00702100:Addr0: 0c, Addr1: 8t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000082:DP4 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00702101:Addr0: 1c, Addr1: 8t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000082:DP4 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 8 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00702102:Addr0: 2c, Addr1: 8t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 9 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c06:Addr0: 6t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c06:Addr0: 6t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041409:Addr0: 9t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041409:Addr0: 9t, Addr1: 5c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0b0:MAD dest:11 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210b0:MAD dest:11 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 11 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00041005:Addr0: 5t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x201250a0:MAD dest:10 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 12 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10502c0a:Addr0: 10t, Addr1: 11t, Addr2: 5c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..8] DCL TEMP[0..10] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 26: TEX TEMP[9], TEMP[5], SAMP[4], 2D 27: MAD_SAT TEMP[1].xyz, TEMP[9], CONST[6], TEMP[6] 28: MAD_SAT TEMP[10].x, IN[0].xxxx, CONST[7].xxxx, CONST[7].yyyy 29: LRP OUT[0].xyz, TEMP[10].xxxx, TEMP[1], CONST[8] 30: MOV OUT[0].w, TEMP[1] 31: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 29: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 30: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[9], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 30: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 31: ADD temp[12], temp[1], -const[8]; 32: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[9], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 30: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 31: ADD temp[12], temp[1], -const[8]; 32: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 33: MOV output[0].w, temp[1]; CONST[7] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[7].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[9], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[9], const[4], temp[6]; 30: MAD_SAT temp[10].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 31: ADD temp[12], temp[1], -const[6]; 32: MAD output[0].xyz, temp[10].xxxx, temp[12], const[6]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[11].w, src0.w 20: src0.xyz = const[7], src0.w = temp[11] MAD temp[11].w, src0.w, src0.z, src0.0 21: src0.w = temp[11] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 28: TEX temp[9], temp[5], 2D[4]; 29: src0.xyz = temp[9], src1.xyz = const[4], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 30: src0.xyz = input[0], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy 31: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 32: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 33: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 7: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 11: src0.w = temp[8] RSQ temp[8].w, |src0.w| 12: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 13: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 14: BEGIN_TEX; 15: TEX temp[9], temp[5], 2D[4]; 16: TEX temp[7], temp[5], 2D[3]; 17: TEX temp[6], temp[5], 2D[0]; 18: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 20: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 21: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 22: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[11].w, src0.w 23: src0.xyz = temp[0], src0.w = temp[11], src1.xyz = const[3], src2.xyz = const[7] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[11].w, src0.w, src2.z, src0.0 24: src0.w = temp[11] EX2 temp[8].w, src0.w 25: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 26: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[9], src1.xyz = const[4], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 29: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 30: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[1], 2D[1]; 2: TEX temp[6], temp[1], 2D[2]; 3: TEX temp[8], temp[0], 2D[3]; 4: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[7] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[6].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 6: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[5] MAD_SAT temp[14].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[7].w, |src0.w| 7: src0.xyz = temp[2], src0.w = temp[7], src1.xyz = const[1], src1.w = temp[8] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 MAD temp[8].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[7], src0.w = temp[8], src1.xyz = temp[0], src1.w = temp[7], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src1.xyz MAD temp[9].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[6], src1.w = temp[6] MAD temp[12].xyz, src0.xyz, src0.111, src1.xyz MAD temp[12].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[12], src0.w = temp[12] DP3, src0.xyz, src0.xyz DP3 temp[12].w, src0.w, src0.w 11: src0.w = temp[12] RSQ temp[12].w, |src0.w| 12: src0.xyz = temp[12], src0.w = temp[12], src1.w = temp[4], src2.w = const[0] MAD temp[12].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[5].w, src1.w, src2.w, src0.0 13: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 14: BEGIN_TEX; 15: TEX temp[13], temp[9], 2D[4]; 16: TEX temp[11], temp[9], 2D[3]; 17: TEX temp[10], temp[9], 2D[0]; 18: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[11], src1.xyz = const[7] MAD temp[11].xyz, src0.xyz, src1.xxx, -src1.yyy 20: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[11], src1.w = temp[11] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[12].w, src0.w, src1.w 21: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[6].xyz, src0.xyz, src1.xyz DP3_SAT temp[6].w, src0.w, src1.w 22: src0.xyz = temp[4], src0.w = temp[12], src1.xyz = temp[6] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[15].w, src0.w 23: src0.xyz = temp[4], src0.w = temp[15], src1.xyz = const[3], src2.xyz = const[7] MAX temp[4].xyz, src0.xyz, src1.xyz MAD temp[15].w, src0.w, src2.z, src0.0 24: src0.w = temp[15] EX2 temp[12].w, src0.w 25: src0.w = temp[12], src1.w = temp[10] MAD temp[12].w, src0.w, src1.w, src0.0 26: src0.xyz = const[2], src0.w = temp[12], src1.xyz = temp[10] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz 27: src0.xyz = temp[10], src1.xyz = temp[4] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[13], src1.xyz = const[4], src2.xyz = temp[10] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 29: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[6], src1.w = const[6] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 30: src0.xyz = temp[14], src1.xyz = temp[16], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e400: src: 0 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041c06:Addr0: 6t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925060:MAD dest:6 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041403:Addr0: 3t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250e0:MAD dest:14 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002007:Addr0: 7t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 9 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0cb:RSQ dest:12 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000100c:Addr0: 12t, Addr1: 4t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d050:MAD dest:5 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 12 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40de409: src: 9 R/G/B/A dst: 13 R/G/B/A 3:TEX_DXDY: 0x00000000 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00041c0b:Addr0: 11t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 18 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000061:DP3 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001804:Addr0: 4t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c0f9:LN2 dest:15 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10740c04:Addr0: 4t, Addr1: 3c, Addr2: 7c, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000045:MAX dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 22 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0c8:EX2 dest:12 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000280c:Addr0: 12t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 24 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002902:Addr0: 2c, Addr1: 10t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000100a:Addr0: 10t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00a4100d:Addr0: 13t, Addr1: 4c, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041805:Addr0: 5t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041805:Addr0: 5t, Addr1: 6c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c100:MAD dest:16 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21100:MAD dest:16 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 28 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1060400e:Addr0: 14t, Addr1: 16t, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2..6] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 15: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 16: MAX TEMP[0].xyz, TEMP[0], CONST[3] 17: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 18: TEX TEMP[8], TEMP[5], SAMP[4], 2D 19: MAD_SAT TEMP[1].xyz, TEMP[8], CONST[4], TEMP[6] 20: MAD_SAT TEMP[9].x, IN[0].xxxx, CONST[5].xxxx, CONST[5].yyyy 21: LRP OUT[0].xyz, TEMP[9].xxxx, TEMP[1], CONST[6] 22: MOV OUT[0].w, TEMP[1] 23: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 22: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 22: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 22: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 22: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 22: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: ADD temp[10], temp[1], -const[6]; 22: MAD output[0].xyz, temp[9].xxxx, temp[10], const[6]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 21: ADD temp[10], temp[1], -const[6]; 22: MAD output[0].xyz, temp[9].xxxx, temp[10], const[6]; 23: MOV output[0].w, temp[1]; CONST[6] = { 2.0000 1.0000 0.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[6].xxxx, -const[6].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[6].xxxx, -const[6].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[2]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[3], temp[6]; 20: MAD_SAT temp[9].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 21: ADD temp[10], temp[1], -const[5]; 22: MAD output[0].xyz, temp[9].xxxx, temp[10], const[5]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 15: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[0], src1.xyz = const[2] MAX temp[0].xyz, src0.xyz, src1.xyz 17: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 18: TEX temp[8], temp[5], 2D[4]; 19: src0.xyz = temp[8], src1.xyz = const[3], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 20: src0.xyz = input[0], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy 21: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 22: src0.xyz = temp[9], src1.xyz = temp[10], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 23: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 7: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 9: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 10: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 11: BEGIN_TEX; 12: TEX temp[8], temp[5], 2D[4]; 13: TEX temp[7], temp[5], 2D[3]; 14: TEX temp[6], temp[5], 2D[0]; 15: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 17: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 18: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[0], src1.xyz = const[2] MAX temp[0].xyz, src0.xyz, src1.xyz 20: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[8], src1.xyz = const[3], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 22: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 23: src0.xyz = temp[9], src1.xyz = temp[10], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[1], 2D[1]; 2: TEX temp[6], temp[1], 2D[2]; 3: TEX temp[8], temp[0], 2D[3]; 4: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[6] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[6].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 6: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[4] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[7].w, |src0.w| 7: src0.xyz = temp[2], src0.w = temp[7], src1.xyz = const[1], src1.w = temp[8] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 MAD temp[8].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[7], src0.w = temp[8], src1.xyz = temp[0], src1.w = temp[7], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src1.xyz MAD temp[9].w, src0.w, src1.w, src2.w 9: src0.w = temp[4], src1.w = const[0] MAD_SAT temp[5].w, src0.w, src1.w, src0.0 10: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 11: BEGIN_TEX; 12: TEX temp[12], temp[9], 2D[4]; 13: TEX temp[11], temp[9], 2D[3]; 14: TEX temp[10], temp[9], 2D[0]; 15: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[11], src1.xyz = const[6] MAD temp[11].xyz, src0.xyz, src1.xxx, -src1.yyy 17: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[6].xyz, src0.xyz, src1.xyz DP3_SAT temp[6].w, src0.w, src1.w 18: src0.xyz = temp[4], src1.xyz = temp[6] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[4], src1.xyz = const[2] MAX temp[4].xyz, src0.xyz, src1.xyz 20: src0.xyz = temp[10], src1.xyz = temp[4] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[12], src1.xyz = const[3], src2.xyz = temp[10] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 22: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[5], src1.w = const[5] MAD temp[14].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[14].w, src0.w, src0.1, -src1.w 23: src0.xyz = temp[13], src1.xyz = temp[14], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e400: src: 0 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925060:MAD dest:6 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041003:Addr0: 3t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250d0:MAD dest:13 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002007:Addr0: 7t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 8 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040004:Addr0: 4t, Addr1: 0c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c050:MAD dest:5 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 9 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce409: src: 9 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 11 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 12 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 13 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 14 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004180b:Addr0: 11t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 15 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000061:DP3 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 16 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00001804:Addr0: 4t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00040804:Addr0: 4t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000045:MAX dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000100a:Addr0: 10t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00a40c0c:Addr0: 12t, Addr1: 3c, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210e0:MAD dest:14 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 21 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1050380d:Addr0: 13t, Addr1: 14t, Addr2: 5c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..9] DCL TEMP[0..11] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 28: TEX TEMP[10], TEMP[5], SAMP[4], 2D 29: MAD_SAT TEMP[1].xyz, TEMP[10], CONST[7], TEMP[6] 30: MAD_SAT TEMP[11].x, IN[0].xxxx, CONST[8].xxxx, CONST[8].yyyy 31: LRP OUT[0].xyz, TEMP[11].xxxx, TEMP[1], CONST[9] 32: MOV OUT[0].w, TEMP[1] 33: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 31: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 31: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 31: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 31: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 31: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[10].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 33: ADD temp[13], temp[1], -const[9]; 34: MAD output[0].xyz, temp[11].xxxx, temp[13], const[9]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[10].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 33: ADD temp[13], temp[1], -const[9]; 34: MAD output[0].xyz, temp[11].xxxx, temp[13], const[9]; 35: MOV output[0].w, temp[1]; CONST[8] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[8].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[5], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 33: ADD temp[13], temp[1], -const[7]; 34: MAD output[0].xyz, temp[11].xxxx, temp[13], const[7]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[8] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[8] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[12].w, src0.w 20: src0.xyz = const[8], src0.w = temp[12] MAD temp[12].w, src0.w, src0.z, src0.0 21: src0.w = temp[12] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 30: TEX temp[10], temp[5], 2D[4]; 31: src0.xyz = temp[10], src1.xyz = const[5], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 32: src0.xyz = input[0], src1.xyz = const[6] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy 33: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[7], src1.w = const[7] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 34: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 35: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[8] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[6] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[10], temp[5], 2D[4]; 17: TEX temp[7], temp[5], 2D[3]; 18: TEX temp[6], temp[5], 2D[0]; 19: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[7], src1.xyz = const[8] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 22: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 23: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[12].w, src0.w 24: src0.xyz = temp[0], src0.w = temp[12], src1.xyz = const[3], src2.xyz = const[8] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[12].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[12], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 26: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 27: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 28: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[10], src1.xyz = const[5], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 30: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[7], src1.w = const[7] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 31: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[1]; 2: TEX temp[7], temp[1], 2D[2]; 3: TEX temp[9], temp[0], 2D[3]; 4: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[8] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[7].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[14].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 7: src0.xyz = temp[4], src0.w = temp[8], src1.xyz = const[6] MAD_SAT temp[16].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[8].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = const[1], src1.w = temp[9] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD temp[9].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[8], src0.w = temp[9], src1.xyz = temp[0], src1.w = temp[8], src2.w = temp[0] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz MAD temp[10].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] MAD temp[13].xyz, src0.xyz, src0.111, src1.xyz MAD temp[13].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[13], src0.w = temp[13] DP3, src0.xyz, src0.xyz DP3 temp[13].w, src0.w, src0.w 12: src0.w = temp[13] RSQ temp[13].w, |src0.w| 13: src0.xyz = temp[13], src0.w = temp[13], src1.w = temp[5], src2.w = const[0] MAD temp[13].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[6].w, src1.w, src2.w, src0.0 14: src0.w = temp[6] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[15], temp[10], 2D[4]; 17: TEX temp[12], temp[10], 2D[3]; 18: TEX temp[11], temp[10], 2D[0]; 19: src0.xyz = temp[11], src1.xyz = const[0] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[12], src1.xyz = const[8] MAD temp[12].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[13], src0.w = temp[13], src1.xyz = temp[12], src1.w = temp[12] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[13].w, src0.w, src1.w 22: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT temp[7].xyz, src0.xyz, src1.xyz DP3_SAT temp[7].w, src0.w, src1.w 23: src0.xyz = temp[5], src0.w = temp[13], src1.xyz = temp[7] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[17].w, src0.w 24: src0.xyz = temp[5], src0.w = temp[17], src1.xyz = const[3], src2.xyz = const[8] MAX temp[5].xyz, src0.xyz, src1.xyz MAD temp[17].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[17], src1.xyz = temp[14], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[13].w, src0.w 26: src0.w = temp[13], src1.w = temp[11] MAD temp[13].w, src0.w, src1.w, src0.0 27: src0.xyz = const[2], src0.w = temp[13], src1.xyz = temp[11] MAD temp[11].xyz, src0.www, src0.xyz, src1.xyz 28: src0.xyz = temp[11], src1.xyz = temp[5] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[15], src1.xyz = const[5], src2.xyz = temp[11] MAD_SAT temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 30: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[7], src1.w = const[7] MAD temp[18].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[18].w, src0.w, src0.1, -src1.w 31: src0.xyz = temp[16], src1.xyz = temp[18], src2.xyz = const[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe409e400: src: 0 R/G/B/A dst: 9 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042007:Addr0: 7t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925070:MAD dest:7 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000e2:DP4 dest:14 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041804:Addr0: 4t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c08b:RSQ dest:8 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125100:MAD dest:16 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d090:MAD dest:9 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210d0:MAD dest:13 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0db:RSQ dest:13 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000140d:Addr0: 13t, Addr1: 5t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d060:MAD dest:6 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40fe40a: src: 10 R/G/B/A dst: 15 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce40a: src: 10 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be40a: src: 10 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000b:Addr0: 11t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004200c:Addr0: 12t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250c0:MAD dest:12 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 19 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000071:DP3 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c05:Addr0: 5t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c119:LN2 dest:17 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10840c05:Addr0: 5t, Addr1: 3c, Addr2: 8c, srcp:0 2:ALPHA_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c110:MAD dest:17 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000055:MAX dest:5 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 23 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00503904:Addr0: 4c, Addr1: 14t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0d8:EX2 dest:13 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0d:Addr0: 13t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 25 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002d02:Addr0: 2c, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210b0:MAD dest:11 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000140b:Addr0: 11t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00b4140f:Addr0: 15t, Addr1: 5c, Addr2: 11t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041c06:Addr0: 6t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041c06:Addr0: 6t, Addr1: 7c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c120:MAD dest:18 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21120:MAD dest:18 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 29 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10704810:Addr0: 16t, Addr1: 18t, Addr2: 7c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL IN[5], GENERIC[4], PERSPECTIVE DCL IN[6], GENERIC[5], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..11] DCL TEMP[0..11] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: DPH_SAT TEMP[9].x, -IN[5], IN[5] 28: MAD TEMP[0].xyz, CONST[7], TEMP[9].xxxx, TEMP[0] 29: DPH_SAT TEMP[9].x, -IN[6], IN[6] 30: MAD TEMP[0].xyz, CONST[8], TEMP[9].xxxx, TEMP[0] 31: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 32: TEX TEMP[10], TEMP[5], SAMP[4], 2D 33: MAD_SAT TEMP[1].xyz, TEMP[10], CONST[9], TEMP[6] 34: MAD_SAT TEMP[11].x, IN[0].xxxx, CONST[10].xxxx, CONST[10].yyyy 35: LRP OUT[0].xyz, TEMP[11].xxxx, TEMP[1], CONST[11] 36: MOV OUT[0].w, TEMP[1] 37: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[12].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: DPH_SAT temp[9].x, -input[6], input[6]; 30: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 35: LRP output[0].xyz, temp[11].xxxx, temp[1], const[11]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[12].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: DPH_SAT temp[9].x, -input[6], input[6]; 30: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 35: LRP output[0].xyz, temp[11].xxxx, temp[1], const[11]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[12].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: DPH_SAT temp[9].x, -input[6], input[6]; 30: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 35: LRP output[0].xyz, temp[11].xxxx, temp[1], const[11]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[12].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: DPH_SAT temp[9].x, -input[6], input[6]; 30: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 35: LRP output[0].xyz, temp[11].xxxx, temp[1], const[11]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[12].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: DPH_SAT temp[9].x, -input[6], input[6]; 30: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 35: LRP output[0].xyz, temp[11].xxxx, temp[1], const[11]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[12].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 31: DP4_SAT temp[9].x, input[6].-x-y-z1, input[6]; 32: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 33: MUL temp[6].xyz, temp[6], temp[0]; 34: TEX temp[10], temp[5], 2D[4]; 35: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 36: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 37: ADD temp[13], temp[1], -const[11]; 38: MAD output[0].xyz, temp[11].xxxx, temp[13], const[11]; 39: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[12].xxxx, -const[12].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[12].xxxx, -const[12].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[12].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 31: DP4_SAT temp[9].x, input[6].-x-y-z1, input[6]; 32: MAD temp[0].xyz, const[8], temp[9].xxxx, temp[0]; 33: MUL temp[6].xyz, temp[6], temp[0]; 34: TEX temp[10], temp[5], 2D[4]; 35: MAD_SAT temp[1].xyz, temp[10], const[9], temp[6]; 36: MAD_SAT temp[11].x, input[0].xxxx, const[10].xxxx, const[10].yyyy; 37: ADD temp[13], temp[1], -const[11]; 38: MAD output[0].xyz, temp[11].xxxx, temp[13], const[11]; 39: MOV output[0].w, temp[1]; CONST[10] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[10].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[5], temp[9].xxxx, temp[0]; 31: DP4_SAT temp[9].x, input[6].-x-y-z1, input[6]; 32: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 33: MUL temp[6].xyz, temp[6], temp[0]; 34: TEX temp[10], temp[5], 2D[4]; 35: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 36: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 37: ADD temp[13], temp[1], -const[9]; 38: MAD output[0].xyz, temp[11].xxxx, temp[13], const[9]; 39: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[10] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[10] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[12].w, src0.w 20: src0.xyz = const[10], src0.w = temp[12] MAD temp[12].w, src0.w, src0.z, src0.0 21: src0.w = temp[12] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 30: src0.xyz = const[5], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = input[6], src0.w = input[6] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 32: src0.xyz = const[6], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 33: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 34: TEX temp[10], temp[5], 2D[4]; 35: src0.xyz = temp[10], src1.xyz = const[7], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 36: src0.xyz = input[0], src1.xyz = const[8] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy 37: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[9], src1.w = const[9] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 38: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[9] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 39: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[10] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[8] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[10], temp[5], 2D[4]; 17: TEX temp[7], temp[5], 2D[3]; 18: TEX temp[6], temp[5], 2D[0]; 19: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[7], src1.xyz = const[10] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 22: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 23: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[12].w, src0.w 24: src0.xyz = temp[0], src0.w = temp[12], src1.xyz = const[3], src2.xyz = const[10] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[12].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[12], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 26: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 27: src0.xyz = const[5], src0.w = temp[8], src1.xyz = temp[9], src1.w = temp[6], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[8].w, src0.w, src1.w, src0.0 28: src0.xyz = input[6], src0.w = input[6] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 29: src0.xyz = const[6], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 30: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 31: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 32: src0.xyz = temp[10], src1.xyz = const[7], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 33: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[9], src1.w = const[9] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 34: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[9] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[7], temp[1], 2D[1]; 2: TEX temp[9], temp[1], 2D[2]; 3: TEX temp[11], temp[0], 2D[3]; 4: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = const[10] MAD temp[9].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[9].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[16].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[10].w, src0.w, src0.w 7: src0.xyz = temp[6], src0.w = temp[10], src1.xyz = const[8] MAD_SAT temp[18].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[10].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[10], src1.xyz = const[1], src1.w = temp[11] MAD temp[10].xyz, src0.www, src0.xyz, src0.000 MAD temp[11].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[10], src0.w = temp[11], src1.xyz = temp[0], src1.w = temp[10], src2.w = temp[0] MAD temp[12].xyz, src0.www, src0.xyz, src1.xyz MAD temp[12].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[10], src0.w = temp[10], src1.xyz = temp[9], src1.w = temp[9] MAD temp[15].xyz, src0.xyz, src0.111, src1.xyz MAD temp[15].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[15], src0.w = temp[15] DP3, src0.xyz, src0.xyz DP3 temp[15].w, src0.w, src0.w 12: src0.w = temp[15] RSQ temp[15].w, |src0.w| 13: src0.xyz = temp[15], src0.w = temp[15], src1.w = temp[7], src2.w = const[0] MAD temp[15].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[8].w, src1.w, src2.w, src0.0 14: src0.w = temp[8] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[17], temp[12], 2D[4]; 17: TEX temp[14], temp[12], 2D[3]; 18: TEX temp[13], temp[12], 2D[0]; 19: src0.xyz = temp[13], src1.xyz = const[0] MAD temp[13].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[14], src1.xyz = const[10] MAD temp[14].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[15], src0.w = temp[15], src1.xyz = temp[14], src1.w = temp[14] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[15].w, src0.w, src1.w 22: src0.xyz = temp[14], src0.w = temp[14], src1.xyz = temp[9], src1.w = temp[9] DP3_SAT temp[9].xyz, src0.xyz, src1.xyz DP3_SAT temp[9].w, src0.w, src1.w 23: src0.xyz = temp[7], src0.w = temp[15], src1.xyz = temp[9] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[19].w, src0.w 24: src0.xyz = temp[7], src0.w = temp[19], src1.xyz = const[3], src2.xyz = const[10] MAX temp[7].xyz, src0.xyz, src1.xyz MAD temp[19].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[19], src1.xyz = temp[16], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[15].w, src0.w 26: src0.xyz = temp[4], src0.w = temp[4] DP4_SAT temp[16].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 27: src0.xyz = const[5], src0.w = temp[15], src1.xyz = temp[16], src1.w = temp[13], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[15].w, src0.w, src1.w, src0.0 28: src0.xyz = temp[5], src0.w = temp[5] DP4_SAT temp[16].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 29: src0.xyz = const[6], src1.xyz = temp[16], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xxx, src2.xyz 30: src0.xyz = const[2], src0.w = temp[15], src1.xyz = temp[13] MAD temp[13].xyz, src0.www, src0.xyz, src1.xyz 31: src0.xyz = temp[13], src1.xyz = temp[7] MAD temp[13].xyz, src0.xyz, src1.xyz, src0.000 32: src0.xyz = temp[17], src1.xyz = const[7], src2.xyz = temp[13] MAD_SAT temp[8].xyz, src0.xyz, src1.xyz, src2.xyz 33: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = const[9], src1.w = const[9] MAD temp[20].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[20].w, src0.w, src0.1, -src1.w 34: src0.xyz = temp[18], src1.xyz = temp[20], src2.xyz = const[9] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe409e401: src: 1 R/G/B/A dst: 9 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be400: src: 0 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042809:Addr0: 9t, Addr1: 10c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925090:MAD dest:9 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000102:DP4 dest:16 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0a1:DP dest:10 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00042006:Addr0: 6t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0ab:RSQ dest:10 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125120:MAD dest:18 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0a:Addr0: 10t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d0b0:MAD dest:11 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a4900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000280b:Addr0: 11t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000240a:Addr0: 10t, Addr1: 9t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000240a:Addr0: 10t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210f0:MAD dest:15 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0f1:DP dest:15 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0fb:RSQ dest:15 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x10001c0f:Addr0: 15t, Addr1: 7t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900f0:MAD dest:15 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe411e40c: src: 12 R/G/B/A dst: 17 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ee40c: src: 12 R/G/B/A dst: 14 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40de40c: src: 12 R/G/B/A dst: 13 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000d:Addr0: 13t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004280e:Addr0: 14t, Addr1: 10c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250e0:MAD dest:14 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 19 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000380f:Addr0: 15t, Addr1: 14t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000380f:Addr0: 15t, Addr1: 14t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0f1:DP dest:15 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000240e:Addr0: 14t, Addr1: 9t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000240e:Addr0: 14t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c091:DP dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000091:DP3 dest:9 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00002407:Addr0: 7t, Addr1: 9t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c139:LN2 dest:19 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10a40c07:Addr0: 7t, Addr1: 3c, Addr2: 10c, srcp:0 2:ALPHA_ADDR 0x00000013:Addr0: 19t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c130:MAD dest:19 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000075:MAX dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 23 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00704104:Addr0: 4c, Addr1: 16t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000013:Addr0: 19t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0f8:EX2 dest:15 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000102:DP4 dest:16 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00704105:Addr0: 5c, Addr1: 16t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x0000340f:Addr0: 15t, Addr1: 13t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 26 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000102:DP4 dest:16 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00704106:Addr0: 6c, Addr1: 16t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00003502:Addr0: 2c, Addr1: 13t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210d0:MAD dest:13 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 29 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00001c0d:Addr0: 13t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 30 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00d41c11:Addr0: 17t, Addr1: 7c, Addr2: 13t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222080:MAD dest:8 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 31 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042408:Addr0: 8t, Addr1: 9c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00042408:Addr0: 8t, Addr1: 9c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c140:MAD dest:20 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21140:MAD dest:20 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 32 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10905012:Addr0: 18t, Addr1: 20t, Addr2: 9c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0..1] DCL TEMP[0..2] 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: LRP_SAT TEMP[1], IN[0].wwww, TEMP[0], IN[0] 2: MAD_SAT TEMP[2].x, IN[1].xxxx, CONST[0].xxxx, CONST[0].yyyy 3: LRP OUT[0].xyz, TEMP[2].xxxx, TEMP[1], CONST[1] 4: MOV OUT[0].w, TEMP[1] 5: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: LRP_SAT temp[1], input[0].wwww, temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: LRP_SAT temp[1], input[0].wwww, temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: LRP_SAT temp[1], input[0].wwww, temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: LRP_SAT temp[1], input[0].wwww, temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: LRP_SAT temp[1], input[0].wwww, temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[3], temp[0], -input[0]; 2: MAD_SAT temp[1], input[0].wwww, temp[3], input[0]; 3: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 4: ADD temp[4], temp[1], -const[1]; 5: MAD output[0].xyz, temp[2].xxxx, temp[4], const[1]; 6: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[3], temp[0], -input[0]; 2: MAD_SAT temp[1], input[0].wwww, temp[3], input[0]; 3: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 4: ADD temp[4], temp[1], -const[1]; 5: MAD output[0].xyz, temp[2].xxxx, temp[4], const[1]; 6: MOV output[0].w, temp[1]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[3], temp[0], -input[0]; 2: MAD_SAT temp[1], input[0].wwww, temp[3], input[0]; 3: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 4: ADD temp[4], temp[1], -const[1]; 5: MAD output[0].xyz, temp[2].xxxx, temp[4], const[1]; 6: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 2: src0.xyz = temp[3], src0.w = input[0], src1.xyz = input[0], src1.w = temp[3] MAD_SAT temp[1].xyz, src0.www, src0.xyz, src1.xyz MAD_SAT temp[1].w, src0.w, src1.w, src0.w 3: src0.xyz = input[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 5: src0.xyz = temp[2], src1.xyz = temp[4], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 6: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 3: src0.xyz = temp[3], src0.w = input[0], src1.xyz = input[0], src1.w = temp[3] MAD_SAT temp[1].xyz, src0.www, src0.xyz, src1.xyz MAD_SAT temp[1].w, src0.w, src1.w, src0.w 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 5: src0.xyz = input[1], src0.w = temp[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 6: src0.xyz = temp[2], src1.xyz = temp[4], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[1], 2D[0]; 2: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[0], src1.w = temp[0] MAD temp[6].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[6].w, src0.w, src0.1, -src1.w 3: src0.xyz = temp[6], src0.w = temp[0], src1.xyz = temp[0], src1.w = temp[6] MAD_SAT temp[4].xyz, src0.www, src0.xyz, src1.xyz MAD_SAT temp[4].w, src0.w, src1.w, src0.w 4: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[1], src1.w = const[1] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[7].w, src0.w, src0.1, -src1.w 5: src0.xyz = temp[2], src0.w = temp[4], src1.xyz = const[0] MAD_SAT temp[5].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 6: src0.xyz = temp[5], src1.xyz = temp[7], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e401: src: 1 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21060:MAD dest:6 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 2 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001800:Addr0: 0t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x18221040:MAD dest:4 rgb_C_src:1 R/G/B 0 alp_C_src:0 A 0 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21070:MAD dest:7 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 4 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040002:Addr0: 2t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125050:MAD dest:5 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 5 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10101c05:Addr0: 5t, Addr1: 7t, Addr2: 1c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0..1] DCL TEMP[0..2] 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: MUL_SAT TEMP[1], TEMP[0], IN[0] 2: MAD_SAT TEMP[2].x, IN[1].xxxx, CONST[0].xxxx, CONST[0].yyyy 3: LRP OUT[0].xyz, TEMP[2].xxxx, TEMP[1], CONST[1] 4: MOV OUT[0].w, TEMP[1] 5: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], temp[0], input[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: src0.xyz = input[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 4: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 5: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[1].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 4: src0.xyz = input[1], src0.w = temp[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 5: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[1], 2D[0]; 2: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[0], src1.w = temp[0] MAD_SAT temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[4].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[1], src1.w = const[1] MAD temp[6].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[6].w, src0.w, src0.1, -src1.w 4: src0.xyz = temp[2], src0.w = temp[4], src1.xyz = const[0] MAD_SAT temp[5].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 5: src0.xyz = temp[5], src1.xyz = temp[6], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e401: src: 1 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21060:MAD dest:6 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 3 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040002:Addr0: 2t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125050:MAD dest:5 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 4 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10101805:Addr0: 5t, Addr1: 6t, Addr2: 1c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0] DCL CONST[2] DCL CONST[4..5] DCL TEMP[0..8] IMM FLT32 { 128.0000, 0.5000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[2].xyz, TEMP[0], CONST[0].zzzz 3: DP3 TEMP[3].w, IN[3], IN[3] 4: RSQ TEMP[3].w, TEMP[3].wwww 5: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 6: DP3 TEMP[4].w, IN[4], IN[4] 7: RSQ TEMP[4].w, TEMP[4].wwww 8: MUL TEMP[4].xyz, TEMP[4].wwww, IN[4] 9: DP3_SAT TEMP[5].x, TEMP[4], TEMP[3] 10: POW TEMP[5].x, TEMP[5].xxxx, IMM[0].xxxx 11: MUL TEMP[5].x, TEMP[5].xxxx, CONST[0].xxxx 12: MUL TEMP[5].x, TEMP[5].xxxx, TEMP[1].xxxx 13: DP3 TEMP[6].x, TEMP[3], CONST[2] 14: ADD TEMP[6].x, TEMP[6].xxxx, IMM[0].yyyy 15: MAX TEMP[6].x, TEMP[6].xxxx, CONST[0].yyyy 16: MAD TEMP[0].xyz, TEMP[6].xxxx, TEMP[0], TEMP[5].xxxx 17: MUL TEMP[0].xyz, TEMP[0], IN[0] 18: LRP_SAT TEMP[7].xyz, TEMP[1].yyyy, TEMP[2], TEMP[0] 19: MUL_SAT TEMP[7].w, TEMP[0].wwww, IN[0].wwww 20: MAD_SAT TEMP[8].x, IN[1].xxxx, CONST[4].xxxx, CONST[4].yyyy 21: LRP OUT[0].xyz, TEMP[8].xxxx, TEMP[7], CONST[5] 22: MOV OUT[0].w, TEMP[7] 23: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, temp[3].wwww; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, temp[4].wwww; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: POW temp[5].x, temp[5].xxxx, const[6].xxxx; 11: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 12: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 13: DP3 temp[6].x, temp[3], const[2]; 14: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 15: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 16: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 17: MUL temp[0].xyz, temp[0], input[0]; 18: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 19: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 20: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 21: LRP output[0].xyz, temp[8].xxxx, temp[7], const[5]; 22: MOV output[0].w, temp[7]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, temp[3].wwww; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, temp[4].wwww; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: POW temp[5].x, temp[5].xxxx, const[6].xxxx; 11: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 12: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 13: DP3 temp[6].x, temp[3], const[2]; 14: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 15: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 16: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 17: MUL temp[0].xyz, temp[0], input[0]; 18: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 19: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 20: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 21: LRP output[0].xyz, temp[8].xxxx, temp[7], const[5]; 22: MOV output[0].w, temp[7]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, temp[3].wwww; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, temp[4].wwww; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: POW temp[5].x, temp[5].xxxx, const[6].xxxx; 11: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 12: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 13: DP3 temp[6].x, temp[3], const[2]; 14: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 15: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 16: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 17: MUL temp[0].xyz, temp[0], input[0]; 18: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 19: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 20: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 21: LRP output[0].xyz, temp[8].xxxx, temp[7], const[5]; 22: MOV output[0].w, temp[7]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, temp[3].wwww; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, temp[4].wwww; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: POW temp[5].x, temp[5].xxxx, const[6].xxxx; 11: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 12: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 13: DP3 temp[6].x, temp[3], const[2]; 14: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 15: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 16: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 17: MUL temp[0].xyz, temp[0], input[0]; 18: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 19: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 20: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 21: LRP output[0].xyz, temp[8].xxxx, temp[7], const[5]; 22: MOV output[0].w, temp[7]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, temp[3].wwww; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, temp[4].wwww; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: POW temp[5].x, temp[5].xxxx, const[6].xxxx; 11: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 12: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 13: DP3 temp[6].x, temp[3], const[2]; 14: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 15: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 16: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 17: MUL temp[0].xyz, temp[0], input[0]; 18: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 19: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 20: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 21: LRP output[0].xyz, temp[8].xxxx, temp[7], const[5]; 22: MOV output[0].w, temp[7]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, |temp[3].wwww|; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, |temp[4].wwww|; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: LG2 temp[9].w, temp[5].xxxx; 11: MUL temp[9].w, temp[9].wwww, const[6].xxxx; 12: EX2 temp[5].x, temp[9].wwww; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], const[2]; 16: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: ADD temp[10], temp[2], -temp[0]; 21: MAD_SAT temp[7].xyz, temp[1].yyyy, temp[10], temp[0]; 22: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 23: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 24: ADD temp[11], temp[7], -const[5]; 25: MAD output[0].xyz, temp[8].xxxx, temp[11], const[5]; 26: MOV output[0].w, temp[7]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, |temp[3].wwww|; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, |temp[4].wwww|; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: LG2 temp[9].w, temp[5].xxxx; 11: MUL temp[9].w, temp[9].wwww, const[6].xxxx; 12: EX2 temp[5].x, temp[9].wwww; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], const[2]; 16: ADD temp[6].x, temp[6].xxxx, const[6].yyyy; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: ADD temp[10], temp[2], -temp[0]; 21: MAD_SAT temp[7].xyz, temp[1].yyyy, temp[10], temp[0]; 22: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 23: MAD_SAT temp[8].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 24: ADD temp[11], temp[7], -const[5]; 25: MAD output[0].xyz, temp[8].xxxx, temp[11], const[5]; 26: MOV output[0].w, temp[7]; CONST[4] = { 128.0000 0.5000 0.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: DP3 temp[3].w, input[3], input[3]; 4: RSQ temp[3].w, |temp[3].wwww|; 5: MUL temp[3].xyz, temp[3].wwww, input[3]; 6: DP3 temp[4].w, input[4], input[4]; 7: RSQ temp[4].w, |temp[4].wwww|; 8: MUL temp[4].xyz, temp[4].wwww, input[4]; 9: DP3_SAT temp[5].x, temp[4], temp[3]; 10: LG2 temp[9].w, temp[5].xxxx; 11: MUL temp[9].w, temp[9].wwww, const[4].xxxx; 12: EX2 temp[5].x, temp[9].wwww; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], const[1]; 16: ADD temp[6].x, temp[6].xxxx, const[4].yyyy; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: ADD temp[10], temp[2], -temp[0]; 21: MAD_SAT temp[7].xyz, temp[1].yyyy, temp[10], temp[0]; 22: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 23: MAD_SAT temp[8].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 24: ADD temp[11], temp[7], -const[3]; 25: MAD output[0].xyz, temp[8].xxxx, temp[11], const[3]; 26: MOV output[0].w, temp[7]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = temp[0], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.zzz, src0.000 3: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 4: src0.w = temp[3] RSQ temp[3].w, |src0.w| 5: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 6: src0.xyz = input[4], src0.w = input[4] DP3, src0.xyz, src0.xyz DP3 temp[4].w, src0.w, src0.w 7: src0.w = temp[4] RSQ temp[4].w, |src0.w| 8: src0.xyz = input[4], src0.w = temp[4] MAD temp[4].xyz, src0.www, src0.xyz, src0.000 9: src0.xyz = temp[4], src1.xyz = temp[3] DP3_SAT temp[5].x, src0.xyz, src1.xyz 10: src0.xyz = temp[5] LG2 temp[9].w, src0.x 11: src0.xyz = const[4], src0.w = temp[9] MAD temp[9].w, src0.w, src0.x, src0.0 12: src0.w = temp[9] REPL_ALPHA temp[5].x EX2, src0.w 13: src0.xyz = temp[5], src1.xyz = const[0] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 14: src0.xyz = temp[5], src1.xyz = temp[1] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 15: src0.xyz = temp[3], src1.xyz = const[1] DP3 temp[6].x, src0.xyz, src1.xyz 16: src0.xyz = temp[6], src1.xyz = const[4] MAD temp[6].x, src0.xxx, src0.111, src1.yyy 17: src0.xyz = temp[6], src1.xyz = const[0] MAX temp[6].x, src0.xxx, src1.yyy 18: src0.xyz = temp[6], src1.xyz = temp[0], src2.xyz = temp[5] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 19: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[0], src1.w = temp[0] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 21: src0.xyz = temp[1], src1.xyz = temp[10], src2.xyz = temp[0] MAD_SAT temp[7].xyz, src0.yyy, src1.xyz, src2.xyz 22: src0.w = temp[0], src1.w = input[0] MAD_SAT temp[7].w, src0.w, src1.w, src0.0 23: src0.xyz = input[1], src1.xyz = const[2] MAD_SAT temp[8].x, src0.xxx, src1.xxx, src1.yyy 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[3], src1.w = const[3] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 25: src0.xyz = temp[8], src1.xyz = temp[11], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 26: src0.w = temp[7] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = input[4], src0.w = input[4] DP3, src0.xyz, src0.xyz DP3 temp[4].w, src0.w, src0.w 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.xyz = temp[0], src0.w = temp[3], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.zzz, src0.000 RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 RSQ temp[4].w, |src1.w| 7: src0.xyz = input[4], src0.w = temp[4], src1.w = temp[0], src2.w = input[0] MAD temp[4].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[7].w, src1.w, src2.w, src0.0 8: src0.xyz = temp[4], src0.w = temp[7], src1.xyz = temp[3] DP3_SAT temp[5].x, src0.xyz, src1.xyz MAD color[0].w, src0.w, src0.1, src0.0 9: src0.xyz = temp[3], src1.xyz = const[1], src2.xyz = temp[5] DP3 temp[6].x, src0.xyz, src1.xyz LG2 temp[9].w, src2.x 10: src0.xyz = temp[6], src0.w = temp[9], src1.xyz = const[4] MAD temp[6].x, src0.xxx, src0.111, src1.yyy MAD temp[9].w, src0.w, src1.x, src0.0 11: src0.w = temp[9] REPL_ALPHA temp[5].x EX2, src0.w 12: src0.xyz = temp[5], src1.xyz = const[0] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 13: src0.xyz = temp[5], src1.xyz = temp[1] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 14: src0.xyz = temp[6], src1.xyz = const[0] MAX temp[6].x, src0.xxx, src1.yyy 15: src0.xyz = temp[6], src1.xyz = temp[0], src2.xyz = temp[5] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 16: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 17: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[0], src1.w = temp[0] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 18: src0.xyz = temp[1], src1.xyz = temp[10], src2.xyz = temp[0] MAD_SAT temp[7].xyz, src0.yyy, src1.xyz, src2.xyz 19: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[3], src1.w = const[3] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 20: src0.xyz = input[1], src1.xyz = const[2] MAD_SAT temp[8].x, src0.xxx, src1.xxx, src1.yyy 21: src0.xyz = temp[8], src1.xyz = temp[11], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[0]; 2: TEX temp[6], temp[1], 2D[1]; 3: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[9].w, src0.w, src0.w 4: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 5: src0.xyz = temp[5], src0.w = temp[8], src1.xyz = const[0] MAD temp[7].xyz, src0.xyz, src1.zzz, src0.000 RSQ temp[8].w, |src0.w| 6: src0.xyz = temp[2], src0.w = temp[8], src1.w = temp[9] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 RSQ temp[9].w, |src1.w| 7: src0.xyz = temp[3], src0.w = temp[9], src1.w = temp[5], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[12].w, src1.w, src2.w, src0.0 8: src0.xyz = temp[9], src0.w = temp[12], src1.xyz = temp[8] DP3_SAT temp[10].x, src0.xyz, src1.xyz MAD color[0].w, src0.w, src0.1, src0.0 9: src0.xyz = temp[8], src1.xyz = const[1], src2.xyz = temp[10] DP3 temp[11].x, src0.xyz, src1.xyz LG2 temp[14].w, src2.x 10: src0.xyz = temp[11], src0.w = temp[14], src1.xyz = const[4] MAD temp[11].x, src0.xxx, src0.111, src1.yyy MAD temp[14].w, src0.w, src1.x, src0.0 11: src0.w = temp[14] REPL_ALPHA temp[10].x EX2, src0.w 12: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].x, src0.xxx, src1.xxx, src0.000 13: src0.xyz = temp[10], src1.xyz = temp[6] MAD temp[10].x, src0.xxx, src1.xxx, src0.000 14: src0.xyz = temp[11], src1.xyz = const[0] MAX temp[11].x, src0.xxx, src1.yyy 15: src0.xyz = temp[11], src1.xyz = temp[5], src2.xyz = temp[10] MAD temp[5].xyz, src0.xxx, src1.xyz, src2.xxx 16: src0.xyz = temp[5], src1.xyz = temp[0] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 17: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[5], src1.w = temp[5] MAD temp[15].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[15].w, src0.w, src0.1, -src1.w 18: src0.xyz = temp[6], src1.xyz = temp[15], src2.xyz = temp[5] MAD_SAT temp[12].xyz, src0.yyy, src1.xyz, src2.xyz 19: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = const[3], src1.w = const[3] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 20: src0.xyz = temp[4], src1.xyz = const[2] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy 21: src0.xyz = temp[13], src1.xyz = temp[16], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c091:DP dest:9 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000041:DP3 dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 3 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040005:Addr0: 5t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00492220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 B/B/B 0 targ: 0 4 ALPHA_INST:0x0004c08b:RSQ dest:8 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0004d09b:RSQ dest:9 alp_A_src:1 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001409:Addr0: 9t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d0c0:MAD dest:12 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x20490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 7 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x200000a1:DP3 dest:10 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 8 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00a40408:Addr0: 8t, Addr1: 1c, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x000020e9:LN2 dest:14 alp_A_src:2 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000b1:DP3 dest:11 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 9 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x0004100b:Addr0: 11t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x0008c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x201250b0:MAD dest:11 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c058:EX2 dest:5 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000aa:SOP dest:10 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0000180a:Addr0: 10t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 13 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0004000b:Addr0: 11t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000b5:MAX dest:11 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 14 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00a0140b:Addr0: 11t, Addr1: 5t, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00002050:MAD dest:5 rgb_C_src:2 R/R/R 0 alp_C_src:0 R 0 15 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 16 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001407:Addr0: 7t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001407:Addr0: 7t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210f0:MAD dest:15 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 17 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00503c06:Addr0: 6t, Addr1: 15t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442124:rgb_A_src:0 G/G/G 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002220c0:MAD dest:12 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c0c:Addr0: 12t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c0c:Addr0: 12t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c100:MAD dest:16 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21100:MAD dest:16 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 19 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040804:Addr0: 4t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250d0:MAD dest:13 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1030400d:Addr0: 13t, Addr1: 16t, Addr2: 3c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0..1] DCL TEMP[0..2] 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: MUL_SAT TEMP[1], IN[0], TEMP[0] 2: MAD_SAT TEMP[2].x, IN[1].xxxx, CONST[0].xxxx, CONST[0].yyyy 3: LRP OUT[0].xyz, TEMP[2].xxxx, TEMP[1], CONST[1] 4: MOV OUT[0].w, TEMP[1] 5: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MUL_SAT temp[1], input[0], temp[0]; 2: MAD_SAT temp[2].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: src0.xyz = input[0], src0.w = input[0], src1.xyz = temp[0], src1.w = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: src0.xyz = input[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 4: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 5: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: src0.xyz = input[0], src0.w = input[0], src1.xyz = temp[0], src1.w = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[1].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 4: src0.xyz = input[1], src0.w = temp[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 5: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[1], 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[3], src1.w = temp[3] MAD_SAT temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[4].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[1], src1.w = const[1] MAD temp[6].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[6].w, src0.w, src0.1, -src1.w 4: src0.xyz = temp[2], src0.w = temp[4], src1.xyz = const[0] MAD_SAT temp[5].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 5: src0.xyz = temp[5], src1.xyz = temp[6], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e401: src: 1 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000c00:Addr0: 0t, Addr1: 3t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000c00:Addr0: 0t, Addr1: 3t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21060:MAD dest:6 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 3 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040002:Addr0: 2t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125050:MAD dest:5 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 4 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10101805:Addr0: 5t, Addr1: 6t, Addr2: 1c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL IN[5], GENERIC[3], PERSPECTIVE DCL IN[6], GENERIC[4], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[0] DCL CONST[2] DCL CONST[4..6] DCL TEMP[0..13] IMM FLT32 { 0.5000, 2.0000, 0.0000, 128.0000} 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[2].xyz, TEMP[0], CONST[0].zzzz 3: TEX TEMP[3], IN[2], SAMP[3], 2D 4: SUB TEMP[3].xyz, TEMP[3], IMM[0].xxxx 5: MUL TEMP[4].xyz, TEMP[3].xxxx, IN[4] 6: MAD TEMP[4].xyz, TEMP[3].yyyy, IN[5], TEMP[4] 7: MAD TEMP[4].xyz, TEMP[3].zzzz, IN[6], TEMP[4] 8: DP3 TEMP[4].w, TEMP[4], TEMP[4] 9: RSQ TEMP[4].w, TEMP[4].wwww 10: MUL TEMP[4].xyz, TEMP[4].wwww, TEMP[4] 11: ADD TEMP[5], CONST[2], IN[3] 12: DP3 TEMP[5].w, TEMP[5], TEMP[5] 13: RSQ TEMP[5].w, TEMP[5].wwww 14: MUL TEMP[5].xyz, TEMP[5].wwww, TEMP[5] 15: DP3_SAT TEMP[6].x, TEMP[5], TEMP[4] 16: POW TEMP[6].x, TEMP[6].xxxx, IMM[0].wwww 17: MUL TEMP[6].x, TEMP[6].xxxx, CONST[0].xxxx 18: MUL TEMP[6].x, TEMP[6].xxxx, TEMP[1].xxxx 19: DP3 TEMP[7].x, TEMP[4], CONST[2] 20: ADD TEMP[7].x, TEMP[7].xxxx, IMM[0].xxxx 21: MAX TEMP[7].x, TEMP[7].xxxx, CONST[0].yyyy 22: MAD TEMP[0].xyz, TEMP[7].xxxx, TEMP[0], TEMP[6].xxxx 23: MUL TEMP[0].xyz, TEMP[0], IN[0] 24: LRP TEMP[0].xyz, TEMP[1].yyyy, TEMP[2], TEMP[0] 25: DP3 TEMP[8].w, IN[3], IN[3] 26: RSQ TEMP[8].w, TEMP[8].wwww 27: MUL TEMP[8].xyz, TEMP[8].wwww, IN[3] 28: DP3 TEMP[9].x, TEMP[8], TEMP[4] 29: MUL TEMP[10].xyz, TEMP[9].xxxx, TEMP[4] 30: MAD TEMP[10].xyz, TEMP[10], IMM[0].yyyy, -TEMP[8] 31: MAX TEMP[9].x, TEMP[9], IMM[0].zzzz 32: MAD TEMP[9].x, CONST[4].xxxx, TEMP[9].xxxx, CONST[4].yyyy 33: TEX TEMP[11], TEMP[10], SAMP[2], CUBE 34: MUL TEMP[1].z, TEMP[1].zzzz, TEMP[9].xxxx 35: LRP_SAT TEMP[12].xyz, TEMP[1].zzzz, TEMP[11], TEMP[0] 36: MUL_SAT TEMP[12].w, TEMP[0].wwww, IN[0].wwww 37: MAD_SAT TEMP[13].x, IN[1].xxxx, CONST[5].xxxx, CONST[5].yyyy 38: LRP OUT[0].xyz, TEMP[13].xxxx, TEMP[12], CONST[6] 39: MOV OUT[0].w, TEMP[12] 40: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, temp[5].wwww; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: POW temp[6].x, temp[6].xxxx, const[7].wwww; 17: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 18: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 19: DP3 temp[7].x, temp[4], const[2]; 20: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 21: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 22: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 23: MUL temp[0].xyz, temp[0], input[0]; 24: LRP temp[0].xyz, temp[1].yyyy, temp[2], temp[0]; 25: DP3 temp[8].w, input[3], input[3]; 26: RSQ temp[8].w, temp[8].wwww; 27: MUL temp[8].xyz, temp[8].wwww, input[3]; 28: DP3 temp[9].x, temp[8], temp[4]; 29: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 30: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 31: MAX temp[9].x, temp[9], const[7].zzzz; 32: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 33: TEX temp[11], temp[10], CUBE[2]; 34: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 35: LRP_SAT temp[12].xyz, temp[1].zzzz, temp[11], temp[0]; 36: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 37: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 38: LRP output[0].xyz, temp[13].xxxx, temp[12], const[6]; 39: MOV output[0].w, temp[12]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, temp[5].wwww; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: POW temp[6].x, temp[6].xxxx, const[7].wwww; 17: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 18: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 19: DP3 temp[7].x, temp[4], const[2]; 20: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 21: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 22: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 23: MUL temp[0].xyz, temp[0], input[0]; 24: LRP temp[0].xyz, temp[1].yyyy, temp[2], temp[0]; 25: DP3 temp[8].w, input[3], input[3]; 26: RSQ temp[8].w, temp[8].wwww; 27: MUL temp[8].xyz, temp[8].wwww, input[3]; 28: DP3 temp[9].x, temp[8], temp[4]; 29: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 30: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 31: MAX temp[9].x, temp[9], const[7].zzzz; 32: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 33: TEX temp[11], temp[10], CUBE[2]; 34: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 35: LRP_SAT temp[12].xyz, temp[1].zzzz, temp[11], temp[0]; 36: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 37: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 38: LRP output[0].xyz, temp[13].xxxx, temp[12], const[6]; 39: MOV output[0].w, temp[12]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, temp[5].wwww; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: POW temp[6].x, temp[6].xxxx, const[7].wwww; 17: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 18: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 19: DP3 temp[7].x, temp[4], const[2]; 20: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 21: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 22: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 23: MUL temp[0].xyz, temp[0], input[0]; 24: LRP temp[0].xyz, temp[1].yyyy, temp[2], temp[0]; 25: DP3 temp[8].w, input[3], input[3]; 26: RSQ temp[8].w, temp[8].wwww; 27: MUL temp[8].xyz, temp[8].wwww, input[3]; 28: DP3 temp[9].x, temp[8], temp[4]; 29: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 30: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 31: MAX temp[9].x, temp[9], const[7].zzzz; 32: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 33: TEX temp[11], temp[10], CUBE[2]; 34: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 35: LRP_SAT temp[12].xyz, temp[1].zzzz, temp[11], temp[0]; 36: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 37: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 38: LRP output[0].xyz, temp[13].xxxx, temp[12], const[6]; 39: MOV output[0].w, temp[12]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, temp[5].wwww; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: POW temp[6].x, temp[6].xxxx, const[7].wwww; 17: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 18: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 19: DP3 temp[7].x, temp[4], const[2]; 20: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 21: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 22: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 23: MUL temp[0].xyz, temp[0], input[0]; 24: LRP temp[0].xyz, temp[1].yyyy, temp[2], temp[0]; 25: DP3 temp[8].w, input[3], input[3]; 26: RSQ temp[8].w, temp[8].wwww; 27: MUL temp[8].xyz, temp[8].wwww, input[3]; 28: DP3 temp[9].x, temp[8], temp[4]; 29: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 30: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 31: MAX temp[9].x, temp[9], const[7].zzzz; 32: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 33: TEX temp[11], temp[10], CUBE[2]; 34: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 35: LRP_SAT temp[12].xyz, temp[1].zzzz, temp[11], temp[0]; 36: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 37: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 38: LRP output[0].xyz, temp[13].xxxx, temp[12], const[6]; 39: MOV output[0].w, temp[12]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, temp[5].wwww; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: POW temp[6].x, temp[6].xxxx, const[7].wwww; 17: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 18: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 19: DP3 temp[7].x, temp[4], const[2]; 20: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 21: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 22: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 23: MUL temp[0].xyz, temp[0], input[0]; 24: LRP temp[0].xyz, temp[1].yyyy, temp[2], temp[0]; 25: DP3 temp[8].w, input[3], input[3]; 26: RSQ temp[8].w, temp[8].wwww; 27: MUL temp[8].xyz, temp[8].wwww, input[3]; 28: DP3 temp[9].x, temp[8], temp[4]; 29: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 30: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 31: MAX temp[9].x, temp[9], const[7].zzzz; 32: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 33: TEX temp[11], temp[10], CUBE[2]; 34: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 35: LRP_SAT temp[12].xyz, temp[1].zzzz, temp[11], temp[0]; 36: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 37: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 38: LRP output[0].xyz, temp[13].xxxx, temp[12], const[6]; 39: MOV output[0].w, temp[12]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: ADD temp[3].xyz, temp[3], -const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, |temp[4].wwww|; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, |temp[5].wwww|; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: LG2 temp[14].w, temp[6].xxxx; 17: MUL temp[14].w, temp[14].wwww, const[7].wwww; 18: EX2 temp[6].x, temp[14].wwww; 19: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 20: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 21: DP3 temp[7].x, temp[4], const[2]; 22: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 23: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 24: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 25: MUL temp[0].xyz, temp[0], input[0]; 26: ADD temp[15], temp[2], -temp[0]; 27: MAD temp[0].xyz, temp[1].yyyy, temp[15], temp[0]; 28: DP3 temp[8].w, input[3], input[3]; 29: RSQ temp[8].w, |temp[8].wwww|; 30: MUL temp[8].xyz, temp[8].wwww, input[3]; 31: DP3 temp[9].x, temp[8], temp[4]; 32: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 33: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 34: MAX temp[9].x, temp[9], const[7].zzzz; 35: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 36: TEX temp[11], temp[10], CUBE[2]; 37: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 38: ADD temp[16], temp[11], -temp[0]; 39: MAD_SAT temp[12].xyz, temp[1].zzzz, temp[16], temp[0]; 40: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 41: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 42: ADD temp[17], temp[12], -const[6]; 43: MAD output[0].xyz, temp[13].xxxx, temp[17], const[6]; 44: MOV output[0].w, temp[12]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: ADD temp[3].xyz, temp[3], -const[7].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, |temp[4].wwww|; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[2], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, |temp[5].wwww|; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: LG2 temp[14].w, temp[6].xxxx; 17: MUL temp[14].w, temp[14].wwww, const[7].wwww; 18: EX2 temp[6].x, temp[14].wwww; 19: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 20: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 21: DP3 temp[7].x, temp[4], const[2]; 22: ADD temp[7].x, temp[7].xxxx, const[7].xxxx; 23: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 24: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 25: MUL temp[0].xyz, temp[0], input[0]; 26: ADD temp[15], temp[2], -temp[0]; 27: MAD temp[0].xyz, temp[1].yyyy, temp[15], temp[0]; 28: DP3 temp[8].w, input[3], input[3]; 29: RSQ temp[8].w, |temp[8].wwww|; 30: MUL temp[8].xyz, temp[8].wwww, input[3]; 31: DP3 temp[9].x, temp[8], temp[4]; 32: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 33: MAD temp[10].xyz, temp[10], const[7].yyyy, -temp[8]; 34: MAX temp[9].x, temp[9], const[7].zzzz; 35: MAD temp[9].x, const[4].xxxx, temp[9].xxxx, const[4].yyyy; 36: TEX temp[11], temp[10], CUBE[2]; 37: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 38: ADD temp[16], temp[11], -temp[0]; 39: MAD_SAT temp[12].xyz, temp[1].zzzz, temp[16], temp[0]; 40: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 41: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 42: ADD temp[17], temp[12], -const[6]; 43: MAD output[0].xyz, temp[13].xxxx, temp[17], const[6]; 44: MOV output[0].w, temp[12]; CONST[5] = { 0.5000 2.0000 0.0000 128.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: ADD temp[3].xyz, temp[3], -const[5].xxxx; 5: MUL temp[4].xyz, temp[3].xxxx, input[4]; 6: MAD temp[4].xyz, temp[3].yyyy, input[5], temp[4]; 7: MAD temp[4].xyz, temp[3].zzzz, input[6], temp[4]; 8: DP3 temp[4].w, temp[4], temp[4]; 9: RSQ temp[4].w, |temp[4].wwww|; 10: MUL temp[4].xyz, temp[4].wwww, temp[4]; 11: ADD temp[5], const[1], input[3]; 12: DP3 temp[5].w, temp[5], temp[5]; 13: RSQ temp[5].w, |temp[5].wwww|; 14: MUL temp[5].xyz, temp[5].wwww, temp[5]; 15: DP3_SAT temp[6].x, temp[5], temp[4]; 16: LG2 temp[14].w, temp[6].xxxx; 17: MUL temp[14].w, temp[14].wwww, const[5].wwww; 18: EX2 temp[6].x, temp[14].wwww; 19: MUL temp[6].x, temp[6].xxxx, const[0].xxxx; 20: MUL temp[6].x, temp[6].xxxx, temp[1].xxxx; 21: DP3 temp[7].x, temp[4], const[1]; 22: ADD temp[7].x, temp[7].xxxx, const[5].xxxx; 23: MAX temp[7].x, temp[7].xxxx, const[0].yyyy; 24: MAD temp[0].xyz, temp[7].xxxx, temp[0], temp[6].xxxx; 25: MUL temp[0].xyz, temp[0], input[0]; 26: ADD temp[15], temp[2], -temp[0]; 27: MAD temp[0].xyz, temp[1].yyyy, temp[15], temp[0]; 28: DP3 temp[8].w, input[3], input[3]; 29: RSQ temp[8].w, |temp[8].wwww|; 30: MUL temp[8].xyz, temp[8].wwww, input[3]; 31: DP3 temp[9].x, temp[8], temp[4]; 32: MUL temp[10].xyz, temp[9].xxxx, temp[4]; 33: MAD temp[10].xyz, temp[10], const[5].yyyy, -temp[8]; 34: MAX temp[9].x, temp[9], const[5].zzzz; 35: MAD temp[9].x, const[2].xxxx, temp[9].xxxx, const[2].yyyy; 36: TEX temp[11], temp[10], CUBE[2]; 37: MUL temp[1].z, temp[1].zzzz, temp[9].xxxx; 38: ADD temp[16], temp[11], -temp[0]; 39: MAD_SAT temp[12].xyz, temp[1].zzzz, temp[16], temp[0]; 40: MUL_SAT temp[12].w, temp[0].wwww, input[0].wwww; 41: MAD_SAT temp[13].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 42: ADD temp[17], temp[12], -const[4]; 43: MAD output[0].xyz, temp[13].xxxx, temp[17], const[4]; 44: MOV output[0].w, temp[12]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = temp[0], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.zzz, src0.000 3: TEX temp[3], input[2], 2D[3]; 4: src0.xyz = temp[3], src1.xyz = const[5] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xxx 5: src0.xyz = temp[3], src1.xyz = input[4] MAD temp[4].xyz, src0.xxx, src1.xyz, src0.000 6: src0.xyz = temp[3], src1.xyz = input[5], src2.xyz = temp[4] MAD temp[4].xyz, src0.yyy, src1.xyz, src2.xyz 7: src0.xyz = temp[3], src1.xyz = input[6], src2.xyz = temp[4] MAD temp[4].xyz, src0.zzz, src1.xyz, src2.xyz 8: src0.xyz = temp[4], src0.w = temp[4] DP3, src0.xyz, src0.xyz DP3 temp[4].w, src0.w, src0.w 9: src0.w = temp[4] RSQ temp[4].w, |src0.w| 10: src0.xyz = temp[4], src0.w = temp[4] MAD temp[4].xyz, src0.www, src0.xyz, src0.000 11: src0.xyz = const[1], src0.w = const[1], src1.xyz = input[3], src1.w = input[3] MAD temp[5].xyz, src0.xyz, src0.111, src1.xyz MAD temp[5].w, src0.w, src0.1, src1.w 12: src0.xyz = temp[5], src0.w = temp[5] DP3, src0.xyz, src0.xyz DP3 temp[5].w, src0.w, src0.w 13: src0.w = temp[5] RSQ temp[5].w, |src0.w| 14: src0.xyz = temp[5], src0.w = temp[5] MAD temp[5].xyz, src0.www, src0.xyz, src0.000 15: src0.xyz = temp[5], src1.xyz = temp[4] DP3_SAT temp[6].x, src0.xyz, src1.xyz 16: src0.xyz = temp[6] LG2 temp[14].w, src0.x 17: src0.w = temp[14], src1.w = const[5] MAD temp[14].w, src0.w, src1.w, src0.0 18: src0.w = temp[14] REPL_ALPHA temp[6].x EX2, src0.w 19: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].x, src0.xxx, src1.xxx, src0.000 20: src0.xyz = temp[6], src1.xyz = temp[1] MAD temp[6].x, src0.xxx, src1.xxx, src0.000 21: src0.xyz = temp[4], src1.xyz = const[1] DP3 temp[7].x, src0.xyz, src1.xyz 22: src0.xyz = temp[7], src1.xyz = const[5] MAD temp[7].x, src0.xxx, src0.111, src1.xxx 23: src0.xyz = temp[7], src1.xyz = const[0] MAX temp[7].x, src0.xxx, src1.yyy 24: src0.xyz = temp[7], src1.xyz = temp[0], src2.xyz = temp[6] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 25: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[0], src1.w = temp[0] MAD temp[15].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[15].w, src0.w, src0.1, -src1.w 27: src0.xyz = temp[1], src1.xyz = temp[15], src2.xyz = temp[0] MAD temp[0].xyz, src0.yyy, src1.xyz, src2.xyz 28: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 29: src0.w = temp[8] RSQ temp[8].w, |src0.w| 30: src0.xyz = input[3], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 31: src0.xyz = temp[8], src1.xyz = temp[4] DP3 temp[9].x, src0.xyz, src1.xyz 32: src0.xyz = temp[9], src1.xyz = temp[4] MAD temp[10].xyz, src0.xxx, src1.xyz, src0.000 33: src0.xyz = temp[10], src1.xyz = const[5], src2.xyz = temp[8] MAD temp[10].xyz, src0.xyz, src1.yyy, -src2.xyz 34: src0.xyz = temp[9], src1.xyz = const[5] MAX temp[9].x, src0.xyz, src1.zzz 35: src0.xyz = const[2], src1.xyz = temp[9] MAD temp[9].x, src0.xxx, src1.xxx, src0.yyy 36: TEX temp[11], temp[10], CUBE[2]; 37: src0.xyz = temp[1], src1.xyz = temp[9] MAD temp[1].z, src0.zzz, src1.xxx, src0.000 38: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[0], src1.w = temp[0] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 39: src0.xyz = temp[1], src1.xyz = temp[16], src2.xyz = temp[0] MAD_SAT temp[12].xyz, src0.zzz, src1.xyz, src2.xyz 40: src0.w = temp[0], src1.w = input[0] MAD_SAT temp[12].w, src0.w, src1.w, src0.0 41: src0.xyz = input[1], src1.xyz = const[3] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy 42: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = const[4], src1.w = const[4] MAD temp[17].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[17].w, src0.w, src0.1, -src1.w 43: src0.xyz = temp[13], src1.xyz = temp[17], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 44: src0.w = temp[12] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: TEX temp[3], input[2], 2D[3]; 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 5: src0.xyz = const[1], src0.w = const[1], src1.xyz = input[3], src1.w = input[3] MAD temp[5].xyz, src0.xyz, src0.111, src1.xyz MAD temp[5].w, src0.w, src0.1, src1.w 6: src0.xyz = temp[5], src0.w = temp[5] DP3, src0.xyz, src0.xyz DP3 temp[5].w, src0.w, src0.w 7: src0.xyz = temp[3], src0.w = temp[5], src1.xyz = const[5] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xxx RSQ temp[5].w, |src0.w| 8: src0.xyz = temp[5], src0.w = temp[5], src1.w = temp[8] MAD temp[5].xyz, src0.www, src0.xyz, src0.000 RSQ temp[8].w, |src1.w| 9: src0.xyz = input[3], src0.w = temp[8], src1.w = temp[0], src2.w = input[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[12].w, src1.w, src2.w, src0.0 10: src0.xyz = temp[3], src0.w = temp[12], src1.xyz = input[4] MAD temp[4].xyz, src0.xxx, src1.xyz, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 11: src0.xyz = temp[3], src1.xyz = input[5], src2.xyz = temp[4] MAD temp[4].xyz, src0.yyy, src1.xyz, src2.xyz 12: src0.xyz = temp[3], src1.xyz = input[6], src2.xyz = temp[4] MAD temp[4].xyz, src0.zzz, src1.xyz, src2.xyz 13: src0.xyz = temp[4], src0.w = temp[4] DP3, src0.xyz, src0.xyz DP3 temp[4].w, src0.w, src0.w 14: src0.xyz = temp[0], src0.w = temp[4], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.zzz, src0.000 RSQ temp[4].w, |src0.w| 15: src0.xyz = temp[4], src0.w = temp[4] MAD temp[4].xyz, src0.www, src0.xyz, src0.000 16: src0.xyz = temp[5], src1.xyz = temp[4] DP3_SAT temp[6].x, src0.xyz, src1.xyz 17: src0.xyz = temp[4], src1.xyz = const[1], src2.xyz = temp[6] DP3 temp[7].x, src0.xyz, src1.xyz LG2 temp[14].w, src2.x 18: src0.xyz = temp[7], src0.w = temp[14], src1.xyz = const[5], src1.w = const[5] MAD temp[7].x, src0.xxx, src0.111, src1.xxx MAD temp[14].w, src0.w, src1.w, src0.0 19: src0.w = temp[14] REPL_ALPHA temp[6].x EX2, src0.w 20: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].x, src0.xxx, src1.xxx, src0.000 21: src0.xyz = temp[6], src1.xyz = temp[1] MAD temp[6].x, src0.xxx, src1.xxx, src0.000 22: src0.xyz = temp[7], src1.xyz = const[0] MAX temp[7].x, src0.xxx, src1.yyy 23: src0.xyz = temp[7], src1.xyz = temp[0], src2.xyz = temp[6] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 24: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[0], src1.w = temp[0] MAD temp[15].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[15].w, src0.w, src0.1, -src1.w 26: src0.xyz = temp[1], src1.xyz = temp[15], src2.xyz = temp[0] MAD temp[0].xyz, src0.yyy, src1.xyz, src2.xyz 27: src0.xyz = temp[8], src1.xyz = temp[4] DP3 temp[9].x, src0.xyz, src1.xyz 28: src0.xyz = temp[9], src1.xyz = temp[4] MAD temp[10].xyz, src0.xxx, src1.xyz, src0.000 29: src0.xyz = temp[10], src1.xyz = const[5], src2.xyz = temp[8] MAD temp[10].xyz, src0.xyz, src1.yyy, -src2.xyz 30: src0.xyz = temp[9], src1.xyz = const[5] MAX temp[9].x, src0.xyz, src1.zzz 31: src0.xyz = const[2], src1.xyz = temp[9] MAD temp[9].x, src0.xxx, src1.xxx, src0.yyy 32: src0.xyz = temp[1], src1.xyz = temp[9] MAD temp[1].z, src0.zzz, src1.xxx, src0.000 33: src0.xyz = input[1], src1.xyz = const[3] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy 34: BEGIN_TEX; 35: TEX temp[11], temp[10], CUBE[2]; 36: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[0], src1.w = temp[0] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 37: src0.xyz = temp[1], src1.xyz = temp[16], src2.xyz = temp[0] MAD_SAT temp[12].xyz, src0.zzz, src1.xyz, src2.xyz 38: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = const[4], src1.w = const[4] MAD temp[17].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[17].w, src0.w, src0.1, -src1.w 39: src0.xyz = temp[13], src1.xyz = temp[17], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[7], temp[1], 2D[0]; 2: TEX temp[8], temp[1], 2D[1]; 3: TEX temp[10], temp[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[15].w, src0.w, src0.w 5: src0.xyz = const[1], src0.w = const[1], src1.xyz = temp[2], src1.w = temp[2] MAD temp[12].xyz, src0.xyz, src0.111, src1.xyz MAD temp[12].w, src0.w, src0.1, src1.w 6: src0.xyz = temp[12], src0.w = temp[12] DP3, src0.xyz, src0.xyz DP3 temp[12].w, src0.w, src0.w 7: src0.xyz = temp[10], src0.w = temp[12], src1.xyz = const[5] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xxx RSQ temp[12].w, |src0.w| 8: src0.xyz = temp[12], src0.w = temp[12], src1.w = temp[15] MAD temp[12].xyz, src0.www, src0.xyz, src0.000 RSQ temp[15].w, |src1.w| 9: src0.xyz = temp[2], src0.w = temp[15], src1.w = temp[7], src2.w = temp[0] MAD temp[15].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[19].w, src1.w, src2.w, src0.0 10: src0.xyz = temp[10], src0.w = temp[19], src1.xyz = temp[3] MAD temp[11].xyz, src0.xxx, src1.xyz, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 11: src0.xyz = temp[10], src1.xyz = temp[4], src2.xyz = temp[11] MAD temp[11].xyz, src0.yyy, src1.xyz, src2.xyz 12: src0.xyz = temp[10], src1.xyz = temp[5], src2.xyz = temp[11] MAD temp[11].xyz, src0.zzz, src1.xyz, src2.xyz 13: src0.xyz = temp[11], src0.w = temp[11] DP3, src0.xyz, src0.xyz DP3 temp[11].w, src0.w, src0.w 14: src0.xyz = temp[7], src0.w = temp[11], src1.xyz = const[0] MAD temp[9].xyz, src0.xyz, src1.zzz, src0.000 RSQ temp[11].w, |src0.w| 15: src0.xyz = temp[11], src0.w = temp[11] MAD temp[11].xyz, src0.www, src0.xyz, src0.000 16: src0.xyz = temp[12], src1.xyz = temp[11] DP3_SAT temp[13].x, src0.xyz, src1.xyz 17: src0.xyz = temp[11], src1.xyz = const[1], src2.xyz = temp[13] DP3 temp[14].x, src0.xyz, src1.xyz LG2 temp[21].w, src2.x 18: src0.xyz = temp[14], src0.w = temp[21], src1.xyz = const[5], src1.w = const[5] MAD temp[14].x, src0.xxx, src0.111, src1.xxx MAD temp[21].w, src0.w, src1.w, src0.0 19: src0.w = temp[21] REPL_ALPHA temp[13].x EX2, src0.w 20: src0.xyz = temp[13], src1.xyz = const[0] MAD temp[13].x, src0.xxx, src1.xxx, src0.000 21: src0.xyz = temp[13], src1.xyz = temp[8] MAD temp[13].x, src0.xxx, src1.xxx, src0.000 22: src0.xyz = temp[14], src1.xyz = const[0] MAX temp[14].x, src0.xxx, src1.yyy 23: src0.xyz = temp[14], src1.xyz = temp[7], src2.xyz = temp[13] MAD temp[7].xyz, src0.xxx, src1.xyz, src2.xxx 24: src0.xyz = temp[7], src1.xyz = temp[0] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = temp[7], src1.w = temp[7] MAD temp[22].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[22].w, src0.w, src0.1, -src1.w 26: src0.xyz = temp[8], src1.xyz = temp[22], src2.xyz = temp[7] MAD temp[7].xyz, src0.yyy, src1.xyz, src2.xyz 27: src0.xyz = temp[15], src1.xyz = temp[11] DP3 temp[16].x, src0.xyz, src1.xyz 28: src0.xyz = temp[16], src1.xyz = temp[11] MAD temp[17].xyz, src0.xxx, src1.xyz, src0.000 29: src0.xyz = temp[17], src1.xyz = const[5], src2.xyz = temp[15] MAD temp[17].xyz, src0.xyz, src1.yyy, -src2.xyz 30: src0.xyz = temp[16], src1.xyz = const[5] MAX temp[16].x, src0.xyz, src1.zzz 31: src0.xyz = const[2], src1.xyz = temp[16] MAD temp[16].x, src0.xxx, src1.xxx, src0.yyy 32: src0.xyz = temp[8], src1.xyz = temp[16] MAD temp[8].z, src0.zzz, src1.xxx, src0.000 33: src0.xyz = temp[6], src1.xyz = const[3] MAD_SAT temp[20].x, src0.xxx, src1.xxx, src1.yyy 34: BEGIN_TEX; 35: TEX temp[18], temp[17], CUBE[2]; 36: src0.xyz = temp[18], src0.w = temp[18], src1.xyz = temp[7], src1.w = temp[7] MAD temp[23].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[23].w, src0.w, src0.1, -src1.w 37: src0.xyz = temp[8], src1.xyz = temp[23], src2.xyz = temp[7] MAD_SAT temp[19].xyz, src0.zzz, src1.xyz, src2.xyz 38: src0.xyz = temp[19], src0.w = temp[19], src1.xyz = const[4], src1.w = const[4] MAD temp[24].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[24].w, src0.w, src0.1, -src1.w 39: src0.xyz = temp[20], src1.xyz = temp[24], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e401: src: 1 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae401: src: 1 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0f1:DP dest:15 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000901:Addr0: 1c, Addr1: 2t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000901:Addr0: 1c, Addr1: 2t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000051:DP3 dest:5 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0004140a:Addr0: 10t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x0004c0cb:RSQ dest:12 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x008010a0:MAD dest:10 rgb_C_src:1 R/R/R 1 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00003c0c:Addr0: 12t, Addr1: 15t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0004d0fb:RSQ dest:15 alp_A_src:1 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 8 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c0f:Addr0: 15t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d130:MAD dest:19 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900f0:MAD dest:15 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 9 0:CMN_INST 0x00043805:OUT TEX_WAIT wmask: RGB omask: A 1:RGB_ADDR 0x00000c0a:Addr0: 10t, Addr1: 3t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000013:Addr0: 19t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x204900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00b0100a:Addr0: 10t, Addr1: 4t, Addr2: 11t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442124:rgb_A_src:0 G/G/G 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002220b0:MAD dest:11 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00b0140a:Addr0: 10t, Addr1: 5t, Addr2: 11t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442248:rgb_A_src:0 B/B/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002220b0:MAD dest:11 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000b:Addr0: 11t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000b:Addr0: 11t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0b1:DP dest:11 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000041:DP3 dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 13 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040007:Addr0: 7t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000b:Addr0: 11t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00492220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 B/B/B 0 targ: 0 4 ALPHA_INST:0x0004c0bb:RSQ dest:11 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 14 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000000b:Addr0: 11t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000b:Addr0: 11t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 15 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000d1:DP3 dest:13 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 16 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00d4040b:Addr0: 11t, Addr1: 1c, Addr2: 13t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00002159:LN2 dest:21 alp_A_src:2 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000e1:DP3 dest:14 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x0004140e:Addr0: 14t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041415:Addr0: 21t, Addr1: 5c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x0068c150:MAD dest:21 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x200010e0:MAD dest:14 rgb_C_src:1 R/R/R 0 alp_C_src:0 0 0 18 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000015:Addr0: 21t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c068:EX2 dest:6 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000da:SOP dest:13 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0004000d:Addr0: 13t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0000200d:Addr0: 13t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0004000e:Addr0: 14t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000e5:MAX dest:14 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00d01c0e:Addr0: 14t, Addr1: 7t, Addr2: 13t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00002070:MAD dest:7 rgb_C_src:2 R/R/R 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c09:Addr0: 9t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c09:Addr0: 9t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c160:MAD dest:22 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21160:MAD dest:22 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 25 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00705808:Addr0: 8t, Addr1: 22t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442124:rgb_A_src:0 G/G/G 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00002c0f:Addr0: 15t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000101:DP3 dest:16 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002c10:Addr0: 16t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490110:MAD dest:17 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00f41411:Addr0: 17t, Addr1: 5c, Addr2: 15t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00a22110:MAD dest:17 rgb_C_src:2 R/G/B 1 alp_C_src:0 R 0 29 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00041410:Addr0: 16t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00492220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 B/B/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000105:MAX dest:16 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 30 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00004102:Addr0: 2c, Addr1: 16t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00124100:MAD dest:16 rgb_C_src:0 G/G/G 0 alp_C_src:0 R 0 31 0:CMN_INST 0x00002004:ALU TEX_WAIT wmask: B omask: NONE 1:RGB_ADDR 0x00004008:Addr0: 8t, Addr1: 16t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002248:rgb_A_src:0 B/B/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 32 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040c06:Addr0: 6t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125140:MAD dest:20 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 33 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe412e411: src: 17 R/G/B/A dst: 18 R/G/B/A 3:TEX_DXDY: 0x00000000 34 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c12:Addr0: 18t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c12:Addr0: 18t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c170:MAD dest:23 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21170:MAD dest:23 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 35 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00705c08:Addr0: 8t, Addr1: 23t, Addr2: 7t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442248:rgb_A_src:0 B/B/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222130:MAD dest:19 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 36 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041013:Addr0: 19t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041013:Addr0: 19t, Addr1: 4c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c180:MAD dest:24 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21180:MAD dest:24 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 37 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10406014:Addr0: 20t, Addr1: 24t, Addr2: 4c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[3] DCL CONST[0] DCL CONST[3..4] DCL TEMP[0..8] IMM FLT32 { 0.5000, 128.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[2].xyz, TEMP[0], CONST[0].zzzz 3: TEX TEMP[3], IN[2], SAMP[3], 2D 4: SUB TEMP[3].xyz, TEMP[3], IMM[0].xxxx 5: DP3 TEMP[3].w, TEMP[3], TEMP[3] 6: RSQ TEMP[3].w, TEMP[3].wwww 7: MUL TEMP[3].xyz, TEMP[3].wwww, TEMP[3] 8: DP3 TEMP[4].w, IN[4], IN[4] 9: RSQ TEMP[4].w, TEMP[4].wwww 10: MUL TEMP[4].xyz, TEMP[4].wwww, IN[4] 11: DP3_SAT TEMP[5].x, TEMP[4], TEMP[3] 12: POW TEMP[5].x, TEMP[5].xxxx, IMM[0].yyyy 13: MUL TEMP[5].x, TEMP[5].xxxx, CONST[0].xxxx 14: MUL TEMP[5].x, TEMP[5].xxxx, TEMP[1].xxxx 15: DP3 TEMP[6].x, TEMP[3], IN[3] 16: ADD TEMP[6].x, TEMP[6].xxxx, IMM[0].xxxx 17: MAX TEMP[6].x, TEMP[6].xxxx, CONST[0].yyyy 18: MAD TEMP[0].xyz, TEMP[6].xxxx, TEMP[0], TEMP[5].xxxx 19: MUL TEMP[0].xyz, TEMP[0], IN[0] 20: LRP_SAT TEMP[7].xyz, TEMP[1].yyyy, TEMP[2], TEMP[0] 21: MUL_SAT TEMP[7].w, TEMP[0].wwww, IN[0].wwww 22: MAD_SAT TEMP[8].x, IN[1].xxxx, CONST[3].xxxx, CONST[3].yyyy 23: LRP OUT[0].xyz, TEMP[8].xxxx, TEMP[7], CONST[4] 24: MOV OUT[0].w, TEMP[7] 25: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, temp[3].wwww; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: POW temp[5].x, temp[5].xxxx, const[5].yyyy; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], input[3]; 16: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 21: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 22: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 23: LRP output[0].xyz, temp[8].xxxx, temp[7], const[4]; 24: MOV output[0].w, temp[7]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, temp[3].wwww; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: POW temp[5].x, temp[5].xxxx, const[5].yyyy; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], input[3]; 16: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 21: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 22: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 23: LRP output[0].xyz, temp[8].xxxx, temp[7], const[4]; 24: MOV output[0].w, temp[7]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, temp[3].wwww; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: POW temp[5].x, temp[5].xxxx, const[5].yyyy; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], input[3]; 16: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 21: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 22: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 23: LRP output[0].xyz, temp[8].xxxx, temp[7], const[4]; 24: MOV output[0].w, temp[7]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, temp[3].wwww; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: POW temp[5].x, temp[5].xxxx, const[5].yyyy; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], input[3]; 16: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 21: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 22: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 23: LRP output[0].xyz, temp[8].xxxx, temp[7], const[4]; 24: MOV output[0].w, temp[7]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: SUB temp[3].xyz, temp[3], const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, temp[3].wwww; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, temp[4].wwww; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: POW temp[5].x, temp[5].xxxx, const[5].yyyy; 13: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 14: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 15: DP3 temp[6].x, temp[3], input[3]; 16: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 17: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 18: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 19: MUL temp[0].xyz, temp[0], input[0]; 20: LRP_SAT temp[7].xyz, temp[1].yyyy, temp[2], temp[0]; 21: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 22: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 23: LRP output[0].xyz, temp[8].xxxx, temp[7], const[4]; 24: MOV output[0].w, temp[7]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: ADD temp[3].xyz, temp[3], -const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, |temp[3].wwww|; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, |temp[4].wwww|; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: LG2 temp[9].w, temp[5].xxxx; 13: MUL temp[9].w, temp[9].wwww, const[5].yyyy; 14: EX2 temp[5].x, temp[9].wwww; 15: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 16: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 17: DP3 temp[6].x, temp[3], input[3]; 18: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 19: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 20: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 21: MUL temp[0].xyz, temp[0], input[0]; 22: ADD temp[10], temp[2], -temp[0]; 23: MAD_SAT temp[7].xyz, temp[1].yyyy, temp[10], temp[0]; 24: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 25: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 26: ADD temp[11], temp[7], -const[4]; 27: MAD output[0].xyz, temp[8].xxxx, temp[11], const[4]; 28: MOV output[0].w, temp[7]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: ADD temp[3].xyz, temp[3], -const[5].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, |temp[3].wwww|; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, |temp[4].wwww|; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: LG2 temp[9].w, temp[5].xxxx; 13: MUL temp[9].w, temp[9].wwww, const[5].yyyy; 14: EX2 temp[5].x, temp[9].wwww; 15: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 16: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 17: DP3 temp[6].x, temp[3], input[3]; 18: ADD temp[6].x, temp[6].xxxx, const[5].xxxx; 19: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 20: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 21: MUL temp[0].xyz, temp[0], input[0]; 22: ADD temp[10], temp[2], -temp[0]; 23: MAD_SAT temp[7].xyz, temp[1].yyyy, temp[10], temp[0]; 24: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 25: MAD_SAT temp[8].x, input[1].xxxx, const[3].xxxx, const[3].yyyy; 26: ADD temp[11], temp[7], -const[4]; 27: MAD output[0].xyz, temp[8].xxxx, temp[11], const[4]; 28: MOV output[0].w, temp[7]; CONST[3] = { 0.5000 128.0000 0.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[2].xyz, temp[0], const[0].zzzz; 3: TEX temp[3], input[2], 2D[3]; 4: ADD temp[3].xyz, temp[3], -const[3].xxxx; 5: DP3 temp[3].w, temp[3], temp[3]; 6: RSQ temp[3].w, |temp[3].wwww|; 7: MUL temp[3].xyz, temp[3].wwww, temp[3]; 8: DP3 temp[4].w, input[4], input[4]; 9: RSQ temp[4].w, |temp[4].wwww|; 10: MUL temp[4].xyz, temp[4].wwww, input[4]; 11: DP3_SAT temp[5].x, temp[4], temp[3]; 12: LG2 temp[9].w, temp[5].xxxx; 13: MUL temp[9].w, temp[9].wwww, const[3].yyyy; 14: EX2 temp[5].x, temp[9].wwww; 15: MUL temp[5].x, temp[5].xxxx, const[0].xxxx; 16: MUL temp[5].x, temp[5].xxxx, temp[1].xxxx; 17: DP3 temp[6].x, temp[3], input[3]; 18: ADD temp[6].x, temp[6].xxxx, const[3].xxxx; 19: MAX temp[6].x, temp[6].xxxx, const[0].yyyy; 20: MAD temp[0].xyz, temp[6].xxxx, temp[0], temp[5].xxxx; 21: MUL temp[0].xyz, temp[0], input[0]; 22: ADD temp[10], temp[2], -temp[0]; 23: MAD_SAT temp[7].xyz, temp[1].yyyy, temp[10], temp[0]; 24: MUL_SAT temp[7].w, temp[0].wwww, input[0].wwww; 25: MAD_SAT temp[8].x, input[1].xxxx, const[1].xxxx, const[1].yyyy; 26: ADD temp[11], temp[7], -const[2]; 27: MAD output[0].xyz, temp[8].xxxx, temp[11], const[2]; 28: MOV output[0].w, temp[7]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = temp[0], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.zzz, src0.000 3: TEX temp[3], input[2], 2D[3]; 4: src0.xyz = temp[3], src1.xyz = const[3] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xxx 5: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.w = temp[3] RSQ temp[3].w, |src0.w| 7: src0.xyz = temp[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 8: src0.xyz = input[4], src0.w = input[4] DP3, src0.xyz, src0.xyz DP3 temp[4].w, src0.w, src0.w 9: src0.w = temp[4] RSQ temp[4].w, |src0.w| 10: src0.xyz = input[4], src0.w = temp[4] MAD temp[4].xyz, src0.www, src0.xyz, src0.000 11: src0.xyz = temp[4], src1.xyz = temp[3] DP3_SAT temp[5].x, src0.xyz, src1.xyz 12: src0.xyz = temp[5] LG2 temp[9].w, src0.x 13: src0.xyz = const[3], src0.w = temp[9] MAD temp[9].w, src0.w, src0.y, src0.0 14: src0.w = temp[9] REPL_ALPHA temp[5].x EX2, src0.w 15: src0.xyz = temp[5], src1.xyz = const[0] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 16: src0.xyz = temp[5], src1.xyz = temp[1] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 17: src0.xyz = temp[3], src1.xyz = input[3] DP3 temp[6].x, src0.xyz, src1.xyz 18: src0.xyz = temp[6], src1.xyz = const[3] MAD temp[6].x, src0.xxx, src0.111, src1.xxx 19: src0.xyz = temp[6], src1.xyz = const[0] MAX temp[6].x, src0.xxx, src1.yyy 20: src0.xyz = temp[6], src1.xyz = temp[0], src2.xyz = temp[5] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 21: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 22: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[0], src1.w = temp[0] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 23: src0.xyz = temp[1], src1.xyz = temp[10], src2.xyz = temp[0] MAD_SAT temp[7].xyz, src0.yyy, src1.xyz, src2.xyz 24: src0.w = temp[0], src1.w = input[0] MAD_SAT temp[7].w, src0.w, src1.w, src0.0 25: src0.xyz = input[1], src1.xyz = const[1] MAD_SAT temp[8].x, src0.xxx, src1.xxx, src1.yyy 26: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[2], src1.w = const[2] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 27: src0.xyz = temp[8], src1.xyz = temp[11], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 28: src0.w = temp[7] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: TEX temp[3], input[2], 2D[3]; 4: src0.xyz = input[4], src0.w = input[4] DP3, src0.xyz, src0.xyz DP3 temp[4].w, src0.w, src0.w 5: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = const[3] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xxx RSQ temp[4].w, |src0.w| 6: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[4], src0.w = temp[4], src1.w = temp[3] MAD temp[4].xyz, src0.www, src0.xyz, src0.000 RSQ temp[3].w, |src1.w| 8: src0.xyz = temp[3], src0.w = temp[3], src1.w = temp[0], src2.w = input[0] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[7].w, src1.w, src2.w, src0.0 9: src0.xyz = temp[4], src0.w = temp[7], src1.xyz = temp[3] DP3_SAT temp[5].x, src0.xyz, src1.xyz MAD color[0].w, src0.w, src0.1, src0.0 10: src0.xyz = temp[3], src1.xyz = input[3], src2.xyz = temp[5] DP3 temp[6].x, src0.xyz, src1.xyz LG2 temp[9].w, src2.x 11: src0.xyz = temp[6], src0.w = temp[9], src1.xyz = const[3] MAD temp[6].x, src0.xxx, src0.111, src1.xxx MAD temp[9].w, src0.w, src1.y, src0.0 12: src0.w = temp[9] REPL_ALPHA temp[5].x EX2, src0.w 13: src0.xyz = temp[5], src1.xyz = const[0] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 14: src0.xyz = temp[5], src1.xyz = temp[1] MAD temp[5].x, src0.xxx, src1.xxx, src0.000 15: src0.xyz = temp[6], src1.xyz = const[0] MAX temp[6].x, src0.xxx, src1.yyy 16: src0.xyz = temp[0], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.zzz, src0.000 17: src0.xyz = temp[6], src1.xyz = temp[0], src2.xyz = temp[5] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 18: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[0], src1.w = temp[0] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 20: src0.xyz = temp[1], src1.xyz = temp[10], src2.xyz = temp[0] MAD_SAT temp[7].xyz, src0.yyy, src1.xyz, src2.xyz 21: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[2], src1.w = const[2] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 22: src0.xyz = input[1], src1.xyz = const[1] MAD_SAT temp[8].x, src0.xxx, src1.xxx, src1.yyy 23: src0.xyz = temp[8], src1.xyz = temp[11], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[0]; 2: TEX temp[6], temp[1], 2D[1]; 3: TEX temp[8], temp[1], 2D[3]; 4: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[9].w, src0.w, src0.w 5: src0.xyz = temp[8], src0.w = temp[9], src1.xyz = const[3] MAD temp[8].xyz, src0.xyz, src0.111, -src1.xxx RSQ temp[9].w, |src0.w| 6: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 7: src0.xyz = temp[3], src0.w = temp[9], src1.w = temp[8] MAD temp[9].xyz, src0.www, src0.xyz, src0.000 RSQ temp[8].w, |src1.w| 8: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[5], src2.w = temp[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[12].w, src1.w, src2.w, src0.0 9: src0.xyz = temp[9], src0.w = temp[12], src1.xyz = temp[8] DP3_SAT temp[10].x, src0.xyz, src1.xyz MAD color[0].w, src0.w, src0.1, src0.0 10: src0.xyz = temp[8], src1.xyz = temp[2], src2.xyz = temp[10] DP3 temp[11].x, src0.xyz, src1.xyz LG2 temp[14].w, src2.x 11: src0.xyz = temp[11], src0.w = temp[14], src1.xyz = const[3] MAD temp[11].x, src0.xxx, src0.111, src1.xxx MAD temp[14].w, src0.w, src1.y, src0.0 12: src0.w = temp[14] REPL_ALPHA temp[10].x EX2, src0.w 13: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].x, src0.xxx, src1.xxx, src0.000 14: src0.xyz = temp[10], src1.xyz = temp[6] MAD temp[10].x, src0.xxx, src1.xxx, src0.000 15: src0.xyz = temp[11], src1.xyz = const[0] MAX temp[11].x, src0.xxx, src1.yyy 16: src0.xyz = temp[5], src1.xyz = const[0] MAD temp[7].xyz, src0.xyz, src1.zzz, src0.000 17: src0.xyz = temp[11], src1.xyz = temp[5], src2.xyz = temp[10] MAD temp[5].xyz, src0.xxx, src1.xyz, src2.xxx 18: src0.xyz = temp[5], src1.xyz = temp[0] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[5], src1.w = temp[5] MAD temp[15].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[15].w, src0.w, src0.1, -src1.w 20: src0.xyz = temp[6], src1.xyz = temp[15], src2.xyz = temp[5] MAD_SAT temp[12].xyz, src0.yyy, src1.xyz, src2.xyz 21: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = const[2], src1.w = const[2] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 22: src0.xyz = temp[4], src1.xyz = const[1] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy 23: src0.xyz = temp[13], src1.xyz = temp[16], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e401: src: 1 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c091:DP dest:9 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000041:DP3 dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c08:Addr0: 8t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x0004c09b:RSQ dest:9 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00801080:MAD dest:8 rgb_C_src:1 R/R/R 1 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0004d08b:RSQ dest:8 alp_A_src:1 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001408:Addr0: 8t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d0c0:MAD dest:12 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x20490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 8 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x200000a1:DP3 dest:10 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 9 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00a00808:Addr0: 8t, Addr1: 2t, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x000020e9:LN2 dest:14 alp_A_src:2 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000b1:DP3 dest:11 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 10 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00040c0b:Addr0: 11t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x0028c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:1 G 0 targ 0 w:0 5 RGBA_INST: 0x200010b0:MAD dest:11 rgb_C_src:1 R/R/R 0 alp_C_src:0 0 0 11 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c058:EX2 dest:5 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000aa:SOP dest:10 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 13 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0000180a:Addr0: 10t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 14 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x0004000b:Addr0: 11t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000b5:MAX dest:11 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 15 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00040005:Addr0: 5t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00492220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 B/B/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 16 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00a0140b:Addr0: 11t, Addr1: 5t, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00002050:MAD dest:5 rgb_C_src:2 R/R/R 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001407:Addr0: 7t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001407:Addr0: 7t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210f0:MAD dest:15 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 19 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00503c06:Addr0: 6t, Addr1: 15t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442124:rgb_A_src:0 G/G/G 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002220c0:MAD dest:12 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0004080c:Addr0: 12t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0004080c:Addr0: 12t, Addr1: 2c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c100:MAD dest:16 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21100:MAD dest:16 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 21 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250d0:MAD dest:13 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1020400d:Addr0: 13t, Addr1: 16t, Addr2: 2c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[1..2] DCL CONST[4..5] DCL TEMP[0..6] IMM FLT32 { 128.0000, 0.5000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: DP3 TEMP[1].w, IN[3], IN[3] 2: RSQ TEMP[1].w, TEMP[1].wwww 3: MUL TEMP[1].xyz, TEMP[1].wwww, IN[3] 4: DP3 TEMP[2].w, IN[4], IN[4] 5: RSQ TEMP[2].w, TEMP[2].wwww 6: MUL TEMP[2].xyz, TEMP[2].wwww, IN[4] 7: DP3_SAT TEMP[3].x, TEMP[2], TEMP[1] 8: POW TEMP[3].x, TEMP[3].xxxx, IMM[0].xxxx 9: MUL TEMP[3].x, TEMP[3].xxxx, CONST[1].xxxx 10: DP3 TEMP[4].x, TEMP[1], CONST[2] 11: ADD TEMP[4].x, TEMP[4].xxxx, IMM[0].yyyy 12: MAX TEMP[4].x, TEMP[4].xxxx, CONST[1].yyyy 13: MAD TEMP[0].xyz, TEMP[4].xxxx, TEMP[0], TEMP[3].xxxx 14: MUL_SAT TEMP[5], TEMP[0], IN[0] 15: MAD_SAT TEMP[6].x, IN[1].xxxx, CONST[4].xxxx, CONST[4].yyyy 16: LRP OUT[0].xyz, TEMP[6].xxxx, TEMP[5], CONST[5] 17: MOV OUT[0].w, TEMP[5] 18: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, temp[1].wwww; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, temp[2].wwww; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: POW temp[3].x, temp[3].xxxx, const[6].xxxx; 9: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 10: DP3 temp[4].x, temp[1], const[2]; 11: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 12: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 13: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 14: MUL_SAT temp[5], temp[0], input[0]; 15: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 16: LRP output[0].xyz, temp[6].xxxx, temp[5], const[5]; 17: MOV output[0].w, temp[5]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, temp[1].wwww; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, temp[2].wwww; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: POW temp[3].x, temp[3].xxxx, const[6].xxxx; 9: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 10: DP3 temp[4].x, temp[1], const[2]; 11: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 12: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 13: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 14: MUL_SAT temp[5], temp[0], input[0]; 15: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 16: LRP output[0].xyz, temp[6].xxxx, temp[5], const[5]; 17: MOV output[0].w, temp[5]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, temp[1].wwww; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, temp[2].wwww; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: POW temp[3].x, temp[3].xxxx, const[6].xxxx; 9: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 10: DP3 temp[4].x, temp[1], const[2]; 11: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 12: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 13: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 14: MUL_SAT temp[5], temp[0], input[0]; 15: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 16: LRP output[0].xyz, temp[6].xxxx, temp[5], const[5]; 17: MOV output[0].w, temp[5]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, temp[1].wwww; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, temp[2].wwww; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: POW temp[3].x, temp[3].xxxx, const[6].xxxx; 9: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 10: DP3 temp[4].x, temp[1], const[2]; 11: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 12: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 13: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 14: MUL_SAT temp[5], temp[0], input[0]; 15: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 16: LRP output[0].xyz, temp[6].xxxx, temp[5], const[5]; 17: MOV output[0].w, temp[5]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, temp[1].wwww; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, temp[2].wwww; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: POW temp[3].x, temp[3].xxxx, const[6].xxxx; 9: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 10: DP3 temp[4].x, temp[1], const[2]; 11: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 12: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 13: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 14: MUL_SAT temp[5], temp[0], input[0]; 15: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 16: LRP output[0].xyz, temp[6].xxxx, temp[5], const[5]; 17: MOV output[0].w, temp[5]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, |temp[1].wwww|; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, |temp[2].wwww|; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: LG2 temp[7].w, temp[3].xxxx; 9: MUL temp[7].w, temp[7].wwww, const[6].xxxx; 10: EX2 temp[3].x, temp[7].wwww; 11: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 12: DP3 temp[4].x, temp[1], const[2]; 13: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 14: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 15: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 16: MUL_SAT temp[5], temp[0], input[0]; 17: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 18: ADD temp[8], temp[5], -const[5]; 19: MAD output[0].xyz, temp[6].xxxx, temp[8], const[5]; 20: MOV output[0].w, temp[5]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, |temp[1].wwww|; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, |temp[2].wwww|; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: LG2 temp[7].w, temp[3].xxxx; 9: MUL temp[7].w, temp[7].wwww, const[6].xxxx; 10: EX2 temp[3].x, temp[7].wwww; 11: MUL temp[3].x, temp[3].xxxx, const[1].xxxx; 12: DP3 temp[4].x, temp[1], const[2]; 13: ADD temp[4].x, temp[4].xxxx, const[6].yyyy; 14: MAX temp[4].x, temp[4].xxxx, const[1].yyyy; 15: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 16: MUL_SAT temp[5], temp[0], input[0]; 17: MAD_SAT temp[6].x, input[1].xxxx, const[4].xxxx, const[4].yyyy; 18: ADD temp[8], temp[5], -const[5]; 19: MAD output[0].xyz, temp[6].xxxx, temp[8], const[5]; 20: MOV output[0].w, temp[5]; CONST[4] = { 128.0000 0.5000 0.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: DP3 temp[1].w, input[3], input[3]; 2: RSQ temp[1].w, |temp[1].wwww|; 3: MUL temp[1].xyz, temp[1].wwww, input[3]; 4: DP3 temp[2].w, input[4], input[4]; 5: RSQ temp[2].w, |temp[2].wwww|; 6: MUL temp[2].xyz, temp[2].wwww, input[4]; 7: DP3_SAT temp[3].x, temp[2], temp[1]; 8: LG2 temp[7].w, temp[3].xxxx; 9: MUL temp[7].w, temp[7].wwww, const[4].xxxx; 10: EX2 temp[3].x, temp[7].wwww; 11: MUL temp[3].x, temp[3].xxxx, const[0].xxxx; 12: DP3 temp[4].x, temp[1], const[1]; 13: ADD temp[4].x, temp[4].xxxx, const[4].yyyy; 14: MAX temp[4].x, temp[4].xxxx, const[0].yyyy; 15: MAD temp[0].xyz, temp[4].xxxx, temp[0], temp[3].xxxx; 16: MUL_SAT temp[5], temp[0], input[0]; 17: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 18: ADD temp[8], temp[5], -const[3]; 19: MAD output[0].xyz, temp[6].xxxx, temp[8], const[3]; 20: MOV output[0].w, temp[5]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[1].w, src0.w, src0.w 2: src0.w = temp[1] RSQ temp[1].w, |src0.w| 3: src0.xyz = input[3], src0.w = temp[1] MAD temp[1].xyz, src0.www, src0.xyz, src0.000 4: src0.xyz = input[4], src0.w = input[4] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0.w, src0.w 5: src0.w = temp[2] RSQ temp[2].w, |src0.w| 6: src0.xyz = input[4], src0.w = temp[2] MAD temp[2].xyz, src0.www, src0.xyz, src0.000 7: src0.xyz = temp[2], src1.xyz = temp[1] DP3_SAT temp[3].x, src0.xyz, src1.xyz 8: src0.xyz = temp[3] LG2 temp[7].w, src0.x 9: src0.xyz = const[4], src0.w = temp[7] MAD temp[7].w, src0.w, src0.x, src0.0 10: src0.w = temp[7] REPL_ALPHA temp[3].x EX2, src0.w 11: src0.xyz = temp[3], src1.xyz = const[0] MAD temp[3].x, src0.xxx, src1.xxx, src0.000 12: src0.xyz = temp[1], src1.xyz = const[1] DP3 temp[4].x, src0.xyz, src1.xyz 13: src0.xyz = temp[4], src1.xyz = const[4] MAD temp[4].x, src0.xxx, src0.111, src1.yyy 14: src0.xyz = temp[4], src1.xyz = const[0] MAX temp[4].x, src0.xxx, src1.yyy 15: src0.xyz = temp[4], src1.xyz = temp[0], src2.xyz = temp[3] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 16: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[5].w, src0.w, src1.w, src0.0 17: src0.xyz = input[1], src1.xyz = const[2] MAD_SAT temp[6].x, src0.xxx, src1.xxx, src1.yyy 18: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[3], src1.w = const[3] MAD temp[8].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[8].w, src0.w, src0.1, -src1.w 19: src0.xyz = temp[6], src1.xyz = temp[8], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 20: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[0]; 2: src0.xyz = input[4], src0.w = input[4] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0.w, src0.w 3: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[1].w, src0.w, src0.w 4: src0.xyz = input[1], src0.w = temp[1], src1.xyz = const[2] MAD_SAT temp[6].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[1].w, |src0.w| 5: src0.xyz = input[3], src0.w = temp[1], src1.w = temp[2] MAD temp[1].xyz, src0.www, src0.xyz, src0.000 RSQ temp[2].w, |src1.w| 6: src0.xyz = input[4], src0.w = temp[2] MAD temp[2].xyz, src0.www, src0.xyz, src0.000 7: src0.xyz = temp[2], src1.xyz = temp[1] DP3_SAT temp[3].x, src0.xyz, src1.xyz 8: src0.xyz = temp[1], src1.xyz = const[1], src2.xyz = temp[3] DP3 temp[4].x, src0.xyz, src1.xyz LG2 temp[7].w, src2.x 9: src0.xyz = temp[4], src0.w = temp[7], src1.xyz = const[4] MAD temp[4].x, src0.xxx, src0.111, src1.yyy MAD temp[7].w, src0.w, src1.x, src0.0 10: src0.w = temp[7] REPL_ALPHA temp[3].x EX2, src0.w 11: src0.xyz = temp[3], src1.xyz = const[0] MAD temp[3].x, src0.xxx, src1.xxx, src0.000 12: src0.xyz = temp[4], src1.xyz = const[0] MAX temp[4].x, src0.xxx, src1.yyy 13: src0.xyz = temp[4], src1.xyz = temp[0], src2.xyz = temp[3] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xxx 14: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[5].w, src0.w, src1.w, src0.0 15: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[3], src1.w = const[3] MAD temp[8].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[8].w, src0.w, src0.1, -src1.w 16: src0.xyz = temp[6], src0.w = temp[5], src1.xyz = temp[8], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[0]; 2: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 3: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0.w, src0.w 4: src0.xyz = temp[4], src0.w = temp[6], src1.xyz = const[2] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[6].w, |src0.w| 5: src0.xyz = temp[2], src0.w = temp[6], src1.w = temp[7] MAD temp[6].xyz, src0.www, src0.xyz, src0.000 RSQ temp[7].w, |src1.w| 6: src0.xyz = temp[3], src0.w = temp[7] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 7: src0.xyz = temp[7], src1.xyz = temp[6] DP3_SAT temp[8].x, src0.xyz, src1.xyz 8: src0.xyz = temp[6], src1.xyz = const[1], src2.xyz = temp[8] DP3 temp[9].x, src0.xyz, src1.xyz LG2 temp[12].w, src2.x 9: src0.xyz = temp[9], src0.w = temp[12], src1.xyz = const[4] MAD temp[9].x, src0.xxx, src0.111, src1.yyy MAD temp[12].w, src0.w, src1.x, src0.0 10: src0.w = temp[12] REPL_ALPHA temp[8].x EX2, src0.w 11: src0.xyz = temp[8], src1.xyz = const[0] MAD temp[8].x, src0.xxx, src1.xxx, src0.000 12: src0.xyz = temp[9], src1.xyz = const[0] MAX temp[9].x, src0.xxx, src1.yyy 13: src0.xyz = temp[9], src1.xyz = temp[5], src2.xyz = temp[8] MAD temp[5].xyz, src0.xxx, src1.xyz, src2.xxx 14: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = temp[0], src1.w = temp[0] MAD_SAT temp[10].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[10].w, src0.w, src1.w, src0.0 15: src0.xyz = temp[10], src0.w = temp[10], src1.xyz = const[3], src1.w = const[3] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 16: src0.xyz = temp[11], src0.w = temp[10], src1.xyz = temp[13], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000021:DP3 dest:2 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 2 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000011:DP3 dest:1 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 3 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00040804:Addr0: 4t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c06b:RSQ dest:6 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250b0:MAD dest:11 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c06:Addr0: 6t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0004d07b:RSQ dest:7 alp_A_src:1 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00840406:Addr0: 6t, Addr1: 1c, Addr2: 8t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x000020c9:LN2 dest:12 alp_A_src:2 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000091:DP3 dest:9 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 8 0:CMN_INST 0x00004804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041009:Addr0: 9t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x0008c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x20125090:MAD dest:9 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 9 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c038:EX2 dest:3 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x0000008a:SOP dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 10 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040008:Addr0: 8t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00000804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040009:Addr0: 9t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000095:MAX dest:9 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00801409:Addr0: 9t, Addr1: 5t, Addr2: 8t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00002050:MAD dest:5 rgb_C_src:2 R/R/R 0 alp_C_src:0 R 0 13 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x204900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c0a:Addr0: 10t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c0a:Addr0: 10t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210d0:MAD dest:13 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 15 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x1030340b:Addr0: 11t, Addr1: 13t, Addr2: 3c, srcp:0 2:ALPHA_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0..1] DCL TEMP[0..2] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: MUL_SAT TEMP[1], IN[2], TEMP[0] 2: MAD_SAT TEMP[2].x, IN[0].xxxx, CONST[0].xxxx, CONST[0].yyyy 3: LRP OUT[0].xyz, TEMP[2].xxxx, TEMP[1], CONST[1] 4: MOV OUT[0].w, TEMP[1] 5: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: LRP output[0].xyz, temp[2].xxxx, temp[1], const[1]; 4: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL_SAT temp[1], input[2], temp[0]; 2: MAD_SAT temp[2].x, input[0].xxxx, const[0].xxxx, const[0].yyyy; 3: ADD temp[3], temp[1], -const[1]; 4: MAD output[0].xyz, temp[2].xxxx, temp[3], const[1]; 5: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: src0.xyz = input[2], src0.w = input[2], src1.xyz = temp[0], src1.w = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: src0.xyz = input[0], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 4: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 5: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: src0.xyz = input[2], src0.w = input[2], src1.xyz = temp[0], src1.w = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[1].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[3].w, src0.w, src0.1, -src1.w 4: src0.xyz = input[0], src0.w = temp[1], src1.xyz = const[0] MAD_SAT temp[2].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 5: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[0], 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[3], src1.w = temp[3] MAD_SAT temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[4].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[1], src1.w = const[1] MAD temp[6].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[6].w, src0.w, src0.1, -src1.w 4: src0.xyz = temp[2], src0.w = temp[4], src1.xyz = const[0] MAD_SAT temp[5].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 5: src0.xyz = temp[5], src1.xyz = temp[6], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e400: src: 0 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000c01:Addr0: 1t, Addr1: 3t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000c01:Addr0: 1t, Addr1: 3t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21060:MAD dest:6 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 3 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040002:Addr0: 2t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125050:MAD dest:5 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 4 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10101805:Addr0: 5t, Addr1: 6t, Addr2: 1c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program morgo fragged murdog n00b|cheese fragged poopsandwitch poopsandwitch fragged n00b|cheese bozco fragged zlyons murdog fragged morgo n00b|cheese fragged lucas FRAG DCL IN[0], COLOR, PERSPECTIVE DCL OUT[0], COLOR 0: MOV OUT[0], IN[0] 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: src0.xyz = temp[0], src0.w = temp[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490000:MAD dest:0 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..2] DCL TEMP[0..3] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[0], TEMP[0], CONST[0] 3: MUL_SAT TEMP[2], TEMP[0], TEMP[1] 4: MOV_SAT TEMP[2].w, IN[1].zzzz 5: MAD_SAT TEMP[3].x, IN[0].xxxx, CONST[1].xxxx, CONST[1].yyyy 6: LRP OUT[0].xyz, TEMP[3].xxxx, TEMP[2], CONST[2] 7: MOV OUT[0].w, TEMP[2] 8: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: ADD temp[4], temp[2], -const[2]; 7: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 8: MOV output[0].w, temp[2]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: ADD temp[4], temp[2], -const[2]; 7: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 8: MOV output[0].w, temp[2]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], temp[0], const[0]; 3: MUL_SAT temp[2], temp[0], temp[1]; 4: MOV_SAT temp[2].w, input[1].zzzz; 5: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 6: ADD temp[4], temp[2], -const[2]; 7: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 8: MOV output[0].w, temp[2]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = const[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[2].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[2].w, src0.w, src1.w, src0.0 4: src0.xyz = input[1] MAD_SAT temp[2].w, src0.z, src0.1, src0.0 5: src0.xyz = input[0], src1.xyz = const[1] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy 6: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 7: src0.xyz = temp[3], src1.xyz = temp[4], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 8: src0.w = temp[2] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = const[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[2].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[2].w, src0.w, src1.w, src0.0 5: src0.xyz = input[0], src1.xyz = const[1], src2.xyz = input[1] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy MAD_SAT temp[2].w, src2.z, src0.1, src0.0 6: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 7: src0.xyz = temp[3], src0.w = temp[2], src1.xyz = temp[4], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[0], 2D[0]; 2: TEX temp[4], temp[1], 2D[1]; 3: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[0], src1.w = const[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[3].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[4], src1.w = temp[4] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[5].w, src0.w, src1.w, src0.0 5: src0.xyz = temp[2], src1.xyz = const[1], src2.xyz = temp[0] MAD_SAT temp[6].x, src0.xxx, src1.xxx, src1.yyy MAD_SAT temp[5].w, src2.z, src0.1, src0.0 6: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[2], src1.w = const[2] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[7].w, src0.w, src0.1, -src1.w 7: src0.xyz = temp[6], src0.w = temp[5], src1.xyz = temp[7], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e400: src: 0 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040003:Addr0: 3t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040003:Addr0: 3t, Addr1: 0c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c030:MAD dest:3 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490030:MAD dest:3 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001003:Addr0: 3t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001003:Addr0: 3t, Addr1: 4t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c050:MAD dest:5 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 4 0:CMN_INST 0x00184804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0a050:MAD dest:5 alp_A_src:2 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125060:MAD dest:6 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 5 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21070:MAD dest:7 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 6 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x10201c06:Addr0: 6t, Addr1: 7t, Addr2: 2c, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[0] DCL CONST[2] DCL CONST[4..7] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: MUL_SAT TEMP[1].xyz, TEMP[6], TEMP[0] 26: MOV_SAT TEMP[1].w, IN[1].zzzz 27: MAD_SAT TEMP[9].x, IN[0].xxxx, CONST[6].xxxx, CONST[6].yyyy 28: LRP OUT[0].xyz, TEMP[9].xxxx, TEMP[1], CONST[7] 29: MOV OUT[0].w, TEMP[1] 30: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MOV_SAT temp[1].w, input[1].zzzz; 27: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 28: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 29: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MOV_SAT temp[1].w, input[1].zzzz; 27: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 28: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 29: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MOV_SAT temp[1].w, input[1].zzzz; 27: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 28: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 29: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MOV_SAT temp[1].w, input[1].zzzz; 27: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 28: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 29: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[8].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL_SAT temp[1].xyz, temp[6], temp[0]; 26: MOV_SAT temp[1].w, input[1].zzzz; 27: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 28: LRP output[0].xyz, temp[9].xxxx, temp[1], const[7]; 29: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[10].w, temp[8].wwww; 20: MUL temp[10].w, temp[10].wwww, const[8].zzzz; 21: EX2 temp[8].w, temp[10].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 30: ADD temp[11], temp[1], -const[7]; 31: MAD output[0].xyz, temp[9].xxxx, temp[11], const[7]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[10].w, temp[8].wwww; 20: MUL temp[10].w, temp[10].wwww, const[8].zzzz; 21: EX2 temp[8].w, temp[10].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[9].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 30: ADD temp[11], temp[1], -const[7]; 31: MAD output[0].xyz, temp[9].xxxx, temp[11], const[7]; 32: MOV output[0].w, temp[1]; CONST[6] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[6].xxxx, -const[6].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[6].xxxx, -const[6].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[10].w, temp[8].wwww; 20: MUL temp[10].w, temp[10].wwww, const[6].zzzz; 21: EX2 temp[8].w, temp[10].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[9].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 30: ADD temp[11], temp[1], -const[5]; 31: MAD output[0].xyz, temp[9].xxxx, temp[11], const[5]; 32: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[10].w, src0.w 20: src0.xyz = const[6], src0.w = temp[10] MAD temp[10].w, src0.w, src0.z, src0.0 21: src0.w = temp[10] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 29: src0.xyz = input[0], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy 30: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 31: src0.xyz = temp[9], src1.xyz = temp[11], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 32: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 7: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 11: src0.w = temp[8] RSQ temp[8].w, |src0.w| 12: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 13: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 14: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[7], temp[5], 2D[3]; 17: TEX temp[6], temp[5], 2D[0]; 18: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 20: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 21: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 22: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[10].w, src0.w 23: src0.xyz = temp[0], src0.w = temp[10], src1.xyz = const[3], src2.xyz = const[6] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[10].w, src0.w, src2.z, src0.0 24: src0.w = temp[10] EX2 temp[8].w, src0.w 25: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 26: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[11].w, src0.w, src0.1, -src1.w 29: src0.xyz = temp[9], src1.xyz = temp[11], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[1], 2D[1]; 2: TEX temp[6], temp[1], 2D[2]; 3: TEX temp[8], temp[0], 2D[3]; 4: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[6] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[6].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 6: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[4] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[7].w, |src0.w| 7: src0.xyz = temp[2], src0.w = temp[7], src1.xyz = const[1], src1.w = temp[8] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 MAD temp[8].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[7], src0.w = temp[8], src1.xyz = temp[0], src1.w = temp[7], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src1.xyz MAD temp[9].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[6], src1.w = temp[6] MAD temp[12].xyz, src0.xyz, src0.111, src1.xyz MAD temp[12].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[12], src0.w = temp[12] DP3, src0.xyz, src0.xyz DP3 temp[12].w, src0.w, src0.w 11: src0.w = temp[12] RSQ temp[12].w, |src0.w| 12: src0.xyz = temp[12], src0.w = temp[12], src1.w = temp[4], src2.w = const[0] MAD temp[12].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[5].w, src1.w, src2.w, src0.0 13: src0.xyz = temp[0] MAD_SAT temp[5].w, src0.z, src0.1, src0.0 14: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[11], temp[9], 2D[3]; 17: TEX temp[10], temp[9], 2D[0]; 18: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[11], src1.xyz = const[6] MAD temp[11].xyz, src0.xyz, src1.xxx, -src1.yyy 20: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[11], src1.w = temp[11] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[12].w, src0.w, src1.w 21: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[6].xyz, src0.xyz, src1.xyz DP3_SAT temp[6].w, src0.w, src1.w 22: src0.xyz = temp[4], src0.w = temp[12], src1.xyz = temp[6] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[14].w, src0.w 23: src0.xyz = temp[4], src0.w = temp[14], src1.xyz = const[3], src2.xyz = const[6] MAX temp[4].xyz, src0.xyz, src1.xyz MAD temp[14].w, src0.w, src2.z, src0.0 24: src0.w = temp[14] EX2 temp[12].w, src0.w 25: src0.w = temp[12], src1.w = temp[10] MAD temp[12].w, src0.w, src1.w, src0.0 26: src0.xyz = const[2], src0.w = temp[12], src1.xyz = temp[10] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz 27: src0.xyz = temp[10], src1.xyz = temp[4] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[5], src1.w = const[5] MAD temp[15].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[15].w, src0.w, src0.1, -src1.w 29: src0.xyz = temp[13], src1.xyz = temp[15], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e400: src: 0 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925060:MAD dest:6 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041003:Addr0: 3t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250d0:MAD dest:13 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002007:Addr0: 7t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 9 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0cb:RSQ dest:12 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000100c:Addr0: 12t, Addr1: 4t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d050:MAD dest:5 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 12 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c08050:MAD dest:5 alp_A_src:0 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004180b:Addr0: 11t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 18 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000061:DP3 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001804:Addr0: 4t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c0e9:LN2 dest:14 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10640c04:Addr0: 4t, Addr1: 3c, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000045:MAX dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 22 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0c8:EX2 dest:12 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000280c:Addr0: 12t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 24 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002902:Addr0: 2c, Addr1: 10t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000100a:Addr0: 10t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210f0:MAD dest:15 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 27 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10503c0d:Addr0: 13t, Addr1: 15t, Addr2: 5c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..8] DCL TEMP[0..10] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 26: TEX TEMP[9], TEMP[5], SAMP[4], 2D 27: MAD_SAT TEMP[1].xyz, TEMP[9], CONST[6], TEMP[6] 28: MOV_SAT TEMP[1].w, IN[1].zzzz 29: MAD_SAT TEMP[10].x, IN[0].xxxx, CONST[7].xxxx, CONST[7].yyyy 30: LRP OUT[0].xyz, TEMP[10].xxxx, TEMP[1], CONST[8] 31: MOV OUT[0].w, TEMP[1] 32: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: MUL temp[6].xyz, temp[6], temp[0]; 26: TEX temp[9], temp[5], 2D[4]; 27: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[9], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 32: ADD temp[12], temp[1], -const[8]; 33: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[9], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[9], const[6], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 32: ADD temp[12], temp[1], -const[8]; 33: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 34: MOV output[0].w, temp[1]; CONST[7] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[7].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[9], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[9], const[4], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[10].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 32: ADD temp[12], temp[1], -const[6]; 33: MAD output[0].xyz, temp[10].xxxx, temp[12], const[6]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[11].w, src0.w 20: src0.xyz = const[7], src0.w = temp[11] MAD temp[11].w, src0.w, src0.z, src0.0 21: src0.w = temp[11] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 28: TEX temp[9], temp[5], 2D[4]; 29: src0.xyz = temp[9], src1.xyz = const[4], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 30: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 31: src0.xyz = input[0], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy 32: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 33: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 34: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 7: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 11: src0.w = temp[8] RSQ temp[8].w, |src0.w| 12: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 13: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 14: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[9], temp[5], 2D[4]; 17: TEX temp[7], temp[5], 2D[3]; 18: TEX temp[6], temp[5], 2D[0]; 19: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 22: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 23: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[11].w, src0.w 24: src0.xyz = temp[0], src0.w = temp[11], src1.xyz = const[3], src2.xyz = const[7] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[11].w, src0.w, src2.z, src0.0 25: src0.w = temp[11] EX2 temp[8].w, src0.w 26: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 27: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 28: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[9], src1.xyz = const[4], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 30: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 31: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[1], 2D[1]; 2: TEX temp[6], temp[1], 2D[2]; 3: TEX temp[8], temp[0], 2D[3]; 4: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[7] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[6].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 6: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[5] MAD_SAT temp[14].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[7].w, |src0.w| 7: src0.xyz = temp[2], src0.w = temp[7], src1.xyz = const[1], src1.w = temp[8] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 MAD temp[8].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[7], src0.w = temp[8], src1.xyz = temp[0], src1.w = temp[7], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src1.xyz MAD temp[9].w, src0.w, src1.w, src2.w 9: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[6], src1.w = temp[6] MAD temp[12].xyz, src0.xyz, src0.111, src1.xyz MAD temp[12].w, src0.w, src0.1, src1.w 10: src0.xyz = temp[12], src0.w = temp[12] DP3, src0.xyz, src0.xyz DP3 temp[12].w, src0.w, src0.w 11: src0.w = temp[12] RSQ temp[12].w, |src0.w| 12: src0.xyz = temp[12], src0.w = temp[12], src1.w = temp[4], src2.w = const[0] MAD temp[12].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[5].w, src1.w, src2.w, src0.0 13: src0.xyz = temp[0] MAD_SAT temp[5].w, src0.z, src0.1, src0.0 14: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[13], temp[9], 2D[4]; 17: TEX temp[11], temp[9], 2D[3]; 18: TEX temp[10], temp[9], 2D[0]; 19: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[11], src1.xyz = const[7] MAD temp[11].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[11], src1.w = temp[11] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[12].w, src0.w, src1.w 22: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[6].xyz, src0.xyz, src1.xyz DP3_SAT temp[6].w, src0.w, src1.w 23: src0.xyz = temp[4], src0.w = temp[12], src1.xyz = temp[6] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[15].w, src0.w 24: src0.xyz = temp[4], src0.w = temp[15], src1.xyz = const[3], src2.xyz = const[7] MAX temp[4].xyz, src0.xyz, src1.xyz MAD temp[15].w, src0.w, src2.z, src0.0 25: src0.w = temp[15] EX2 temp[12].w, src0.w 26: src0.w = temp[12], src1.w = temp[10] MAD temp[12].w, src0.w, src1.w, src0.0 27: src0.xyz = const[2], src0.w = temp[12], src1.xyz = temp[10] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz 28: src0.xyz = temp[10], src1.xyz = temp[4] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[13], src1.xyz = const[4], src2.xyz = temp[10] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 30: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[6], src1.w = const[6] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 31: src0.xyz = temp[14], src1.xyz = temp[16], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e400: src: 0 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041c06:Addr0: 6t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925060:MAD dest:6 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041403:Addr0: 3t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250e0:MAD dest:14 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002007:Addr0: 7t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001807:Addr0: 7t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 9 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0cb:RSQ dest:12 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000100c:Addr0: 12t, Addr1: 4t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d050:MAD dest:5 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 12 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c08050:MAD dest:5 alp_A_src:0 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40de409: src: 9 R/G/B/A dst: 13 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00041c0b:Addr0: 11t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 19 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0c:Addr0: 12t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0c1:DP dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000061:DP3 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001804:Addr0: 4t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c0f9:LN2 dest:15 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10740c04:Addr0: 4t, Addr1: 3c, Addr2: 7c, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c0f0:MAD dest:15 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000045:MAX dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 23 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000f:Addr0: 15t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0c8:EX2 dest:12 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000280c:Addr0: 12t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 25 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002902:Addr0: 2c, Addr1: 10t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000100a:Addr0: 10t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00a4100d:Addr0: 13t, Addr1: 4c, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041805:Addr0: 5t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041805:Addr0: 5t, Addr1: 6c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c100:MAD dest:16 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21100:MAD dest:16 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 29 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1060400e:Addr0: 14t, Addr1: 16t, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..2] DCL TEMP[0..3] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[1], SAMP[1], 2D 2: MUL TEMP[0], TEMP[0], CONST[0].xxxx 3: MAD_SAT TEMP[2], TEMP[1], CONST[0].yyyy, TEMP[0] 4: MAD_SAT TEMP[3].x, IN[0].xxxx, CONST[1].xxxx, CONST[1].yyyy 5: LRP OUT[0].xyz, TEMP[3].xxxx, TEMP[2], CONST[2] 6: MOV OUT[0].w, TEMP[2] 7: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: LRP output[0].xyz, temp[3].xxxx, temp[2], const[2]; 6: MOV output[0].w, temp[2]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: ADD temp[4], temp[2], -const[2]; 6: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: ADD temp[4], temp[2], -const[2]; 6: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: MUL temp[0], temp[0], const[0].xxxx; 3: MAD_SAT temp[2], temp[1], const[0].yyyy, temp[0]; 4: MAD_SAT temp[3].x, input[0].xxxx, const[1].xxxx, const[1].yyyy; 5: ADD temp[4], temp[2], -const[2]; 6: MAD output[0].xyz, temp[3].xxxx, temp[4], const[2]; 7: MOV output[0].w, temp[2]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[1], 2D[1]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[0], src1.w = temp[0], src2.xyz = temp[0] MAD_SAT temp[2].xyz, src0.xyz, src1.yyy, src2.xyz MAD_SAT temp[2].w, src0.w, src1.y, src1.w 4: src0.xyz = input[0], src1.xyz = const[1] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy 5: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 6: src0.xyz = temp[3], src1.xyz = temp[4], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 7: src0.w = temp[2] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[1], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[0], src1.w = temp[0], src2.xyz = temp[0] MAD_SAT temp[2].xyz, src0.xyz, src1.yyy, src2.xyz MAD_SAT temp[2].w, src0.w, src1.y, src1.w 5: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 6: src0.xyz = input[0], src0.w = temp[2], src1.xyz = const[1] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 7: src0.xyz = temp[3], src1.xyz = temp[4], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], temp[0], 2D[0]; 2: TEX temp[3], temp[0], 2D[1]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[2].w, src0.w, src1.x, src0.0 4: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[0], src1.w = temp[2], src2.xyz = temp[2] MAD_SAT temp[4].xyz, src0.xyz, src1.yyy, src2.xyz MAD_SAT temp[4].w, src0.w, src1.y, src1.w 5: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[2], src1.w = const[2] MAD temp[6].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[6].w, src0.w, src0.1, -src1.w 6: src0.xyz = temp[1], src0.w = temp[4], src1.xyz = const[1] MAD_SAT temp[5].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 7: src0.xyz = temp[5], src1.xyz = temp[6], src2.xyz = const[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe402e400: src: 0 R/G/B/A dst: 2 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe403e400: src: 0 R/G/B/A dst: 3 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040002:Addr0: 2t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c020:MAD dest:2 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x20490020:MAD dest:2 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00240003:Addr0: 3t, Addr1: 0c, Addr2: 2t, srcp:0 2:ALPHA_ADDR 0x00000803:Addr0: 3t, Addr1: 2t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x0028c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 G 0 targ 0 w:0 5 RGBA_INST: 0x1a222040:MAD dest:4 rgb_C_src:2 R/G/B 0 alp_C_src:1 A 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040804:Addr0: 4t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040804:Addr0: 4t, Addr1: 2c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21060:MAD dest:6 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 5 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040401:Addr0: 1t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125050:MAD dest:5 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 6 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10201805:Addr0: 5t, Addr1: 6t, Addr2: 2c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL IN[5], GENERIC[3], PERSPECTIVE DCL IN[6], GENERIC[4], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[6..7] DCL CONST[3..5] DCL TEMP[0..13] IMM FLT32 { 2.0000, 1.0000, 0.0250, 0.0100} IMM FLT32 { 4.0000, 0.5000, 96.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[7], IN[0] 2: DP3 TEMP[1].w, IN[5], IN[5] 3: RSQ TEMP[1].w, TEMP[1].wwww 4: MUL TEMP[1].xyz, TEMP[1].wwww, IN[5] 5: DP3 TEMP[2].w, IN[6], IN[6] 6: RSQ TEMP[2].w, TEMP[2].wwww 7: MUL TEMP[2].xyz, TEMP[2].wwww, IN[6] 8: ADD TEMP[3], TEMP[1], TEMP[2] 9: DP3 TEMP[3].w, TEMP[3], TEMP[3] 10: RSQ TEMP[3].w, TEMP[3].wwww 11: MUL TEMP[3].xyz, TEMP[3].wwww, TEMP[3] 12: TEX TEMP[4], IN[3], SAMP[2], 2D 13: MAD TEMP[4].xy, TEMP[4], IMM[0].xxxx, -IMM[0].yyyy 14: MAD TEMP[5], TEMP[4], IMM[0].zzzz, IN[4] 15: TEX TEMP[6], TEMP[5], SAMP[1], 2D 16: MAD TEMP[6].xyz, TEMP[6], IMM[0].xxxx, -IMM[0].yyyy 17: TEX TEMP[4], TEMP[5], SAMP[2], 2D 18: MAD TEMP[4].xy, TEMP[4], IMM[0].xxxx, -IMM[0].yyyy 19: RCP TEMP[5].w, IN[2].wwww 20: MUL TEMP[5].xy, IN[2], TEMP[5].wwww 21: MAD TEMP[7].xy, TEMP[4], IMM[0].wwww, TEMP[5] 22: TEX TEMP[8], TEMP[7], SAMP[0], 2D 23: TEX TEMP[9], TEMP[7], SAMP[3], 2D 24: TEX TEMP[10].w, TEMP[5], SAMP[3], 2D 25: MOV_SAT TEMP[10].x, TEMP[0].zzzz 26: MAD TEMP[10].w, TEMP[10], IMM[1].xxxx, IN[2].zzzz 27: MUL_SAT TEMP[11].w, TEMP[10].wwww, TEMP[10].xxxx 28: DP3_SAT TEMP[3], TEMP[3], TEMP[6] 29: POW TEMP[3], TEMP[3].xxxx, IMM[1].zzzz 30: MUL TEMP[2], CONST[3], TEMP[2].wwww 31: RCP_SAT TEMP[2], TEMP[2].xxxx 32: MAD TEMP[2], TEMP[2], -CONST[4], CONST[4] 33: DP3_SAT TEMP[12], TEMP[1], TEMP[6] 34: MAD TEMP[12], TEMP[12], IMM[1].yyyy, IMM[1].yyyy 35: LRP TEMP[5], TEMP[12], TEMP[9], TEMP[8] 36: MAD_SAT TEMP[11].xyz, TEMP[3], TEMP[2], TEMP[5] 37: MAD_SAT TEMP[13].x, IN[1].xxxx, CONST[5].xxxx, CONST[5].yyyy 38: LRP OUT[0].xyz, TEMP[13].xxxx, TEMP[11], CONST[6] 39: MOV OUT[0].w, TEMP[11] 40: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: SUB temp[0].y, const[7], temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, temp[2].wwww; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, temp[3].wwww; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: POW temp[3], temp[3].xxxx, const[9].zzzz; 33: MUL temp[2], const[3], temp[2].wwww; 34: RCP_SAT temp[2], temp[2].xxxx; 35: MAD temp[2], temp[2], -const[4], const[4]; 36: DP3_SAT temp[12], temp[1], temp[6]; 37: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 38: LRP temp[5], temp[12], temp[9], temp[8]; 39: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 40: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 41: LRP output[0].xyz, temp[13].xxxx, temp[11], const[6]; 42: MOV output[0].w, temp[11]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: SUB temp[0].y, const[7], temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, temp[2].wwww; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, temp[3].wwww; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: POW temp[3], temp[3].xxxx, const[9].zzzz; 33: MUL temp[2], const[3], temp[2].wwww; 34: RCP_SAT temp[2], temp[2].xxxx; 35: MAD temp[2], temp[2], -const[4], const[4]; 36: DP3_SAT temp[12], temp[1], temp[6]; 37: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 38: LRP temp[5], temp[12], temp[9], temp[8]; 39: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 40: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 41: LRP output[0].xyz, temp[13].xxxx, temp[11], const[6]; 42: MOV output[0].w, temp[11]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: SUB temp[0].y, const[7], temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, temp[2].wwww; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, temp[3].wwww; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: POW temp[3], temp[3].xxxx, const[9].zzzz; 33: MUL temp[2], const[3], temp[2].wwww; 34: RCP_SAT temp[2], temp[2].xxxx; 35: MAD temp[2], temp[2], -const[4], const[4]; 36: DP3_SAT temp[12], temp[1], temp[6]; 37: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 38: LRP temp[5], temp[12], temp[9], temp[8]; 39: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 40: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 41: LRP output[0].xyz, temp[13].xxxx, temp[11], const[6]; 42: MOV output[0].w, temp[11]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: SUB temp[0].y, const[7], temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, temp[2].wwww; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, temp[3].wwww; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: POW temp[3], temp[3].xxxx, const[9].zzzz; 33: MUL temp[2], const[3], temp[2].wwww; 34: RCP_SAT temp[2], temp[2].xxxx; 35: MAD temp[2], temp[2], -const[4], const[4]; 36: DP3_SAT temp[12], temp[1], temp[6]; 37: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 38: LRP temp[5], temp[12], temp[9], temp[8]; 39: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 40: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 41: LRP output[0].xyz, temp[13].xxxx, temp[11], const[6]; 42: MOV output[0].w, temp[11]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: SUB temp[0].y, const[7], temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, temp[2].wwww; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, temp[3].wwww; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: POW temp[3], temp[3].xxxx, const[9].zzzz; 33: MUL temp[2], const[3], temp[2].wwww; 34: RCP_SAT temp[2], temp[2].xxxx; 35: MAD temp[2], temp[2], -const[4], const[4]; 36: DP3_SAT temp[12], temp[1], temp[6]; 37: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 38: LRP temp[5], temp[12], temp[9], temp[8]; 39: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 40: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 41: LRP output[0].xyz, temp[13].xxxx, temp[11], const[6]; 42: MOV output[0].w, temp[11]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: ADD temp[0].y, const[7], -temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, |temp[1].wwww|; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, |temp[2].wwww|; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, |temp[3].wwww|; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: LG2 temp[15].w, temp[3].xxxx; 33: MUL temp[15].w, temp[15].wwww, const[9].zzzz; 34: EX2 temp[3], temp[15].wwww; 35: MUL temp[2], const[3], temp[2].wwww; 36: RCP_SAT temp[2], temp[2].xxxx; 37: MAD temp[2], temp[2], -const[4], const[4]; 38: DP3_SAT temp[12], temp[1], temp[6]; 39: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 40: ADD temp[16], temp[9], -temp[8]; 41: MAD temp[5], temp[12], temp[16], temp[8]; 42: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 43: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 44: ADD temp[17], temp[11], -const[6]; 45: MAD output[0].xyz, temp[13].xxxx, temp[17], const[6]; 46: MOV output[0].w, temp[11]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[14]; 4: ADD temp[0].y, const[7], -temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, |temp[1].wwww|; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, |temp[2].wwww|; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, |temp[3].wwww|; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 17: MAD temp[5], temp[4], const[8].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[8].xxxx, -const[8].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[8].xxxx, -const[8].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[8].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[9].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: LG2 temp[15].w, temp[3].xxxx; 33: MUL temp[15].w, temp[15].wwww, const[9].zzzz; 34: EX2 temp[3], temp[15].wwww; 35: MUL temp[2], const[3], temp[2].wwww; 36: RCP_SAT temp[2], temp[2].xxxx; 37: MAD temp[2], temp[2], -const[4], const[4]; 38: DP3_SAT temp[12], temp[1], temp[6]; 39: MAD temp[12], temp[12], const[9].yyyy, const[9].yyyy; 40: ADD temp[16], temp[9], -temp[8]; 41: MAD temp[5], temp[12], temp[16], temp[8]; 42: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 43: MAD_SAT temp[13].x, input[1].xxxx, const[5].xxxx, const[5].yyyy; 44: ADD temp[17], temp[11], -const[6]; 45: MAD output[0].xyz, temp[13].xxxx, temp[17], const[6]; 46: MOV output[0].w, temp[11]; CONST[5] = { 2.0000 1.0000 0.0250 0.0100 } CONST[6] = { 4.0000 0.5000 96.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: RCP temp[14].w, input[0].wwww; 1: MUL temp[14].xyz, input[0], temp[14].wwww; 2: MAD temp[14].xyz, temp[14].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[14]; 4: ADD temp[0].y, const[4], -temp[14]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, |temp[1].wwww|; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: DP3 temp[2].w, input[6], input[6]; 9: RSQ temp[2].w, |temp[2].wwww|; 10: MUL temp[2].xyz, temp[2].wwww, input[6]; 11: ADD temp[3], temp[1], temp[2]; 12: DP3 temp[3].w, temp[3], temp[3]; 13: RSQ temp[3].w, |temp[3].wwww|; 14: MUL temp[3].xyz, temp[3].wwww, temp[3]; 15: TEX temp[4], input[3], 2D[2]; 16: MAD temp[4].xy, temp[4], const[5].xxxx, -const[5].yyyy; 17: MAD temp[5], temp[4], const[5].zzzz, input[4]; 18: TEX temp[6], temp[5], 2D[1]; 19: MAD temp[6].xyz, temp[6], const[5].xxxx, -const[5].yyyy; 20: TEX temp[4], temp[5], 2D[2]; 21: MAD temp[4].xy, temp[4], const[5].xxxx, -const[5].yyyy; 22: RCP temp[5].w, input[2].wwww; 23: MUL temp[5].xy, input[2], temp[5].wwww; 24: MAD temp[7].xy, temp[4], const[5].wwww, temp[5]; 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: MOV_SAT temp[10].x, temp[0].zzzz; 29: MAD temp[10].w, temp[10], const[6].xxxx, input[2].zzzz; 30: MUL_SAT temp[11].w, temp[10].wwww, temp[10].xxxx; 31: DP3_SAT temp[3], temp[3], temp[6]; 32: LG2 temp[15].w, temp[3].xxxx; 33: MUL temp[15].w, temp[15].wwww, const[6].zzzz; 34: EX2 temp[3], temp[15].wwww; 35: MUL temp[2], const[0], temp[2].wwww; 36: RCP_SAT temp[2], temp[2].xxxx; 37: MAD temp[2], temp[2], -const[1], const[1]; 38: DP3_SAT temp[12], temp[1], temp[6]; 39: MAD temp[12], temp[12], const[6].yyyy, const[6].yyyy; 40: ADD temp[16], temp[9], -temp[8]; 41: MAD temp[5], temp[12], temp[16], temp[8]; 42: MAD_SAT temp[11].xyz, temp[3], temp[2], temp[5]; 43: MAD_SAT temp[13].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 44: ADD temp[17], temp[11], -const[3]; 45: MAD output[0].xyz, temp[13].xxxx, temp[17], const[3]; 46: MOV output[0].w, temp[11]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: src0.w = input[0] RCP temp[14].w, src0.w 1: src0.xyz = input[0], src0.w = temp[14] MAD temp[14].xyz, src0.xyz, src0.www, src0.000 2: src0.xyz = temp[14], src1.xyz = const[7], src2.xyz = const[8] MAD temp[14].xyz, src0.xyz, src1.xyz, src2.xyz 3: src0.xyz = temp[14], src0.w = temp[14] MAD temp[0].xyz, src0.xyz, src0.111, src0.000 MAD temp[0].w, src0.w, src0.1, src0.0 4: src0.xyz = const[4], src1.xyz = temp[14] MAD temp[0].y, src0.xyz, src0.111, -src1.xyz 5: src0.xyz = input[5], src0.w = input[5] DP3, src0.xyz, src0.xyz DP3 temp[1].w, src0.w, src0.w 6: src0.w = temp[1] RSQ temp[1].w, |src0.w| 7: src0.xyz = input[5], src0.w = temp[1] MAD temp[1].xyz, src0.www, src0.xyz, src0.000 8: src0.xyz = input[6], src0.w = input[6] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0.w, src0.w 9: src0.w = temp[2] RSQ temp[2].w, |src0.w| 10: src0.xyz = input[6], src0.w = temp[2] MAD temp[2].xyz, src0.www, src0.xyz, src0.000 11: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[2], src1.w = temp[2] MAD temp[3].xyz, src0.xyz, src0.111, src1.xyz MAD temp[3].w, src0.w, src0.1, src1.w 12: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 13: src0.w = temp[3] RSQ temp[3].w, |src0.w| 14: src0.xyz = temp[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 15: TEX temp[4], input[3], 2D[2]; 16: src0.xyz = temp[4], src1.xyz = const[5] MAD temp[4].xy, src0.xyz, src1.xxx, -src1.yyy 17: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[5], src1.w = input[4], src2.xyz = input[4] MAD temp[5].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[5].w, src0.w, src1.z, src1.w 18: TEX temp[6], temp[5], 2D[1]; 19: src0.xyz = temp[6], src1.xyz = const[5] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy 20: TEX temp[4], temp[5], 2D[2]; 21: src0.xyz = temp[4], src1.xyz = const[5] MAD temp[4].xy, src0.xyz, src1.xxx, -src1.yyy 22: src0.w = input[2] RCP temp[5].w, src0.w 23: src0.xyz = input[2], src0.w = temp[5] MAD temp[5].xy, src0.xyz, src0.www, src0.000 24: src0.xyz = temp[4], src0.w = const[5], src1.xyz = temp[5] MAD temp[7].xy, src0.xyz, src0.www, src1.xyz 25: TEX temp[8], temp[7], 2D[0]; 26: TEX temp[9], temp[7], 2D[3]; 27: TEX temp[10].w, temp[5], 2D[3]; 28: src0.xyz = temp[0] MAD_SAT temp[10].x, src0.zzz, src0.111, src0.000 29: src0.xyz = const[6], src0.w = temp[10], src1.xyz = input[2] MAD temp[10].w, src0.w, src0.x, src1.z 30: src0.xyz = temp[10], src0.w = temp[10] MAD_SAT temp[11].w, src0.w, src0.x, src0.0 31: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[3].xyz, src0.xyz, src1.xyz DP3_SAT temp[3].w, src0.w, src1.w 32: src0.xyz = temp[3] LG2 temp[15].w, src0.x 33: src0.xyz = const[6], src0.w = temp[15] MAD temp[15].w, src0.w, src0.z, src0.0 34: src0.w = temp[15] REPL_ALPHA temp[3].xyz EX2 temp[3].w, src0.w 35: src0.xyz = const[0], src0.w = const[0], src1.w = temp[2] MAD temp[2].xyz, src0.xyz, src1.www, src0.000 MAD temp[2].w, src0.w, src1.w, src0.0 36: src0.xyz = temp[2] REPL_ALPHA_SAT temp[2].xyz RCP_SAT temp[2].w, src0.x 37: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[1], src1.w = const[1] MAD temp[2].xyz, src0.xyz, -src1.xyz, src1.xyz MAD temp[2].w, src0.w, -src1.w, src1.w 38: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[12].xyz, src0.xyz, src1.xyz DP3_SAT temp[12].w, src0.w, src1.w 39: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = const[6] MAD temp[12].xyz, src0.xyz, src1.yyy, src1.yyy MAD temp[12].w, src0.w, src1.y, src1.y 40: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = temp[8], src1.w = temp[8] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 41: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[16], src1.w = temp[16], src2.xyz = temp[8], src2.w = temp[8] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz MAD temp[5].w, src0.w, src1.w, src2.w 42: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[5] MAD_SAT temp[11].xyz, src0.xyz, src1.xyz, src2.xyz 43: src0.xyz = input[1], src1.xyz = const[2] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy 44: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = const[3], src1.w = const[3] MAD temp[17].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[17].w, src0.w, src0.1, -src1.w 45: src0.xyz = temp[13], src1.xyz = temp[17], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 46: src0.w = temp[11] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], input[3], 2D[2]; 2: src0.xyz = input[6], src0.w = input[6] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0.w, src0.w 3: src0.xyz = input[5], src0.w = input[5] DP3, src0.xyz, src0.xyz DP3 temp[1].w, src0.w, src0.w 4: src0.xyz = temp[4], src0.w = temp[1], src1.xyz = const[5] MAD temp[4].xy, src0.xyz, src1.xxx, -src1.yyy RSQ temp[1].w, |src0.w| 5: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[5], src1.w = input[4], src2.xyz = input[4] MAD temp[5].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[5].w, src0.w, src1.z, src1.w 6: src0.xyz = input[5], src0.w = temp[1], src1.w = temp[2] MAD temp[1].xyz, src0.www, src0.xyz, src0.000 RSQ temp[2].w, |src1.w| 7: src0.xyz = input[6], src0.w = temp[2], src1.w = input[0] MAD temp[2].xyz, src0.www, src0.xyz, src0.000 RCP temp[14].w, src1.w 8: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[2], src1.w = temp[2] MAD temp[3].xyz, src0.xyz, src0.111, src1.xyz MAD temp[3].w, src0.w, src0.1, src1.w 9: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 10: src0.xyz = const[0], src0.w = const[0], src1.w = temp[2] MAD temp[2].xyz, src0.xyz, src1.www, src0.000 MAD temp[2].w, src0.w, src1.w, src0.0 11: src0.xyz = temp[2] REPL_ALPHA_SAT temp[2].xyz RCP_SAT temp[2].w, src0.x 12: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[1], src1.w = const[1] MAD temp[2].xyz, src0.xyz, -src1.xyz, src1.xyz MAD temp[2].w, src0.w, -src1.w, src1.w 13: src0.xyz = input[0], src0.w = temp[14], src1.w = temp[3] MAD temp[14].xyz, src0.xyz, src0.www, src0.000 RSQ temp[3].w, |src1.w| 14: src0.xyz = temp[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 15: src0.xyz = temp[14], src1.xyz = const[7], src2.xyz = const[8] MAD temp[14].xyz, src0.xyz, src1.xyz, src2.xyz 16: src0.xyz = temp[14], src0.w = temp[14] MAD temp[0].xyz, src0.xyz, src0.111, src0.000 MAD temp[0].w, src0.w, src0.1, src0.0 17: src0.xyz = temp[0] MAD_SAT temp[10].x, src0.zzz, src0.111, src0.000 18: src0.xyz = const[4], src1.xyz = temp[14] MAD temp[0].y, src0.xyz, src0.111, -src1.xyz 19: src0.xyz = input[1], src1.xyz = const[2] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy 20: BEGIN_TEX; 21: TEX temp[4], temp[5], 2D[2]; 22: TEX temp[6], temp[5], 2D[1]; 23: src0.xyz = temp[6], src0.w = input[2], src1.xyz = const[5] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy RCP temp[5].w, src0.w 24: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[3].xyz, src0.xyz, src1.xyz DP3_SAT temp[3].w, src0.w, src1.w 25: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[12].xyz, src0.xyz, src1.xyz DP3_SAT temp[12].w, src0.w, src1.w 26: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = const[6] MAD temp[12].xyz, src0.xyz, src1.yyy, src1.yyy MAD temp[12].w, src0.w, src1.y, src1.y 27: src0.xyz = input[2], src0.w = temp[5], src1.xyz = temp[3] MAD temp[5].xy, src0.xyz, src0.www, src0.000 LG2 temp[15].w, src1.x 28: src0.xyz = temp[4], src0.w = temp[15], src1.xyz = const[5], src2.xyz = const[6] MAD temp[4].xy, src0.xyz, src1.xxx, -src1.yyy MAD temp[15].w, src0.w, src2.z, src0.0 29: src0.w = temp[15] REPL_ALPHA temp[3].xyz EX2 temp[3].w, src0.w 30: src0.xyz = temp[4], src0.w = const[5], src1.xyz = temp[5] MAD temp[7].xy, src0.xyz, src0.www, src1.xyz 31: BEGIN_TEX; 32: TEX temp[10].w, temp[5], 2D[3]; 33: TEX temp[9], temp[7], 2D[3]; 34: TEX temp[8], temp[7], 2D[0]; 35: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = temp[8], src1.w = temp[8] MAD temp[16].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[16].w, src0.w, src0.1, -src1.w 36: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[16], src1.w = temp[16], src2.xyz = temp[8], src2.w = temp[8] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz MAD temp[5].w, src0.w, src1.w, src2.w 37: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[5] MAD_SAT temp[11].xyz, src0.xyz, src1.xyz, src2.xyz 38: src0.xyz = const[6], src0.w = temp[10], src1.xyz = input[2] MAD temp[10].w, src0.w, src0.x, src1.z 39: src0.xyz = temp[10], src0.w = temp[10] MAD_SAT temp[11].w, src0.w, src0.x, src0.0 40: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = const[3], src1.w = const[3] MAD temp[17].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[17].w, src0.w, src0.1, -src1.w 41: src0.xyz = temp[13], src0.w = temp[11], src1.xyz = temp[17], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[11], temp[1], 2D[2]; 2: src0.xyz = temp[4], src0.w = temp[4] DP3, src0.xyz, src0.xyz DP3 temp[9].w, src0.w, src0.w 3: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 4: src0.xyz = temp[11], src0.w = temp[8], src1.xyz = const[5] MAD temp[11].xy, src0.xyz, src1.xxx, -src1.yyy RSQ temp[8].w, |src0.w| 5: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = const[5], src1.w = temp[2], src2.xyz = temp[2] MAD temp[12].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[12].w, src0.w, src1.z, src1.w 6: src0.xyz = temp[3], src0.w = temp[8], src1.w = temp[9] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 RSQ temp[9].w, |src1.w| 7: src0.xyz = temp[4], src0.w = temp[9], src1.w = temp[6] MAD temp[9].xyz, src0.www, src0.xyz, src0.000 RCP temp[21].w, src1.w 8: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[9], src1.w = temp[9] MAD temp[10].xyz, src0.xyz, src0.111, src1.xyz MAD temp[10].w, src0.w, src0.1, src1.w 9: src0.xyz = temp[10], src0.w = temp[10] DP3, src0.xyz, src0.xyz DP3 temp[10].w, src0.w, src0.w 10: src0.xyz = const[0], src0.w = const[0], src1.w = temp[9] MAD temp[9].xyz, src0.xyz, src1.www, src0.000 MAD temp[9].w, src0.w, src1.w, src0.0 11: src0.xyz = temp[9] REPL_ALPHA_SAT temp[9].xyz RCP_SAT temp[9].w, src0.x 12: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = const[1], src1.w = const[1] MAD temp[9].xyz, src0.xyz, -src1.xyz, src1.xyz MAD temp[9].w, src0.w, -src1.w, src1.w 13: src0.xyz = temp[6], src0.w = temp[21], src1.w = temp[10] MAD temp[21].xyz, src0.xyz, src0.www, src0.000 RSQ temp[10].w, |src1.w| 14: src0.xyz = temp[10], src0.w = temp[10] MAD temp[10].xyz, src0.www, src0.xyz, src0.000 15: src0.xyz = temp[21], src1.xyz = const[7], src2.xyz = const[8] MAD temp[21].xyz, src0.xyz, src1.xyz, src2.xyz 16: src0.xyz = temp[21], src0.w = temp[21] MAD temp[7].xyz, src0.xyz, src0.111, src0.000 MAD temp[7].w, src0.w, src0.1, src0.0 17: src0.xyz = temp[7] MAD_SAT temp[17].x, src0.zzz, src0.111, src0.000 18: src0.xyz = const[4], src1.xyz = temp[21] MAD temp[7].y, src0.xyz, src0.111, -src1.xyz 19: src0.xyz = temp[5], src1.xyz = const[2] MAD_SAT temp[20].x, src0.xxx, src1.xxx, src1.yyy 20: BEGIN_TEX; 21: TEX temp[11], temp[12], 2D[2]; 22: TEX temp[13], temp[12], 2D[1]; 23: src0.xyz = temp[13], src0.w = temp[0], src1.xyz = const[5] MAD temp[13].xyz, src0.xyz, src1.xxx, -src1.yyy RCP temp[12].w, src0.w 24: src0.xyz = temp[10], src0.w = temp[10], src1.xyz = temp[13], src1.w = temp[13] DP3_SAT temp[10].xyz, src0.xyz, src1.xyz DP3_SAT temp[10].w, src0.w, src1.w 25: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[13], src1.w = temp[13] DP3_SAT temp[19].xyz, src0.xyz, src1.xyz DP3_SAT temp[19].w, src0.w, src1.w 26: src0.xyz = temp[19], src0.w = temp[19], src1.xyz = const[6] MAD temp[19].xyz, src0.xyz, src1.yyy, src1.yyy MAD temp[19].w, src0.w, src1.y, src1.y 27: src0.xyz = temp[0], src0.w = temp[12], src1.xyz = temp[10] MAD temp[12].xy, src0.xyz, src0.www, src0.000 LG2 temp[22].w, src1.x 28: src0.xyz = temp[11], src0.w = temp[22], src1.xyz = const[5], src2.xyz = const[6] MAD temp[11].xy, src0.xyz, src1.xxx, -src1.yyy MAD temp[22].w, src0.w, src2.z, src0.0 29: src0.w = temp[22] REPL_ALPHA temp[10].xyz EX2 temp[10].w, src0.w 30: src0.xyz = temp[11], src0.w = const[5], src1.xyz = temp[12] MAD temp[14].xy, src0.xyz, src0.www, src1.xyz 31: BEGIN_TEX; 32: TEX temp[17].w, temp[12], 2D[3]; 33: TEX temp[16], temp[14], 2D[3]; 34: TEX temp[15], temp[14], 2D[0]; 35: src0.xyz = temp[16], src0.w = temp[16], src1.xyz = temp[15], src1.w = temp[15] MAD temp[23].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[23].w, src0.w, src0.1, -src1.w 36: src0.xyz = temp[19], src0.w = temp[19], src1.xyz = temp[23], src1.w = temp[23], src2.xyz = temp[15], src2.w = temp[15] MAD temp[12].xyz, src0.xyz, src1.xyz, src2.xyz MAD temp[12].w, src0.w, src1.w, src2.w 37: src0.xyz = temp[10], src1.xyz = temp[9], src2.xyz = temp[12] MAD_SAT temp[18].xyz, src0.xyz, src1.xyz, src2.xyz 38: src0.xyz = const[6], src0.w = temp[17], src1.xyz = temp[0] MAD temp[17].w, src0.w, src0.x, src1.z 39: src0.xyz = temp[17], src0.w = temp[17] MAD_SAT temp[18].w, src0.w, src0.x, src0.0 40: src0.xyz = temp[18], src0.w = temp[18], src1.xyz = const[3], src1.w = const[3] MAD temp[24].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[24].w, src0.w, src0.1, -src1.w 41: src0.xyz = temp[20], src0.w = temp[18], src1.xyz = temp[24], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be401: src: 1 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c091:DP dest:9 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000021:DP3 dest:2 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 2 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000011:DP3 dest:1 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 3 0:CMN_INST 0x00005804:ALU TEX_WAIT wmask: ARG omask: NONE 1:RGB_ADDR 0x0004140b:Addr0: 11t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c08b:RSQ dest:8 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0024140b:Addr0: 11t, Addr1: 5c, Addr2: 2t, srcp:0 2:ALPHA_ADDR 0x0000080b:Addr0: 11t, Addr1: 2t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00492220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 B/B/B 0 targ: 0 4 ALPHA_INST:0x0048c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 B 0 targ 0 w:0 5 RGBA_INST: 0x1a2220c0:MAD dest:12 rgb_C_src:2 R/G/B 0 alp_C_src:1 A 0 5 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0004d09b:RSQ dest:9 alp_A_src:1 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001809:Addr0: 9t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000d15a:RCP dest:21 alp_A_src:1 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 8 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0a1:DP dest:10 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000100:Addr0: 0c, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002500:Addr0: 0c, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x006da220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 A/A/A 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000009a:RCP dest:9 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x0000009a:SOP dest:9 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040409:Addr0: 9t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040409:Addr0: 9t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x01442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 1 targ: 0 4 ALPHA_INST:0x0168c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 1 targ 0 w:0 5 RGBA_INST: 0x1a221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 12 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002815:Addr0: 21t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x006d8220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 A/A/A 0 targ: 0 4 ALPHA_INST:0x0004d0ab:RSQ dest:10 alp_A_src:1 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490150:MAD dest:21 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 13 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 14 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x10841c15:Addr0: 21t, Addr1: 7c, Addr2: 8c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222150:MAD dest:21 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 15 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000015:Addr0: 21t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000015:Addr0: 21t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 16 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0248:rgb_A_src:0 B/B/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490110:MAD dest:17 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00001004:ALU TEX_WAIT wmask: G omask: NONE 1:RGB_ADDR 0x00005504:Addr0: 4c, Addr1: 21t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00a21070:MAD dest:7 rgb_C_src:1 R/G/B 1 alp_C_src:0 R 0 18 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125140:MAD dest:20 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be40c: src: 12 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 20 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40de40c: src: 12 R/G/B/A dst: 13 R/G/B/A 3:TEX_DXDY: 0x00000000 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0004140d:Addr0: 13t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0ca:RCP dest:12 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250d0:MAD dest:13 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 22 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000340a:Addr0: 10t, Addr1: 13t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000340a:Addr0: 10t, Addr1: 13t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0a1:DP dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x000000a1:DP3 dest:10 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00003408:Addr0: 8t, Addr1: 13t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00003408:Addr0: 8t, Addr1: 13t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c131:DP dest:19 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000131:DP3 dest:19 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041813:Addr0: 19t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000013:Addr0: 19t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0024a220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 G/G/G 0 targ: 0 4 ALPHA_INST:0x0028c130:MAD dest:19 alp_A_src:0 A 0 alp_B_src:1 G 0 targ 0 w:0 5 RGBA_INST: 0x0a125130:MAD dest:19 rgb_C_src:1 G/G/G 0 alp_C_src:1 G 0 25 0:CMN_INST 0x00005804:ALU TEX_WAIT wmask: ARG omask: NONE 1:RGB_ADDR 0x00002800:Addr0: 0t, Addr1: 10t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000c:Addr0: 12t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x006d8220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 A/A/A 0 targ: 0 4 ALPHA_INST:0x00001169:LN2 dest:22 alp_A_src:1 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00005804:ALU TEX_WAIT wmask: ARG omask: NONE 1:RGB_ADDR 0x1064140b:Addr0: 11t, Addr1: 5c, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x00000016:Addr0: 22t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0050c160:MAD dest:22 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x209250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 0 0 27 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000016:Addr0: 22t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0a8:EX2 dest:10 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x000000aa:SOP dest:10 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00001804:ALU TEX_WAIT wmask: RG omask: NONE 1:RGB_ADDR 0x0000300b:Addr0: 11t, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000105:Addr0: 5c, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x006d8220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 A/A/A 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210e0:MAD dest:14 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 29 0:CMN_INST 0x00004007:TEX TEX_WAIT wmask: A omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe411e40c: src: 12 R/G/B/A dst: 17 R/G/B/A 3:TEX_DXDY: 0x00000000 30 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe410e40e: src: 14 R/G/B/A dst: 16 R/G/B/A 3:TEX_DXDY: 0x00000000 31 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40fe40e: src: 14 R/G/B/A dst: 15 R/G/B/A 3:TEX_DXDY: 0x00000000 32 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00003c10:Addr0: 16t, Addr1: 15t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00003c10:Addr0: 16t, Addr1: 15t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c170:MAD dest:23 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21170:MAD dest:23 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 33 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00f05c13:Addr0: 19t, Addr1: 23t, Addr2: 15t, srcp:0 2:ALPHA_ADDR 0x00f05c13:Addr0: 19t, Addr1: 23t, Addr2: 15t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0c0:MAD dest:12 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2220c0:MAD dest:12 rgb_C_src:2 R/G/B 0 alp_C_src:2 A 0 34 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00c0240a:Addr0: 10t, Addr1: 9t, Addr2: 12t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222120:MAD dest:18 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 35 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000106:Addr0: 6c, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c110:MAD dest:17 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x12000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:1 B 0 36 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c120:MAD dest:18 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 37 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c12:Addr0: 18t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c12:Addr0: 18t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c180:MAD dest:24 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21180:MAD dest:24 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 38 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x10306014:Addr0: 20t, Addr1: 24t, Addr2: 3c, srcp:0 2:ALPHA_ADDR 0x00000012:Addr0: 18t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 r300: Initial fragment program rapide fragged Earathon FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..3] DCL TEMP[0..4] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: DPH_SAT TEMP[2].x, -IN[3], IN[3] 3: MAD TEMP[1].xyz, CONST[0], TEMP[2].xxxx, TEMP[1] 4: MUL TEMP[0], TEMP[0], CONST[1] 5: MUL_SAT TEMP[3], TEMP[0], TEMP[1] 6: MOV_SAT TEMP[3].w, IN[1].zzzz 7: MAD_SAT TEMP[4].x, IN[0].xxxx, CONST[2].xxxx, CONST[2].yyyy 8: LRP OUT[0].xyz, TEMP[4].xxxx, TEMP[3], CONST[3] 9: MOV OUT[0].w, TEMP[3] 10: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: LRP output[0].xyz, temp[4].xxxx, temp[3], const[3]; 9: MOV output[0].w, temp[3]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: ADD temp[5], temp[3], -const[3]; 9: MAD output[0].xyz, temp[4].xxxx, temp[5], const[3]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: ADD temp[5], temp[3], -const[3]; 9: MAD output[0].xyz, temp[4].xxxx, temp[5], const[3]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: MUL temp[0], temp[0], const[1]; 5: MUL_SAT temp[3], temp[0], temp[1]; 6: MOV_SAT temp[3].w, input[1].zzzz; 7: MAD_SAT temp[4].x, input[0].xxxx, const[2].xxxx, const[2].yyyy; 8: ADD temp[5], temp[3], -const[3]; 9: MAD output[0].xyz, temp[4].xxxx, temp[5], const[3]; 10: MOV output[0].w, temp[3]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 3: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 6: src0.xyz = input[1] MAD_SAT temp[3].w, src0.z, src0.1, src0.0 7: src0.xyz = input[0], src1.xyz = const[2] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy 8: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[3], src1.w = const[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 9: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 10: src0.w = temp[3] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 7: src0.xyz = input[0], src1.xyz = const[2], src2.xyz = input[1] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy MAD_SAT temp[3].w, src2.z, src0.1, src0.0 8: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[3], src1.w = const[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 9: src0.xyz = temp[4], src0.w = temp[3], src1.xyz = temp[5], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[0], 2D[0]; 2: TEX temp[5], temp[1], 2D[1]; 3: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[1], src1.w = const[1] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[4].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[2], src0.w = temp[2] DP4_SAT temp[6].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[6], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = temp[5], src1.w = temp[5] MAD_SAT temp[7].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[7].w, src0.w, src1.w, src0.0 7: src0.xyz = temp[3], src1.xyz = const[2], src2.xyz = temp[0] MAD_SAT temp[8].x, src0.xxx, src1.xxx, src1.yyy MAD_SAT temp[7].w, src2.z, src0.1, src0.0 8: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[3], src1.w = const[3] MAD temp[9].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[9].w, src0.w, src0.1, -src1.w 9: src0.xyz = temp[8], src0.w = temp[7], src1.xyz = temp[9], src2.xyz = const[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e400: src: 0 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040404:Addr0: 4t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000062:DP4 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00501900:Addr0: 0c, Addr1: 6t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001404:Addr0: 4t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001404:Addr0: 4t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 6 0:CMN_INST 0x00184804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00040803:Addr0: 3t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0a070:MAD dest:7 alp_A_src:2 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125080:MAD dest:8 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040c07:Addr0: 7t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c07:Addr0: 7t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21090:MAD dest:9 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 8 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x10302408:Addr0: 8t, Addr1: 9t, Addr2: 3c, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[0] DCL CONST[2] DCL CONST[4..8] DCL TEMP[0..10] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: MUL_SAT TEMP[1].xyz, TEMP[6], TEMP[0] 28: MOV_SAT TEMP[1].w, IN[1].zzzz 29: MAD_SAT TEMP[10].x, IN[0].xxxx, CONST[7].xxxx, CONST[7].yyyy 30: LRP OUT[0].xyz, TEMP[10].xxxx, TEMP[1], CONST[8] 31: MOV OUT[0].w, TEMP[1] 32: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[9].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL_SAT temp[1].xyz, temp[6], temp[0]; 28: MOV_SAT temp[1].w, input[1].zzzz; 29: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 30: LRP output[0].xyz, temp[10].xxxx, temp[1], const[8]; 31: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL_SAT temp[1].xyz, temp[6], temp[0]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 32: ADD temp[12], temp[1], -const[8]; 33: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL_SAT temp[1].xyz, temp[6], temp[0]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[10].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 32: ADD temp[12], temp[1], -const[8]; 33: MAD output[0].xyz, temp[10].xxxx, temp[12], const[8]; 34: MOV output[0].w, temp[1]; CONST[7] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[11].w, temp[8].wwww; 20: MUL temp[11].w, temp[11].wwww, const[7].zzzz; 21: EX2 temp[8].w, temp[11].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: MUL_SAT temp[1].xyz, temp[6], temp[0]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[10].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 32: ADD temp[12], temp[1], -const[6]; 33: MAD output[0].xyz, temp[10].xxxx, temp[12], const[6]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[11].w, src0.w 20: src0.xyz = const[7], src0.w = temp[11] MAD temp[11].w, src0.w, src0.z, src0.0 21: src0.w = temp[11] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 31: src0.xyz = input[0], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy 32: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 33: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 34: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[7] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[5] MAD_SAT temp[10].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 15: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 16: BEGIN_TEX; 17: TEX temp[7], temp[5], 2D[3]; 18: TEX temp[6], temp[5], 2D[0]; 19: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 22: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 23: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[11].w, src0.w 24: src0.xyz = temp[0], src0.w = temp[11], src1.xyz = const[3], src2.xyz = const[7] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[11].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[11], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 26: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 27: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 28: src0.xyz = temp[6], src1.xyz = temp[0] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[6], src1.w = const[6] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[12].w, src0.w, src0.1, -src1.w 30: src0.xyz = temp[10], src1.xyz = temp[12], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[1]; 2: TEX temp[7], temp[1], 2D[2]; 3: TEX temp[9], temp[0], 2D[3]; 4: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[7] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[7].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[14].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 7: src0.xyz = temp[4], src0.w = temp[8], src1.xyz = const[5] MAD_SAT temp[15].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[8].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = const[1], src1.w = temp[9] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD temp[9].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[8], src0.w = temp[9], src1.xyz = temp[0], src1.w = temp[8], src2.w = temp[0] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz MAD temp[10].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] MAD temp[13].xyz, src0.xyz, src0.111, src1.xyz MAD temp[13].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[13], src0.w = temp[13] DP3, src0.xyz, src0.xyz DP3 temp[13].w, src0.w, src0.w 12: src0.w = temp[13] RSQ temp[13].w, |src0.w| 13: src0.xyz = temp[13], src0.w = temp[13], src1.w = temp[5], src2.w = const[0] MAD temp[13].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[6].w, src1.w, src2.w, src0.0 14: src0.xyz = temp[0] MAD_SAT temp[6].w, src0.z, src0.1, src0.0 15: src0.w = temp[6] MAD color[0].w, src0.w, src0.1, src0.0 16: BEGIN_TEX; 17: TEX temp[12], temp[10], 2D[3]; 18: TEX temp[11], temp[10], 2D[0]; 19: src0.xyz = temp[11], src1.xyz = const[0] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[12], src1.xyz = const[7] MAD temp[12].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[13], src0.w = temp[13], src1.xyz = temp[12], src1.w = temp[12] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[13].w, src0.w, src1.w 22: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT temp[7].xyz, src0.xyz, src1.xyz DP3_SAT temp[7].w, src0.w, src1.w 23: src0.xyz = temp[5], src0.w = temp[13], src1.xyz = temp[7] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[16].w, src0.w 24: src0.xyz = temp[5], src0.w = temp[16], src1.xyz = const[3], src2.xyz = const[7] MAX temp[5].xyz, src0.xyz, src1.xyz MAD temp[16].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[16], src1.xyz = temp[14], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[13].w, src0.w 26: src0.w = temp[13], src1.w = temp[11] MAD temp[13].w, src0.w, src1.w, src0.0 27: src0.xyz = const[2], src0.w = temp[13], src1.xyz = temp[11] MAD temp[11].xyz, src0.www, src0.xyz, src1.xyz 28: src0.xyz = temp[11], src1.xyz = temp[5] MAD_SAT temp[6].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[6], src1.w = const[6] MAD temp[17].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[17].w, src0.w, src0.1, -src1.w 30: src0.xyz = temp[15], src1.xyz = temp[17], src2.xyz = const[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe409e400: src: 0 R/G/B/A dst: 9 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041c07:Addr0: 7t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925070:MAD dest:7 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000e2:DP4 dest:14 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041404:Addr0: 4t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c08b:RSQ dest:8 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250f0:MAD dest:15 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d090:MAD dest:9 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210d0:MAD dest:13 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0db:RSQ dest:13 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000140d:Addr0: 13t, Addr1: 5t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d060:MAD dest:6 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c08060:MAD dest:6 alp_A_src:0 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce40a: src: 10 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be40a: src: 10 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000b:Addr0: 11t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00041c0c:Addr0: 12t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250c0:MAD dest:12 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 19 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000071:DP3 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c05:Addr0: 5t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c109:LN2 dest:16 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10740c05:Addr0: 5t, Addr1: 3c, Addr2: 7c, srcp:0 2:ALPHA_ADDR 0x00000010:Addr0: 16t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c100:MAD dest:16 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000055:MAX dest:5 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 23 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00503904:Addr0: 4c, Addr1: 14t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000010:Addr0: 16t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0d8:EX2 dest:13 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0d:Addr0: 13t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 25 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002d02:Addr0: 2c, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210b0:MAD dest:11 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000140b:Addr0: 11t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c110:MAD dest:17 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21110:MAD dest:17 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 28 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1060440f:Addr0: 15t, Addr1: 17t, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..9] DCL TEMP[0..11] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 28: TEX TEMP[10], TEMP[5], SAMP[4], 2D 29: MAD_SAT TEMP[1].xyz, TEMP[10], CONST[7], TEMP[6] 30: MOV_SAT TEMP[1].w, IN[1].zzzz 31: MAD_SAT TEMP[11].x, IN[0].xxxx, CONST[8].xxxx, CONST[8].yyyy 32: LRP OUT[0].xyz, TEMP[11].xxxx, TEMP[1], CONST[9] 33: MOV OUT[0].w, TEMP[1] 34: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 32: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 32: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 32: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 32: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[10].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: MUL temp[6].xyz, temp[6], temp[0]; 28: TEX temp[10], temp[5], 2D[4]; 29: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 30: MOV_SAT temp[1].w, input[1].zzzz; 31: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 32: LRP output[0].xyz, temp[11].xxxx, temp[1], const[9]; 33: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[10].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 34: ADD temp[13], temp[1], -const[9]; 35: MAD output[0].xyz, temp[11].xxxx, temp[13], const[9]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[10].xxxx, -const[10].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[10].xxxx, -const[10].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[10].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[7], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[8].xxxx, const[8].yyyy; 34: ADD temp[13], temp[1], -const[9]; 35: MAD output[0].xyz, temp[11].xxxx, temp[13], const[9]; 36: MOV output[0].w, temp[1]; CONST[8] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[8].xxxx, -const[8].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[8].xxxx, -const[8].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[8].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[5], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[6].xxxx, const[6].yyyy; 34: ADD temp[13], temp[1], -const[7]; 35: MAD output[0].xyz, temp[11].xxxx, temp[13], const[7]; 36: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[8] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[8] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[12].w, src0.w 20: src0.xyz = const[8], src0.w = temp[12] MAD temp[12].w, src0.w, src0.z, src0.0 21: src0.w = temp[12] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 30: TEX temp[10], temp[5], 2D[4]; 31: src0.xyz = temp[10], src1.xyz = const[5], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 32: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 33: src0.xyz = input[0], src1.xyz = const[6] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy 34: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[7], src1.w = const[7] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 35: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 36: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[8] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[6] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 15: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 16: BEGIN_TEX; 17: TEX temp[10], temp[5], 2D[4]; 18: TEX temp[7], temp[5], 2D[3]; 19: TEX temp[6], temp[5], 2D[0]; 20: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[7], src1.xyz = const[8] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 22: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 23: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 24: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[12].w, src0.w 25: src0.xyz = temp[0], src0.w = temp[12], src1.xyz = const[3], src2.xyz = const[8] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[12].w, src0.w, src2.z, src0.0 26: src0.xyz = const[4], src0.w = temp[12], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 27: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 28: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 29: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[10], src1.xyz = const[5], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 31: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[7], src1.w = const[7] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 32: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[1], 2D[1]; 2: TEX temp[7], temp[1], 2D[2]; 3: TEX temp[9], temp[0], 2D[3]; 4: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[8] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[7].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[14].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 7: src0.xyz = temp[4], src0.w = temp[8], src1.xyz = const[6] MAD_SAT temp[16].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[8].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = const[1], src1.w = temp[9] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD temp[9].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[8], src0.w = temp[9], src1.xyz = temp[0], src1.w = temp[8], src2.w = temp[0] MAD temp[10].xyz, src0.www, src0.xyz, src1.xyz MAD temp[10].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] MAD temp[13].xyz, src0.xyz, src0.111, src1.xyz MAD temp[13].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[13], src0.w = temp[13] DP3, src0.xyz, src0.xyz DP3 temp[13].w, src0.w, src0.w 12: src0.w = temp[13] RSQ temp[13].w, |src0.w| 13: src0.xyz = temp[13], src0.w = temp[13], src1.w = temp[5], src2.w = const[0] MAD temp[13].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[6].w, src1.w, src2.w, src0.0 14: src0.xyz = temp[0] MAD_SAT temp[6].w, src0.z, src0.1, src0.0 15: src0.w = temp[6] MAD color[0].w, src0.w, src0.1, src0.0 16: BEGIN_TEX; 17: TEX temp[15], temp[10], 2D[4]; 18: TEX temp[12], temp[10], 2D[3]; 19: TEX temp[11], temp[10], 2D[0]; 20: src0.xyz = temp[11], src1.xyz = const[0] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[12], src1.xyz = const[8] MAD temp[12].xyz, src0.xyz, src1.xxx, -src1.yyy 22: src0.xyz = temp[13], src0.w = temp[13], src1.xyz = temp[12], src1.w = temp[12] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[13].w, src0.w, src1.w 23: src0.xyz = temp[12], src0.w = temp[12], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT temp[7].xyz, src0.xyz, src1.xyz DP3_SAT temp[7].w, src0.w, src1.w 24: src0.xyz = temp[5], src0.w = temp[13], src1.xyz = temp[7] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[17].w, src0.w 25: src0.xyz = temp[5], src0.w = temp[17], src1.xyz = const[3], src2.xyz = const[8] MAX temp[5].xyz, src0.xyz, src1.xyz MAD temp[17].w, src0.w, src2.z, src0.0 26: src0.xyz = const[4], src0.w = temp[17], src1.xyz = temp[14], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[13].w, src0.w 27: src0.w = temp[13], src1.w = temp[11] MAD temp[13].w, src0.w, src1.w, src0.0 28: src0.xyz = const[2], src0.w = temp[13], src1.xyz = temp[11] MAD temp[11].xyz, src0.www, src0.xyz, src1.xyz 29: src0.xyz = temp[11], src1.xyz = temp[5] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[15], src1.xyz = const[5], src2.xyz = temp[11] MAD_SAT temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 31: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[7], src1.w = const[7] MAD temp[18].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[18].w, src0.w, src0.1, -src1.w 32: src0.xyz = temp[16], src1.xyz = temp[18], src2.xyz = const[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e401: src: 1 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe407e401: src: 1 R/G/B/A dst: 7 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe409e400: src: 0 R/G/B/A dst: 9 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042007:Addr0: 7t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c070:MAD dest:7 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925070:MAD dest:7 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000e2:DP4 dest:14 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041804:Addr0: 4t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c08b:RSQ dest:8 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125100:MAD dest:16 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002408:Addr0: 8t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d090:MAD dest:9 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210a0:MAD dest:10 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210d0:MAD dest:13 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0db:RSQ dest:13 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000140d:Addr0: 13t, Addr1: 5t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d060:MAD dest:6 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c08060:MAD dest:6 alp_A_src:0 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40fe40a: src: 10 R/G/B/A dst: 15 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce40a: src: 10 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be40a: src: 10 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000b:Addr0: 11t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004200c:Addr0: 12t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250c0:MAD dest:12 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 20 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000300d:Addr0: 13t, Addr1: 12t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0d1:DP dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c0c:Addr0: 12t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000071:DP3 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001c05:Addr0: 5t, Addr1: 7t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c119:LN2 dest:17 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10840c05:Addr0: 5t, Addr1: 3c, Addr2: 8c, srcp:0 2:ALPHA_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c110:MAD dest:17 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000055:MAX dest:5 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 24 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00503904:Addr0: 4c, Addr1: 14t, Addr2: 5t, srcp:0 2:ALPHA_ADDR 0x00000011:Addr0: 17t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0d8:EX2 dest:13 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002c0d:Addr0: 13t, Addr1: 11t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0d0:MAD dest:13 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 26 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00002d02:Addr0: 2c, Addr1: 11t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210b0:MAD dest:11 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000140b:Addr0: 11t, Addr1: 5t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900b0:MAD dest:11 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00b4140f:Addr0: 15t, Addr1: 5c, Addr2: 11t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 29 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041c06:Addr0: 6t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041c06:Addr0: 6t, Addr1: 7c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c120:MAD dest:18 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21120:MAD dest:18 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 30 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10704810:Addr0: 16t, Addr1: 18t, Addr2: 7c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program Earathon fragged 1400959 you got fragged by bozco FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2..6] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 15: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 16: MAX TEMP[0].xyz, TEMP[0], CONST[3] 17: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 18: TEX TEMP[8], TEMP[5], SAMP[4], 2D 19: MAD_SAT TEMP[1].xyz, TEMP[8], CONST[4], TEMP[6] 20: MOV_SAT TEMP[1].w, IN[1].zzzz 21: MAD_SAT TEMP[9].x, IN[0].xxxx, CONST[5].xxxx, CONST[5].yyyy 22: LRP OUT[0].xyz, TEMP[9].xxxx, TEMP[1], CONST[6] 23: MOV OUT[0].w, TEMP[1] 24: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: LRP output[0].xyz, temp[9].xxxx, temp[1], const[6]; 23: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: ADD temp[10], temp[1], -const[6]; 23: MAD output[0].xyz, temp[9].xxxx, temp[10], const[6]; 24: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[7].xxxx, -const[7].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[7].xxxx, -const[7].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[3]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[4], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[5].xxxx, const[5].yyyy; 22: ADD temp[10], temp[1], -const[6]; 23: MAD output[0].xyz, temp[9].xxxx, temp[10], const[6]; 24: MOV output[0].w, temp[1]; CONST[6] = { 2.0000 1.0000 0.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[6].xxxx, -const[6].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[6].xxxx, -const[6].yyyy; 14: DP3_SAT temp[2], temp[7], temp[2]; 15: MUL temp[0].xyz, temp[0], temp[2]; 16: MAX temp[0].xyz, temp[0], const[2]; 17: MUL temp[6].xyz, temp[6], temp[0]; 18: TEX temp[8], temp[5], 2D[4]; 19: MAD_SAT temp[1].xyz, temp[8], const[3], temp[6]; 20: MOV_SAT temp[1].w, input[1].zzzz; 21: MAD_SAT temp[9].x, input[0].xxxx, const[4].xxxx, const[4].yyyy; 22: ADD temp[10], temp[1], -const[5]; 23: MAD output[0].xyz, temp[9].xxxx, temp[10], const[5]; 24: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 15: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[0], src1.xyz = const[2] MAX temp[0].xyz, src0.xyz, src1.xyz 17: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 18: TEX temp[8], temp[5], 2D[4]; 19: src0.xyz = temp[8], src1.xyz = const[3], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 20: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 21: src0.xyz = input[0], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy 22: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 23: src0.xyz = temp[9], src1.xyz = temp[10], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 24: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[6] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 6: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[4] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 7: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 9: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 10: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 11: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 12: BEGIN_TEX; 13: TEX temp[8], temp[5], 2D[4]; 14: TEX temp[7], temp[5], 2D[3]; 15: TEX temp[6], temp[5], 2D[0]; 16: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 17: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 18: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 19: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[0], src1.xyz = const[2] MAX temp[0].xyz, src0.xyz, src1.xyz 21: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 22: src0.xyz = temp[8], src1.xyz = const[3], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 23: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 24: src0.xyz = temp[9], src1.xyz = temp[10], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4], temp[1], 2D[1]; 2: TEX temp[6], temp[1], 2D[2]; 3: TEX temp[8], temp[0], 2D[3]; 4: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[6] MAD temp[6].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[6].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 6: src0.xyz = temp[3], src0.w = temp[7], src1.xyz = const[4] MAD_SAT temp[13].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[7].w, |src0.w| 7: src0.xyz = temp[2], src0.w = temp[7], src1.xyz = const[1], src1.w = temp[8] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 MAD temp[8].w, src1.w, src1.x, src1.y 8: src0.xyz = temp[7], src0.w = temp[8], src1.xyz = temp[0], src1.w = temp[7], src2.w = temp[0] MAD temp[9].xyz, src0.www, src0.xyz, src1.xyz MAD temp[9].w, src0.w, src1.w, src2.w 9: src0.w = temp[4], src1.w = const[0] MAD_SAT temp[5].w, src0.w, src1.w, src0.0 10: src0.xyz = temp[0] MAD_SAT temp[5].w, src0.z, src0.1, src0.0 11: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 12: BEGIN_TEX; 13: TEX temp[12], temp[9], 2D[4]; 14: TEX temp[11], temp[9], 2D[3]; 15: TEX temp[10], temp[9], 2D[0]; 16: src0.xyz = temp[10], src1.xyz = const[0] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 17: src0.xyz = temp[11], src1.xyz = const[6] MAD temp[11].xyz, src0.xyz, src1.xxx, -src1.yyy 18: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = temp[6], src1.w = temp[6] DP3_SAT temp[6].xyz, src0.xyz, src1.xyz DP3_SAT temp[6].w, src0.w, src1.w 19: src0.xyz = temp[4], src1.xyz = temp[6] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[4], src1.xyz = const[2] MAX temp[4].xyz, src0.xyz, src1.xyz 21: src0.xyz = temp[10], src1.xyz = temp[4] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 22: src0.xyz = temp[12], src1.xyz = const[3], src2.xyz = temp[10] MAD_SAT temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 23: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[5], src1.w = const[5] MAD temp[14].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[14].w, src0.w, src0.1, -src1.w 24: src0.xyz = temp[13], src1.xyz = temp[14], src2.xyz = const[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe404e401: src: 1 R/G/B/A dst: 4 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e400: src: 0 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041806:Addr0: 6t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925060:MAD dest:6 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041003:Addr0: 3t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250d0:MAD dest:13 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002007:Addr0: 7t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d080:MAD dest:8 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001c08:Addr0: 8t, Addr1: 7t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c221090:MAD dest:9 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 8 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040004:Addr0: 4t, Addr1: 0c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c050:MAD dest:5 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 9 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c08050:MAD dest:5 alp_A_src:0 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 10 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 11 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce409: src: 9 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 12 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 13 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 14 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000a:Addr0: 10t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 15 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004180b:Addr0: 11t, Addr1: 6c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250b0:MAD dest:11 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 16 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000180b:Addr0: 11t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c061:DP dest:6 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000061:DP3 dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00001804:Addr0: 4t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490040:MAD dest:4 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00040804:Addr0: 4t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000045:MAX dest:4 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000100a:Addr0: 10t, Addr1: 4t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00a40c0c:Addr0: 12t, Addr1: 3c, Addr2: 10t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222050:MAD dest:5 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041405:Addr0: 5t, Addr1: 5c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210e0:MAD dest:14 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 22 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1050380d:Addr0: 13t, Addr1: 14t, Addr2: 5c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program Earathon fragged 1400959 n00b|cheese fragged zlyons lucas fragged Earathon Earathon fragged lucas FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL IN[5], GENERIC[4], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..10] DCL TEMP[0..11] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: DPH_SAT TEMP[9].x, -IN[5], IN[5] 28: MAD TEMP[0].xyz, CONST[7], TEMP[9].xxxx, TEMP[0] 29: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 30: TEX TEMP[10], TEMP[5], SAMP[4], 2D 31: MAD_SAT TEMP[1].xyz, TEMP[10], CONST[8], TEMP[6] 32: MAD_SAT TEMP[11].x, IN[0].xxxx, CONST[9].xxxx, CONST[9].yyyy 33: LRP OUT[0].xyz, TEMP[11].xxxx, TEMP[1], CONST[10] 34: MOV OUT[0].w, TEMP[1] 35: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 33: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 33: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 33: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 33: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 33: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 34: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[11].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 35: ADD temp[13], temp[1], -const[10]; 36: MAD output[0].xyz, temp[11].xxxx, temp[13], const[10]; 37: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[11].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 35: ADD temp[13], temp[1], -const[10]; 36: MAD output[0].xyz, temp[11].xxxx, temp[13], const[10]; 37: MOV output[0].w, temp[1]; CONST[9] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[5], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[6], temp[6]; 34: MAD_SAT temp[11].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 35: ADD temp[13], temp[1], -const[8]; 36: MAD output[0].xyz, temp[11].xxxx, temp[13], const[8]; 37: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[9] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[12].w, src0.w 20: src0.xyz = const[9], src0.w = temp[12] MAD temp[12].w, src0.w, src0.z, src0.0 21: src0.w = temp[12] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 30: src0.xyz = const[5], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 32: TEX temp[10], temp[5], 2D[4]; 33: src0.xyz = temp[10], src1.xyz = const[6], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 34: src0.xyz = input[0], src1.xyz = const[7] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy 35: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[8], src1.w = const[8] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 36: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[8] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 37: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[7] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[10], temp[5], 2D[4]; 17: TEX temp[7], temp[5], 2D[3]; 18: TEX temp[6], temp[5], 2D[0]; 19: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[7], src1.xyz = const[9] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 22: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 23: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[12].w, src0.w 24: src0.xyz = temp[0], src0.w = temp[12], src1.xyz = const[3], src2.xyz = const[9] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[12].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[12], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 26: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 27: src0.xyz = const[5], src0.w = temp[8], src1.xyz = temp[9], src1.w = temp[6], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[8].w, src0.w, src1.w, src0.0 28: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 29: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[10], src1.xyz = const[6], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 31: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[8], src1.w = const[8] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 32: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[8] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[6], temp[1], 2D[1]; 2: TEX temp[8], temp[1], 2D[2]; 3: TEX temp[10], temp[0], 2D[3]; 4: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = const[9] MAD temp[8].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[8].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[15].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[9].w, src0.w, src0.w 7: src0.xyz = temp[5], src0.w = temp[9], src1.xyz = const[7] MAD_SAT temp[17].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[9].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[9], src1.xyz = const[1], src1.w = temp[10] MAD temp[9].xyz, src0.www, src0.xyz, src0.000 MAD temp[10].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[9], src0.w = temp[10], src1.xyz = temp[0], src1.w = temp[9], src2.w = temp[0] MAD temp[11].xyz, src0.www, src0.xyz, src1.xyz MAD temp[11].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = temp[8], src1.w = temp[8] MAD temp[14].xyz, src0.xyz, src0.111, src1.xyz MAD temp[14].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[14], src0.w = temp[14] DP3, src0.xyz, src0.xyz DP3 temp[14].w, src0.w, src0.w 12: src0.w = temp[14] RSQ temp[14].w, |src0.w| 13: src0.xyz = temp[14], src0.w = temp[14], src1.w = temp[6], src2.w = const[0] MAD temp[14].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[7].w, src1.w, src2.w, src0.0 14: src0.w = temp[7] MAD color[0].w, src0.w, src0.1, src0.0 15: BEGIN_TEX; 16: TEX temp[16], temp[11], 2D[4]; 17: TEX temp[13], temp[11], 2D[3]; 18: TEX temp[12], temp[11], 2D[0]; 19: src0.xyz = temp[12], src1.xyz = const[0] MAD temp[12].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = temp[13], src1.xyz = const[9] MAD temp[13].xyz, src0.xyz, src1.xxx, -src1.yyy 21: src0.xyz = temp[14], src0.w = temp[14], src1.xyz = temp[13], src1.w = temp[13] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[14].w, src0.w, src1.w 22: src0.xyz = temp[13], src0.w = temp[13], src1.xyz = temp[8], src1.w = temp[8] DP3_SAT temp[8].xyz, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 23: src0.xyz = temp[6], src0.w = temp[14], src1.xyz = temp[8] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[18].w, src0.w 24: src0.xyz = temp[6], src0.w = temp[18], src1.xyz = const[3], src2.xyz = const[9] MAX temp[6].xyz, src0.xyz, src1.xyz MAD temp[18].w, src0.w, src2.z, src0.0 25: src0.xyz = const[4], src0.w = temp[18], src1.xyz = temp[15], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[14].w, src0.w 26: src0.xyz = temp[4], src0.w = temp[4] DP4_SAT temp[15].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 27: src0.xyz = const[5], src0.w = temp[14], src1.xyz = temp[15], src1.w = temp[12], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[14].w, src0.w, src1.w, src0.0 28: src0.xyz = const[2], src0.w = temp[14], src1.xyz = temp[12] MAD temp[12].xyz, src0.www, src0.xyz, src1.xyz 29: src0.xyz = temp[12], src1.xyz = temp[6] MAD temp[12].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[16], src1.xyz = const[6], src2.xyz = temp[12] MAD_SAT temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 31: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[8], src1.w = const[8] MAD temp[19].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[19].w, src0.w, src0.1, -src1.w 32: src0.xyz = temp[17], src1.xyz = temp[19], src2.xyz = const[8] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e401: src: 1 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae400: src: 0 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042408:Addr0: 8t, Addr1: 9c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c080:MAD dest:8 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925080:MAD dest:8 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000f2:DP4 dest:15 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c091:DP dest:9 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041c05:Addr0: 5t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c09b:RSQ dest:9 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125110:MAD dest:17 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002809:Addr0: 9t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d0a0:MAD dest:10 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000240a:Addr0: 10t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0b0:MAD dest:11 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210b0:MAD dest:11 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210e0:MAD dest:14 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0e1:DP dest:14 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0eb:RSQ dest:14 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000180e:Addr0: 14t, Addr1: 6t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d070:MAD dest:7 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900e0:MAD dest:14 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe410e40b: src: 11 R/G/B/A dst: 16 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40de40b: src: 11 R/G/B/A dst: 13 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce40b: src: 11 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000c:Addr0: 12t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004240d:Addr0: 13t, Addr1: 9c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250d0:MAD dest:13 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 19 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000340e:Addr0: 14t, Addr1: 13t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000340e:Addr0: 14t, Addr1: 13t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0e1:DP dest:14 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 20 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000200d:Addr0: 13t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000200d:Addr0: 13t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00002006:Addr0: 6t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c129:LN2 dest:18 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10940c06:Addr0: 6t, Addr1: 3c, Addr2: 9c, srcp:0 2:ALPHA_ADDR 0x00000012:Addr0: 18t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c120:MAD dest:18 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000065:MAX dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 23 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00603d04:Addr0: 4c, Addr1: 15t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x00000012:Addr0: 18t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0e8:EX2 dest:14 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 24 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000f2:DP4 dest:15 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00603d05:Addr0: 5c, Addr1: 15t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x0000300e:Addr0: 14t, Addr1: 12t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 26 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00003102:Addr0: 2c, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 27 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000180c:Addr0: 12t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00c41810:Addr0: 16t, Addr1: 6c, Addr2: 12t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 29 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042007:Addr0: 7t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00042007:Addr0: 7t, Addr1: 8c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c130:MAD dest:19 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21130:MAD dest:19 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 30 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10804c11:Addr0: 17t, Addr1: 19t, Addr2: 8c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..4] DCL TEMP[0..4] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: DPH_SAT TEMP[2].x, -IN[3], IN[3] 3: MAD TEMP[1].xyz, CONST[0], TEMP[2].xxxx, TEMP[1] 4: DPH_SAT TEMP[2].x, -IN[4], IN[4] 5: MAD TEMP[1].xyz, CONST[1], TEMP[2].xxxx, TEMP[1] 6: MUL TEMP[0], TEMP[0], CONST[2] 7: MUL_SAT TEMP[3], TEMP[0], TEMP[1] 8: MOV_SAT TEMP[3].w, IN[1].zzzz 9: MAD_SAT TEMP[4].x, IN[0].xxxx, CONST[3].xxxx, CONST[3].yyyy 10: LRP OUT[0].xyz, TEMP[4].xxxx, TEMP[3], CONST[4] 11: MOV OUT[0].w, TEMP[3] 12: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DPH_SAT temp[2].x, -input[3], input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DPH_SAT temp[2].x, -input[4], input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: LRP output[0].xyz, temp[4].xxxx, temp[3], const[4]; 11: MOV output[0].w, temp[3]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: ADD temp[5], temp[3], -const[4]; 11: MAD output[0].xyz, temp[4].xxxx, temp[5], const[4]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: ADD temp[5], temp[3], -const[4]; 11: MAD output[0].xyz, temp[4].xxxx, temp[5], const[4]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: DP4_SAT temp[2].x, input[3].-x-y-z1, input[3]; 3: MAD temp[1].xyz, const[0], temp[2].xxxx, temp[1]; 4: DP4_SAT temp[2].x, input[4].-x-y-z1, input[4]; 5: MAD temp[1].xyz, const[1], temp[2].xxxx, temp[1]; 6: MUL temp[0], temp[0], const[2]; 7: MUL_SAT temp[3], temp[0], temp[1]; 8: MOV_SAT temp[3].w, input[1].zzzz; 9: MAD_SAT temp[4].x, input[0].xxxx, const[3].xxxx, const[3].yyyy; 10: ADD temp[5], temp[3], -const[4]; 11: MAD output[0].xyz, temp[4].xxxx, temp[5], const[4]; 12: MOV output[0].w, temp[3]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 3: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 4: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[1], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src1.w = const[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 8: src0.xyz = input[1] MAD_SAT temp[3].w, src0.z, src0.1, src0.0 9: src0.xyz = input[0], src1.xyz = const[3] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[4], src1.w = const[4] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 11: src0.xyz = temp[4], src1.xyz = temp[5], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 12: src0.w = temp[3] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[1], 2D[0]; 2: TEX temp[1], input[2], 2D[1]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src1.w = const[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 4: src0.xyz = input[3], src0.w = input[3] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[2].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[1], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD_SAT temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[3].w, src0.w, src1.w, src0.0 9: src0.xyz = input[0], src1.xyz = const[3], src2.xyz = input[1] MAD_SAT temp[4].x, src0.xxx, src1.xxx, src1.yyy MAD_SAT temp[3].w, src2.z, src0.1, src0.0 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = const[4], src1.w = const[4] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[5].w, src0.w, src0.1, -src1.w 11: src0.xyz = temp[4], src0.w = temp[3], src1.xyz = temp[5], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5], temp[0], 2D[0]; 2: TEX temp[6], temp[1], 2D[1]; 3: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[2], src1.w = const[2] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[5].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[2], src0.w = temp[2] DP4_SAT temp[7].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 5: src0.xyz = const[0], src1.xyz = temp[7], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz 6: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[7].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 7: src0.xyz = const[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz 8: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = temp[6], src1.w = temp[6] MAD_SAT temp[8].xyz, src0.xyz, src1.xyz, src0.000 MAD_SAT temp[8].w, src0.w, src1.w, src0.0 9: src0.xyz = temp[4], src1.xyz = const[3], src2.xyz = temp[0] MAD_SAT temp[9].x, src0.xxx, src1.xxx, src1.yyy MAD_SAT temp[8].w, src2.z, src0.1, src0.0 10: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = const[4], src1.w = const[4] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[10].w, src0.w, src0.1, -src1.w 11: src0.xyz = temp[9], src0.w = temp[8], src1.xyz = temp[10], src2.xyz = const[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD color[0].w, src0.w, src0.1, src0.0 R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe405e400: src: 0 R/G/B/A dst: 5 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040805:Addr0: 5t, Addr1: 2c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c050:MAD dest:5 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490050:MAD dest:5 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000072:DP4 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 4 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00601d00:Addr0: 0c, Addr1: 7t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618021:DP dest:2 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000072:DP4 dest:7 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00601d01:Addr0: 1c, Addr1: 7t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00001805:Addr0: 5t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001805:Addr0: 5t, Addr1: 6t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c080:MAD dest:8 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20490080:MAD dest:8 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 8 0:CMN_INST 0x00184804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00040c04:Addr0: 4t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0a080:MAD dest:8 alp_A_src:2 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125090:MAD dest:9 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00041008:Addr0: 8t, Addr1: 4c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00041008:Addr0: 8t, Addr1: 4c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210a0:MAD dest:10 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 10 0:CMN_INST 0x00078005:OUT TEX_WAIT wmask: NONE omask: ARGB 1:RGB_ADDR 0x10402809:Addr0: 9t, Addr1: 10t, Addr2: 4c, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 r300: Initial fragment program FRAG DCL IN[0], FOG, PERSPECTIVE DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL IN[5], GENERIC[4], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL CONST[0] DCL CONST[2] DCL CONST[4..10] DCL TEMP[0..11] IMM FLT32 { 2.0000, 1.0000, 32.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: MUL_SAT TEMP[1].w, TEMP[0], CONST[0] 2: TEX TEMP[2], IN[2], SAMP[2], 2D 3: MAD TEMP[2], TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 4: DP3 TEMP[3].w, IN[3], IN[3] 5: RSQ TEMP[3].w, TEMP[3].wwww 6: MUL TEMP[3].xyz, TEMP[3].wwww, IN[3] 7: TEX TEMP[4], IN[1], SAMP[3], 2D 8: MAD TEMP[4].w, TEMP[4].wwww, CONST[2].xxxx, CONST[2].yyyy 9: MAD TEMP[5], TEMP[4].wwww, TEMP[3], IN[1] 10: TEX TEMP[6], TEMP[5], SAMP[0], 2D 11: MUL TEMP[6].xyz, TEMP[6], CONST[0] 12: TEX TEMP[7], TEMP[5], SAMP[3], 2D 13: MAD TEMP[7].xyz, TEMP[7], IMM[0].xxxx, -IMM[0].yyyy 14: ADD TEMP[8], TEMP[3], TEMP[2] 15: DP3 TEMP[8].w, TEMP[8], TEMP[8] 16: RSQ TEMP[8].w, TEMP[8].wwww 17: MUL TEMP[8].xyz, TEMP[8].wwww, TEMP[8] 18: DP3_SAT TEMP[8].w, TEMP[8], TEMP[7] 19: POW TEMP[8].w, TEMP[8].wwww, IMM[0].zzzz 20: MUL TEMP[8].w, TEMP[8], TEMP[6] 21: MAD TEMP[6].xyz, TEMP[8].wwww, CONST[4], TEMP[6] 22: DP3_SAT TEMP[2], TEMP[7], TEMP[2] 23: MUL TEMP[0].xyz, TEMP[0], TEMP[2] 24: MAX TEMP[0].xyz, TEMP[0], CONST[5] 25: DPH_SAT TEMP[9].x, -IN[4], IN[4] 26: MAD TEMP[0].xyz, CONST[6], TEMP[9].xxxx, TEMP[0] 27: DPH_SAT TEMP[9].x, -IN[5], IN[5] 28: MAD TEMP[0].xyz, CONST[7], TEMP[9].xxxx, TEMP[0] 29: MUL TEMP[6].xyz, TEMP[6], TEMP[0] 30: TEX TEMP[10], TEMP[5], SAMP[4], 2D 31: MAD_SAT TEMP[1].xyz, TEMP[10], CONST[8], TEMP[6] 32: MOV_SAT TEMP[1].w, IN[1].zzzz 33: MAD_SAT TEMP[11].x, IN[0].xxxx, CONST[9].xxxx, CONST[9].yyyy 34: LRP OUT[0].xyz, TEMP[11].xxxx, TEMP[1], CONST[10] 35: MOV OUT[0].w, TEMP[1] 36: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 34: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 34: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 34: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 34: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, temp[3].wwww; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, temp[8].wwww; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: POW temp[8].w, temp[8].wwww, const[11].zzzz; 20: MUL temp[8].w, temp[8], temp[6]; 21: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 22: DP3_SAT temp[2], temp[7], temp[2]; 23: MUL temp[0].xyz, temp[0], temp[2]; 24: MAX temp[0].xyz, temp[0], const[5]; 25: DPH_SAT temp[9].x, -input[4], input[4]; 26: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 27: DPH_SAT temp[9].x, -input[5], input[5]; 28: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 29: MUL temp[6].xyz, temp[6], temp[0]; 30: TEX temp[10], temp[5], 2D[4]; 31: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 32: MOV_SAT temp[1].w, input[1].zzzz; 33: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 34: LRP output[0].xyz, temp[11].xxxx, temp[1], const[10]; 35: MOV output[0].w, temp[1]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[11].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 34: MOV_SAT temp[1].w, input[1].zzzz; 35: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 36: ADD temp[13], temp[1], -const[10]; 37: MAD output[0].xyz, temp[11].xxxx, temp[13], const[10]; 38: MOV output[0].w, temp[1]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[11].xxxx, -const[11].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[2].xxxx, const[2].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[11].xxxx, -const[11].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[11].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[4], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[5]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[6], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[7], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[8], temp[6]; 34: MOV_SAT temp[1].w, input[1].zzzz; 35: MAD_SAT temp[11].x, input[0].xxxx, const[9].xxxx, const[9].yyyy; 36: ADD temp[13], temp[1], -const[10]; 37: MAD output[0].xyz, temp[11].xxxx, temp[13], const[10]; 38: MOV output[0].w, temp[1]; CONST[9] = { 2.0000 1.0000 32.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: MUL_SAT temp[1].w, temp[0], const[0]; 2: TEX temp[2], input[2], 2D[2]; 3: MAD temp[2], temp[2], const[9].xxxx, -const[9].yyyy; 4: DP3 temp[3].w, input[3], input[3]; 5: RSQ temp[3].w, |temp[3].wwww|; 6: MUL temp[3].xyz, temp[3].wwww, input[3]; 7: TEX temp[4], input[1], 2D[3]; 8: MAD temp[4].w, temp[4].wwww, const[1].xxxx, const[1].yyyy; 9: MAD temp[5], temp[4].wwww, temp[3], input[1]; 10: TEX temp[6], temp[5], 2D[0]; 11: MUL temp[6].xyz, temp[6], const[0]; 12: TEX temp[7], temp[5], 2D[3]; 13: MAD temp[7].xyz, temp[7], const[9].xxxx, -const[9].yyyy; 14: ADD temp[8], temp[3], temp[2]; 15: DP3 temp[8].w, temp[8], temp[8]; 16: RSQ temp[8].w, |temp[8].wwww|; 17: MUL temp[8].xyz, temp[8].wwww, temp[8]; 18: DP3_SAT temp[8].w, temp[8], temp[7]; 19: LG2 temp[12].w, temp[8].wwww; 20: MUL temp[12].w, temp[12].wwww, const[9].zzzz; 21: EX2 temp[8].w, temp[12].wwww; 22: MUL temp[8].w, temp[8], temp[6]; 23: MAD temp[6].xyz, temp[8].wwww, const[2], temp[6]; 24: DP3_SAT temp[2], temp[7], temp[2]; 25: MUL temp[0].xyz, temp[0], temp[2]; 26: MAX temp[0].xyz, temp[0], const[3]; 27: DP4_SAT temp[9].x, input[4].-x-y-z1, input[4]; 28: MAD temp[0].xyz, const[4], temp[9].xxxx, temp[0]; 29: DP4_SAT temp[9].x, input[5].-x-y-z1, input[5]; 30: MAD temp[0].xyz, const[5], temp[9].xxxx, temp[0]; 31: MUL temp[6].xyz, temp[6], temp[0]; 32: TEX temp[10], temp[5], 2D[4]; 33: MAD_SAT temp[1].xyz, temp[10], const[6], temp[6]; 34: MOV_SAT temp[1].w, input[1].zzzz; 35: MAD_SAT temp[11].x, input[0].xxxx, const[7].xxxx, const[7].yyyy; 36: ADD temp[13], temp[1], -const[8]; 37: MAD output[0].xyz, temp[11].xxxx, temp[13], const[8]; 38: MOV output[0].w, temp[1]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: src0.w = temp[0], src1.w = const[0] MAD_SAT temp[1].w, src0.w, src1.w, src0.0 2: TEX temp[2], input[2], 2D[2]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 4: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 5: src0.w = temp[3] RSQ temp[3].w, |src0.w| 6: src0.xyz = input[3], src0.w = temp[3] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 7: TEX temp[4], input[1], 2D[3]; 8: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.x, src0.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: TEX temp[6], temp[5], 2D[0]; 11: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: TEX temp[7], temp[5], 2D[3]; 13: src0.xyz = temp[7], src1.xyz = const[9] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 14: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 15: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 16: src0.w = temp[8] RSQ temp[8].w, |src0.w| 17: src0.xyz = temp[8], src0.w = temp[8] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 18: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 19: src0.w = temp[8] LG2 temp[12].w, src0.w 20: src0.xyz = const[9], src0.w = temp[12] MAD temp[12].w, src0.w, src0.z, src0.0 21: src0.w = temp[12] EX2 temp[8].w, src0.w 22: src0.w = temp[8], src1.w = temp[6] MAD temp[8].w, src0.w, src1.w, src0.0 23: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 24: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 25: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[0], src1.xyz = const[3] MAX temp[0].xyz, src0.xyz, src1.xyz 27: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[4], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 29: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 30: src0.xyz = const[5], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 32: TEX temp[10], temp[5], 2D[4]; 33: src0.xyz = temp[10], src1.xyz = const[6], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 34: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 35: src0.xyz = input[0], src1.xyz = const[7] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy 36: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[8], src1.w = const[8] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 37: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[8] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 38: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], input[2], 2D[1]; 2: TEX temp[2], input[2], 2D[2]; 3: TEX temp[4], input[1], 2D[3]; 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD temp[2].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[2].w, src0.w, src1.x, -src1.y 5: src0.xyz = input[4], src0.w = input[4] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = input[3], src0.w = input[3] DP3, src0.xyz, src0.xyz DP3 temp[3].w, src0.w, src0.w 7: src0.xyz = input[0], src0.w = temp[3], src1.xyz = const[7] MAD_SAT temp[11].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[3].w, |src0.w| 8: src0.xyz = input[3], src0.w = temp[3], src1.xyz = const[1], src1.w = temp[4] MAD temp[3].xyz, src0.www, src0.xyz, src0.000 MAD temp[4].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = input[1], src1.w = temp[3], src2.w = input[1] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz MAD temp[5].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[2], src1.w = temp[2] MAD temp[8].xyz, src0.xyz, src0.111, src1.xyz MAD temp[8].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[8], src0.w = temp[8] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0.w, src0.w 12: src0.w = temp[8] RSQ temp[8].w, |src0.w| 13: src0.xyz = temp[8], src0.w = temp[8], src1.w = temp[0], src2.w = const[0] MAD temp[8].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[1].w, src1.w, src2.w, src0.0 14: src0.xyz = input[1] MAD_SAT temp[1].w, src0.z, src0.1, src0.0 15: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 16: BEGIN_TEX; 17: TEX temp[10], temp[5], 2D[4]; 18: TEX temp[7], temp[5], 2D[3]; 19: TEX temp[6], temp[5], 2D[0]; 20: src0.xyz = temp[6], src1.xyz = const[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[7], src1.xyz = const[9] MAD temp[7].xyz, src0.xyz, src1.xxx, -src1.yyy 22: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 23: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = temp[2], src1.w = temp[2] DP3_SAT temp[2].xyz, src0.xyz, src1.xyz DP3_SAT temp[2].w, src0.w, src1.w 24: src0.xyz = temp[0], src0.w = temp[8], src1.xyz = temp[2] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[12].w, src0.w 25: src0.xyz = temp[0], src0.w = temp[12], src1.xyz = const[3], src2.xyz = const[9] MAX temp[0].xyz, src0.xyz, src1.xyz MAD temp[12].w, src0.w, src2.z, src0.0 26: src0.xyz = const[4], src0.w = temp[12], src1.xyz = temp[9], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[8].w, src0.w 27: src0.xyz = input[5], src0.w = input[5] DP4_SAT temp[9].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[5], src0.w = temp[8], src1.xyz = temp[9], src1.w = temp[6], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[8].w, src0.w, src1.w, src0.0 29: src0.xyz = const[2], src0.w = temp[8], src1.xyz = temp[6] MAD temp[6].xyz, src0.www, src0.xyz, src1.xyz 30: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 31: src0.xyz = temp[10], src1.xyz = const[6], src2.xyz = temp[6] MAD_SAT temp[1].xyz, src0.xyz, src1.xyz, src2.xyz 32: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[8], src1.w = const[8] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[13].w, src0.w, src0.1, -src1.w 33: src0.xyz = temp[11], src1.xyz = temp[13], src2.xyz = const[8] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[6], temp[1], 2D[1]; 2: TEX temp[8], temp[1], 2D[2]; 3: TEX temp[10], temp[0], 2D[3]; 4: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = const[9] MAD temp[8].xyz, src0.xyz, src1.xxx, -src1.yyy MAD temp[8].w, src0.w, src1.x, -src1.y 5: src0.xyz = temp[3], src0.w = temp[3] DP4_SAT temp[15].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 6: src0.xyz = temp[2], src0.w = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[9].w, src0.w, src0.w 7: src0.xyz = temp[5], src0.w = temp[9], src1.xyz = const[7] MAD_SAT temp[17].x, src0.xxx, src1.xxx, src1.yyy RSQ temp[9].w, |src0.w| 8: src0.xyz = temp[2], src0.w = temp[9], src1.xyz = const[1], src1.w = temp[10] MAD temp[9].xyz, src0.www, src0.xyz, src0.000 MAD temp[10].w, src1.w, src1.x, src1.y 9: src0.xyz = temp[9], src0.w = temp[10], src1.xyz = temp[0], src1.w = temp[9], src2.w = temp[0] MAD temp[11].xyz, src0.www, src0.xyz, src1.xyz MAD temp[11].w, src0.w, src1.w, src2.w 10: src0.xyz = temp[9], src0.w = temp[9], src1.xyz = temp[8], src1.w = temp[8] MAD temp[14].xyz, src0.xyz, src0.111, src1.xyz MAD temp[14].w, src0.w, src0.1, src1.w 11: src0.xyz = temp[14], src0.w = temp[14] DP3, src0.xyz, src0.xyz DP3 temp[14].w, src0.w, src0.w 12: src0.w = temp[14] RSQ temp[14].w, |src0.w| 13: src0.xyz = temp[14], src0.w = temp[14], src1.w = temp[6], src2.w = const[0] MAD temp[14].xyz, src0.www, src0.xyz, src0.000 MAD_SAT temp[7].w, src1.w, src2.w, src0.0 14: src0.xyz = temp[0] MAD_SAT temp[7].w, src0.z, src0.1, src0.0 15: src0.w = temp[7] MAD color[0].w, src0.w, src0.1, src0.0 16: BEGIN_TEX; 17: TEX temp[16], temp[11], 2D[4]; 18: TEX temp[13], temp[11], 2D[3]; 19: TEX temp[12], temp[11], 2D[0]; 20: src0.xyz = temp[12], src1.xyz = const[0] MAD temp[12].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[13], src1.xyz = const[9] MAD temp[13].xyz, src0.xyz, src1.xxx, -src1.yyy 22: src0.xyz = temp[14], src0.w = temp[14], src1.xyz = temp[13], src1.w = temp[13] DP3_SAT, src0.xyz, src1.xyz DP3_SAT temp[14].w, src0.w, src1.w 23: src0.xyz = temp[13], src0.w = temp[13], src1.xyz = temp[8], src1.w = temp[8] DP3_SAT temp[8].xyz, src0.xyz, src1.xyz DP3_SAT temp[8].w, src0.w, src1.w 24: src0.xyz = temp[6], src0.w = temp[14], src1.xyz = temp[8] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 LG2 temp[18].w, src0.w 25: src0.xyz = temp[6], src0.w = temp[18], src1.xyz = const[3], src2.xyz = const[9] MAX temp[6].xyz, src0.xyz, src1.xyz MAD temp[18].w, src0.w, src2.z, src0.0 26: src0.xyz = const[4], src0.w = temp[18], src1.xyz = temp[15], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz EX2 temp[14].w, src0.w 27: src0.xyz = temp[4], src0.w = temp[4] DP4_SAT temp[15].x, -src0.xyz, src0.xyz DP4_SAT, src0.1, src0.w 28: src0.xyz = const[5], src0.w = temp[14], src1.xyz = temp[15], src1.w = temp[12], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[14].w, src0.w, src1.w, src0.0 29: src0.xyz = const[2], src0.w = temp[14], src1.xyz = temp[12] MAD temp[12].xyz, src0.www, src0.xyz, src1.xyz 30: src0.xyz = temp[12], src1.xyz = temp[6] MAD temp[12].xyz, src0.xyz, src1.xyz, src0.000 31: src0.xyz = temp[16], src1.xyz = const[6], src2.xyz = temp[12] MAD_SAT temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 32: src0.xyz = temp[7], src0.w = temp[7], src1.xyz = const[8], src1.w = const[8] MAD temp[19].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[19].w, src0.w, src0.1, -src1.w 33: src0.xyz = temp[17], src1.xyz = temp[19], src2.xyz = const[8] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06410000: id: 1 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe406e401: src: 1 R/G/B/A dst: 6 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e401: src: 1 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 2 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae400: src: 0 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042408:Addr0: 8t, Addr1: 9c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000008:Addr0: 8t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0008c080:MAD dest:8 alp_A_src:0 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x4a925080:MAD dest:8 rgb_C_src:1 G/G/G 1 alp_C_src:1 G 1 4 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000f2:DP4 dest:15 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c091:DP dest:9 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000031:DP3 dest:3 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00084804:ALU TEX_WAIT wmask: AR omask: NONE 1:RGB_ADDR 0x00041c05:Addr0: 5t, Addr1: 7c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c09b:RSQ dest:9 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00125110:MAD dest:17 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002809:Addr0: 9t, Addr1: 10t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0008d0a0:MAD dest:10 alp_A_src:1 A 0 alp_B_src:1 R 0 targ 0 w:0 5 RGBA_INST: 0x0a490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:1 G 0 8 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000240a:Addr0: 10t, Addr1: 9t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0b0:MAD dest:11 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x1c2210b0:MAD dest:11 rgb_C_src:1 R/G/B 0 alp_C_src:2 A 0 9 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00002009:Addr0: 9t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x1a2210e0:MAD dest:14 rgb_C_src:1 R/G/B 0 alp_C_src:1 A 0 10 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c0e1:DP dest:14 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c0eb:RSQ dest:14 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 12 0:CMN_INST 0x00107804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x1000180e:Addr0: 14t, Addr1: 6t, Addr2: 0c, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0070d070:MAD dest:7 alp_A_src:1 A 0 alp_B_src:2 A 0 targ 0 w:0 5 RGBA_INST: 0x204900e0:MAD dest:14 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 13 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c08070:MAD dest:7 alp_A_src:0 B 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 14 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 15 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06440000: id: 4 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe410e40b: src: 11 R/G/B/A dst: 16 R/G/B/A 3:TEX_DXDY: 0x00000000 16 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40de40b: src: 11 R/G/B/A dst: 13 R/G/B/A 3:TEX_DXDY: 0x00000000 17 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06400000: id: 0 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ce40b: src: 11 R/G/B/A dst: 12 R/G/B/A 3:TEX_DXDY: 0x00000000 18 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004000c:Addr0: 12t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 19 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0004240d:Addr0: 13t, Addr1: 9c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x009250d0:MAD dest:13 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 20 0:CMN_INST 0x00184004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000340e:Addr0: 14t, Addr1: 13t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000340e:Addr0: 14t, Addr1: 13t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c0e1:DP dest:14 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 21 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000200d:Addr0: 13t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000200d:Addr0: 13t, Addr1: 8t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0068c081:DP dest:8 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x00000081:DP3 dest:8 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 22 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00002006:Addr0: 6t, Addr1: 8t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000c129:LN2 dest:18 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 23 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x10940c06:Addr0: 6t, Addr1: 3c, Addr2: 9c, srcp:0 2:ALPHA_ADDR 0x00000012:Addr0: 18t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x0050c120:MAD dest:18 alp_A_src:0 A 0 alp_B_src:2 B 0 targ 0 w:0 5 RGBA_INST: 0x20000065:MAX dest:6 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 24 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00603d04:Addr0: 4c, Addr1: 15t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x00000012:Addr0: 18t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0e8:EX2 dest:14 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 25 0:CMN_INST 0x00180804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000004:Addr0: 4t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440a20:rgb_A_src:0 R/G/B 1 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00618091:DP dest:9 alp_A_src:0 1 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x000000f2:DP4 dest:15 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 26 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00603d05:Addr0: 5c, Addr1: 15t, Addr2: 6t, srcp:0 2:ALPHA_ADDR 0x0000300e:Addr0: 14t, Addr1: 12t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x20222060:MAD dest:6 rgb_C_src:2 R/G/B 0 alp_C_src:0 0 0 27 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00003102:Addr0: 2c, Addr1: 12t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000e:Addr0: 14t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002210c0:MAD dest:12 rgb_C_src:1 R/G/B 0 alp_C_src:0 R 0 28 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x0000180c:Addr0: 12t, Addr1: 6t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900c0:MAD dest:12 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 29 0:CMN_INST 0x00083804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00c41810:Addr0: 16t, Addr1: 6c, Addr2: 12t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222070:MAD dest:7 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 30 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00042007:Addr0: 7t, Addr1: 8c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00042007:Addr0: 7t, Addr1: 8c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c130:MAD dest:19 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21130:MAD dest:19 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 31 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10804c11:Addr0: 17t, Addr1: 19t, Addr2: 8c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program murdog fragged morgo n00b|cheese fragged S1rSt00p1d FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL OUT[0], COLOR DCL CONST[0..1] DCL TEMP[0..1] 0: MOV_SAT TEMP[0], IN[0] 1: MAD_SAT TEMP[1].x, IN[1].xxxx, CONST[0].xxxx, CONST[0].yyyy 2: LRP OUT[0].xyz, TEMP[1].xxxx, TEMP[0], CONST[1] 3: MOV OUT[0].w, TEMP[0] 4: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: LRP output[0].xyz, temp[1].xxxx, temp[0], const[1]; 3: MOV output[0].w, temp[0]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: LRP output[0].xyz, temp[1].xxxx, temp[0], const[1]; 3: MOV output[0].w, temp[0]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: LRP output[0].xyz, temp[1].xxxx, temp[0], const[1]; 3: MOV output[0].w, temp[0]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: LRP output[0].xyz, temp[1].xxxx, temp[0], const[1]; 3: MOV output[0].w, temp[0]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: LRP output[0].xyz, temp[1].xxxx, temp[0], const[1]; 3: MOV output[0].w, temp[0]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: ADD temp[2], temp[0], -const[1]; 3: MAD output[0].xyz, temp[1].xxxx, temp[2], const[1]; 4: MOV output[0].w, temp[0]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: ADD temp[2], temp[0], -const[1]; 3: MAD output[0].xyz, temp[1].xxxx, temp[2], const[1]; 4: MOV output[0].w, temp[0]; Fragment Program: after 'dead constants' # Radeon Compiler Program 0: MOV_SAT temp[0], input[0]; 1: MAD_SAT temp[1].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 2: ADD temp[2], temp[0], -const[1]; 3: MAD output[0].xyz, temp[1].xxxx, temp[2], const[1]; 4: MOV output[0].w, temp[0]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD_SAT temp[0].xyz, src0.xyz, src0.111, src0.000 MAD_SAT temp[0].w, src0.w, src0.1, src0.0 1: src0.xyz = input[1], src1.xyz = const[0] MAD_SAT temp[1].x, src0.xxx, src1.xxx, src1.yyy 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[2].w, src0.w, src0.1, -src1.w 3: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 4: src0.w = temp[0] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: src0.xyz = input[0], src0.w = input[0] MAD_SAT temp[0].xyz, src0.xyz, src0.111, src0.000 MAD_SAT temp[0].w, src0.w, src0.1, src0.0 1: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[2].w, src0.w, src0.1, -src1.w 2: src0.xyz = input[1], src0.w = temp[0], src1.xyz = const[0] MAD_SAT temp[1].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 3: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: src0.xyz = temp[0], src0.w = temp[0] MAD_SAT temp[2].xyz, src0.xyz, src0.111, src0.000 MAD_SAT temp[2].w, src0.w, src0.1, src0.0 1: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[1], src1.w = const[1] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[4].w, src0.w, src0.1, -src1.w 2: src0.xyz = temp[1], src0.w = temp[2], src1.xyz = const[0] MAD_SAT temp[3].x, src0.xxx, src1.xxx, src1.yyy MAD color[0].w, src0.w, src0.1, src0.0 3: src0.xyz = temp[3], src1.xyz = temp[4], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00187804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c020:MAD dest:2 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490020:MAD dest:2 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 1 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040402:Addr0: 2t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c040:MAD dest:4 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa21040:MAD dest:4 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 2 0:CMN_INST 0x000c0805:OUT TEX_WAIT wmask: R omask: A 1:RGB_ADDR 0x00040001:Addr0: 1t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000002:Addr0: 2t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20125030:MAD dest:3 rgb_C_src:1 G/G/G 0 alp_C_src:0 0 0 3 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x10101003:Addr0: 3t, Addr1: 4t, Addr2: 1c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 r300: Initial fragment program murdog fragged Earathon you got fragged by 1400959 Earathon fragged lucas n00b|cheese fragged morgo FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], FOG, PERSPECTIVE DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL IN[5], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[2] DCL SAMP[3] DCL CONST[3..4] DCL CONST[2] DCL TEMP[0..6] IMM FLT32 { 2.0000, 1.0000, 0.0250, 4.0000} IMM FLT32 { 0.0100, 0.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[4], IN[0] 2: DP3 TEMP[1].w, IN[5], IN[5] 3: RSQ TEMP[1].w, TEMP[1].wwww 4: MUL TEMP[1].xyz, TEMP[1].wwww, IN[5] 5: TEX TEMP[2], IN[3], SAMP[2], 2D 6: MAD TEMP[2].xy, TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 7: MAD TEMP[3], TEMP[2], IMM[0].zzzz, IN[4] 8: TEX TEMP[2], TEMP[3], SAMP[2], 2D 9: MAD TEMP[2].xy, TEMP[2], IMM[0].xxxx, -IMM[0].yyyy 10: RCP TEMP[3].w, IN[2].wwww 11: MUL TEMP[3].xy, IN[2], TEMP[3].wwww 12: TEX TEMP[4].w, TEMP[3], SAMP[3], 2D 13: MOV_SAT TEMP[4].x, TEMP[0].zzzz 14: MAD TEMP[4].w, TEMP[4], IMM[0].wwww, IN[2].zzzz 15: MUL_SAT TEMP[5].w, TEMP[4].wwww, TEMP[4].xxxx 16: MAD TEMP[3].xy, TEMP[2], IMM[1].xxxx, TEMP[3] 17: TEX_SAT TEMP[5].xyz, TEMP[3], SAMP[3], 2D 18: MAD_SAT TEMP[6].x, IN[1].xxxx, CONST[2].xxxx, CONST[2].yyyy 19: LRP OUT[0].xyz, TEMP[6].xxxx, TEMP[5], CONST[3] 20: MOV OUT[0].w, TEMP[5] 21: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: SUB temp[0].y, const[4], temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: LRP output[0].xyz, temp[6].xxxx, temp[5], const[3]; 23: MOV output[0].w, temp[5]; Fragment Program: after 'rewrite depth out' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: SUB temp[0].y, const[4], temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: LRP output[0].xyz, temp[6].xxxx, temp[5], const[3]; 23: MOV output[0].w, temp[5]; Fragment Program: after 'transform KILP' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: SUB temp[0].y, const[4], temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: LRP output[0].xyz, temp[6].xxxx, temp[5], const[3]; 23: MOV output[0].w, temp[5]; Fragment Program: after 'unroll loops' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: SUB temp[0].y, const[4], temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: LRP output[0].xyz, temp[6].xxxx, temp[5], const[3]; 23: MOV output[0].w, temp[5]; Fragment Program: after 'transform TEX' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: SUB temp[0].y, const[4], temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, temp[1].wwww; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: LRP output[0].xyz, temp[6].xxxx, temp[5], const[3]; 23: MOV output[0].w, temp[5]; Fragment Program: after 'native rewrite' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: ADD temp[0].y, const[4], -temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, |temp[1].wwww|; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: ADD temp[8], temp[5], -const[3]; 23: MAD output[0].xyz, temp[6].xxxx, temp[8], const[3]; 24: MOV output[0].w, temp[5]; Fragment Program: after 'dataflow swizzles' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[7]; 4: ADD temp[0].y, const[4], -temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, |temp[1].wwww|; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 10: MAD temp[3], temp[2], const[5].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[5].xxxx, -const[5].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[5].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[6].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[2].xxxx, const[2].yyyy; 22: ADD temp[8], temp[5], -const[3]; 23: MAD output[0].xyz, temp[6].xxxx, temp[8], const[3]; 24: MOV output[0].w, temp[5]; CONST[3] = { 2.0000 1.0000 0.0250 4.0000 } CONST[4] = { 0.0100 0.0000 0.0000 0.0000 } Fragment Program: after 'dead constants' # Radeon Compiler Program 0: RCP temp[7].w, input[0].wwww; 1: MUL temp[7].xyz, input[0], temp[7].wwww; 2: MAD temp[7].xyz, temp[7].xyz0, const[5].xyz0, const[6].xyz0; 3: MOV temp[0], temp[7]; 4: ADD temp[0].y, const[2], -temp[7]; 5: DP3 temp[1].w, input[5], input[5]; 6: RSQ temp[1].w, |temp[1].wwww|; 7: MUL temp[1].xyz, temp[1].wwww, input[5]; 8: TEX temp[2], input[3], 2D[2]; 9: MAD temp[2].xy, temp[2], const[3].xxxx, -const[3].yyyy; 10: MAD temp[3], temp[2], const[3].zzzz, input[4]; 11: TEX temp[2], temp[3], 2D[2]; 12: MAD temp[2].xy, temp[2], const[3].xxxx, -const[3].yyyy; 13: RCP temp[3].w, input[2].wwww; 14: MUL temp[3].xy, input[2], temp[3].wwww; 15: TEX temp[4].w, temp[3], 2D[3]; 16: MOV_SAT temp[4].x, temp[0].zzzz; 17: MAD temp[4].w, temp[4], const[3].wwww, input[2].zzzz; 18: MUL_SAT temp[5].w, temp[4].wwww, temp[4].xxxx; 19: MAD temp[3].xy, temp[2], const[4].xxxx, temp[3]; 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: MAD_SAT temp[6].x, input[1].xxxx, const[0].xxxx, const[0].yyyy; 22: ADD temp[8], temp[5], -const[1]; 23: MAD output[0].xyz, temp[6].xxxx, temp[8], const[1]; 24: MOV output[0].w, temp[5]; Fragment Program: after 'pair translate' # Radeon Compiler Program 0: src0.w = input[0] RCP temp[7].w, src0.w 1: src0.xyz = input[0], src0.w = temp[7] MAD temp[7].xyz, src0.xyz, src0.www, src0.000 2: src0.xyz = temp[7], src1.xyz = const[5], src2.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 3: src0.xyz = temp[7], src0.w = temp[7] MAD temp[0].xyz, src0.xyz, src0.111, src0.000 MAD temp[0].w, src0.w, src0.1, src0.0 4: src0.xyz = const[2], src1.xyz = temp[7] MAD temp[0].y, src0.xyz, src0.111, -src1.xyz 5: src0.xyz = input[5], src0.w = input[5] DP3, src0.xyz, src0.xyz DP3 temp[1].w, src0.w, src0.w 6: src0.w = temp[1] RSQ temp[1].w, |src0.w| 7: src0.xyz = input[5], src0.w = temp[1] MAD temp[1].xyz, src0.www, src0.xyz, src0.000 8: TEX temp[2], input[3], 2D[2]; 9: src0.xyz = temp[2], src1.xyz = const[3] MAD temp[2].xy, src0.xyz, src1.xxx, -src1.yyy 10: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[3], src1.w = input[4], src2.xyz = input[4] MAD temp[3].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[3].w, src0.w, src1.z, src1.w 11: TEX temp[2], temp[3], 2D[2]; 12: src0.xyz = temp[2], src1.xyz = const[3] MAD temp[2].xy, src0.xyz, src1.xxx, -src1.yyy 13: src0.w = input[2] RCP temp[3].w, src0.w 14: src0.xyz = input[2], src0.w = temp[3] MAD temp[3].xy, src0.xyz, src0.www, src0.000 15: TEX temp[4].w, temp[3], 2D[3]; 16: src0.xyz = temp[0] MAD_SAT temp[4].x, src0.zzz, src0.111, src0.000 17: src0.xyz = input[2], src0.w = temp[4], src1.w = const[3] MAD temp[4].w, src0.w, src1.w, src0.z 18: src0.xyz = temp[4], src0.w = temp[4] MAD_SAT temp[5].w, src0.w, src0.x, src0.0 19: src0.xyz = temp[2], src1.xyz = const[4], src2.xyz = temp[3] MAD temp[3].xy, src0.xyz, src1.xxx, src2.xyz 20: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 21: src0.xyz = input[1], src1.xyz = const[0] MAD_SAT temp[6].x, src0.xxx, src1.xxx, src1.yyy 22: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[1], src1.w = const[1] MAD temp[8].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[8].w, src0.w, src0.1, -src1.w 23: src0.xyz = temp[6], src1.xyz = temp[8], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 24: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after 'pair scheduling' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], input[3], 2D[2]; 2: src0.xyz = input[5], src0.w = input[5] DP3, src0.xyz, src0.xyz DP3 temp[1].w, src0.w, src0.w 3: src0.xyz = temp[2], src0.w = temp[1], src1.xyz = const[3] MAD temp[2].xy, src0.xyz, src1.xxx, -src1.yyy RSQ temp[1].w, |src0.w| 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[3], src1.w = input[4], src2.xyz = input[4] MAD temp[3].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[3].w, src0.w, src1.z, src1.w 5: src0.xyz = input[5], src0.w = temp[1], src1.w = input[0] MAD temp[1].xyz, src0.www, src0.xyz, src0.000 RCP temp[7].w, src1.w 6: src0.xyz = input[0], src0.w = temp[7] MAD temp[7].xyz, src0.xyz, src0.www, src0.000 7: src0.xyz = temp[7], src1.xyz = const[5], src2.xyz = const[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 8: src0.xyz = temp[7], src0.w = temp[7] MAD temp[0].xyz, src0.xyz, src0.111, src0.000 MAD temp[0].w, src0.w, src0.1, src0.0 9: src0.xyz = temp[0] MAD_SAT temp[4].x, src0.zzz, src0.111, src0.000 10: src0.xyz = const[2], src1.xyz = temp[7] MAD temp[0].y, src0.xyz, src0.111, -src1.xyz 11: src0.xyz = input[1], src1.xyz = const[0] MAD_SAT temp[6].x, src0.xxx, src1.xxx, src1.yyy 12: BEGIN_TEX; 13: TEX temp[2], temp[3], 2D[2]; 14: src0.xyz = temp[2], src0.w = input[2], src1.xyz = const[3] MAD temp[2].xy, src0.xyz, src1.xxx, -src1.yyy RCP temp[3].w, src0.w 15: src0.xyz = input[2], src0.w = temp[3] MAD temp[3].xy, src0.xyz, src0.www, src0.000 16: BEGIN_TEX; 17: TEX temp[4].w, temp[3], 2D[3]; 18: src0.xyz = temp[2], src1.xyz = const[4], src2.xyz = temp[3] MAD temp[3].xy, src0.xyz, src1.xxx, src2.xyz 19: src0.xyz = input[2], src0.w = temp[4], src1.w = const[3] MAD temp[4].w, src0.w, src1.w, src0.z 20: src0.xyz = temp[4], src0.w = temp[4] MAD_SAT temp[5].w, src0.w, src0.x, src0.0 21: src0.w = temp[5] MAD color[0].w, src0.w, src0.1, src0.0 22: BEGIN_TEX; 23: TEX_SAT temp[5].xyz, temp[3], 2D[3]; 24: src0.xyz = temp[5], src0.w = temp[5], src1.xyz = const[1], src1.w = const[1] MAD temp[8].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[8].w, src0.w, src0.1, -src1.w 25: src0.xyz = temp[6], src1.xyz = temp[8], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after 'dumb register allocation' # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8], temp[1], 2D[2]; 2: src0.xyz = temp[3], src0.w = temp[3] DP3, src0.xyz, src0.xyz DP3 temp[7].w, src0.w, src0.w 3: src0.xyz = temp[8], src0.w = temp[7], src1.xyz = const[3] MAD temp[8].xy, src0.xyz, src1.xxx, -src1.yyy RSQ temp[7].w, |src0.w| 4: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = const[3], src1.w = temp[2], src2.xyz = temp[2] MAD temp[9].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[9].w, src0.w, src1.z, src1.w 5: src0.xyz = temp[3], src0.w = temp[7], src1.w = temp[5] MAD temp[7].xyz, src0.www, src0.xyz, src0.000 RCP temp[13].w, src1.w 6: src0.xyz = temp[5], src0.w = temp[13] MAD temp[13].xyz, src0.xyz, src0.www, src0.000 7: src0.xyz = temp[13], src1.xyz = const[5], src2.xyz = const[6] MAD temp[13].xyz, src0.xyz, src1.xyz, src2.xyz 8: src0.xyz = temp[13], src0.w = temp[13] MAD temp[6].xyz, src0.xyz, src0.111, src0.000 MAD temp[6].w, src0.w, src0.1, src0.0 9: src0.xyz = temp[6] MAD_SAT temp[10].x, src0.zzz, src0.111, src0.000 10: src0.xyz = const[2], src1.xyz = temp[13] MAD temp[6].y, src0.xyz, src0.111, -src1.xyz 11: src0.xyz = temp[4], src1.xyz = const[0] MAD_SAT temp[12].x, src0.xxx, src1.xxx, src1.yyy 12: BEGIN_TEX; 13: TEX temp[8], temp[9], 2D[2]; 14: src0.xyz = temp[8], src0.w = temp[0], src1.xyz = const[3] MAD temp[8].xy, src0.xyz, src1.xxx, -src1.yyy RCP temp[9].w, src0.w 15: src0.xyz = temp[0], src0.w = temp[9] MAD temp[9].xy, src0.xyz, src0.www, src0.000 16: BEGIN_TEX; 17: TEX temp[10].w, temp[9], 2D[3]; 18: src0.xyz = temp[8], src1.xyz = const[4], src2.xyz = temp[9] MAD temp[9].xy, src0.xyz, src1.xxx, src2.xyz 19: src0.xyz = temp[0], src0.w = temp[10], src1.w = const[3] MAD temp[10].w, src0.w, src1.w, src0.z 20: src0.xyz = temp[10], src0.w = temp[10] MAD_SAT temp[11].w, src0.w, src0.x, src0.0 21: src0.w = temp[11] MAD color[0].w, src0.w, src0.1, src0.0 22: BEGIN_TEX; 23: TEX_SAT temp[11].xyz, temp[9], 2D[3]; 24: src0.xyz = temp[11], src0.w = temp[11], src1.xyz = const[1], src1.w = const[1] MAD temp[14].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[14].w, src0.w, src0.1, -src1.w 25: src0.xyz = temp[12], src1.xyz = temp[14], src2.xyz = const[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz R500 Fragment Program: -------- 0 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e401: src: 1 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 1 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00440220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0060c071:DP dest:7 alp_A_src:0 A 0 alp_B_src:0 A 0 targ 0 w:0 5 RGBA_INST: 0x00000011:DP3 dest:1 rgb_C_src:0 R/R/R 0 alp_C_src:0 R 0 2 0:CMN_INST 0x00005804:ALU TEX_WAIT wmask: ARG omask: NONE 1:RGB_ADDR 0x00040c08:Addr0: 8t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000007:Addr0: 7t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0004c07b:RSQ dest:7 alp_A_src:0 A 2 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00925080:MAD dest:8 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 3 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00240c08:Addr0: 8t, Addr1: 3c, Addr2: 2t, srcp:0 2:ALPHA_ADDR 0x00000808:Addr0: 8t, Addr1: 2t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00492220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 B/B/B 0 targ: 0 4 ALPHA_INST:0x0048c090:MAD dest:9 alp_A_src:0 A 0 alp_B_src:1 B 0 targ 0 w:0 5 RGBA_INST: 0x1a222090:MAD dest:9 rgb_C_src:2 R/G/B 0 alp_C_src:1 A 0 4 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x00000003:Addr0: 3t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00001407:Addr0: 7t, Addr1: 5t, Addr2: 0t, srcp:0 3 RGB_INST: 0x0044036c:rgb_A_src:0 A/A/A 0 rgb_B_src:0 R/G/B 0 targ: 0 4 ALPHA_INST:0x0000d0da:RCP dest:13 alp_A_src:1 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490070:MAD dest:7 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 5 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x00000005:Addr0: 5t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x006d8220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 A/A/A 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900d0:MAD dest:13 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 6 0:CMN_INST 0x00003804:ALU TEX_WAIT wmask: RGB omask: NONE 1:RGB_ADDR 0x1064140d:Addr0: 13t, Addr1: 5c, Addr2: 6c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x002220d0:MAD dest:13 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 7 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000d:Addr0: 13t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c060:MAD dest:6 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20490060:MAD dest:6 rgb_C_src:0 0/0/0 0 alp_C_src:0 0 0 8 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00000006:Addr0: 6t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0248:rgb_A_src:0 B/B/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x004900a0:MAD dest:10 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 9 0:CMN_INST 0x00001004:ALU TEX_WAIT wmask: G omask: NONE 1:RGB_ADDR 0x00003502:Addr0: 2c, Addr1: 13t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00a21060:MAD dest:6 rgb_C_src:1 R/G/B 1 alp_C_src:0 R 0 10 0:CMN_INST 0x00080804:ALU TEX_WAIT wmask: R omask: NONE 1:RGB_ADDR 0x00040004:Addr0: 4t, Addr1: 0c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x001250c0:MAD dest:12 rgb_C_src:1 G/G/G 0 alp_C_src:0 R 0 11 0:CMN_INST 0x00007807:TEX TEX_WAIT wmask: ARGB omask: NONE 1:TEX_INST: 0x06420000: id: 2 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe408e409: src: 9 R/G/B/A dst: 8 R/G/B/A 3:TEX_DXDY: 0x00000000 12 0:CMN_INST 0x00005804:ALU TEX_WAIT wmask: ARG omask: NONE 1:RGB_ADDR 0x00040c08:Addr0: 8t, Addr1: 3c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c09a:RCP dest:9 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00925080:MAD dest:8 rgb_C_src:1 G/G/G 1 alp_C_src:0 R 0 13 0:CMN_INST 0x00001804:ALU TEX_WAIT wmask: RG omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00000009:Addr0: 9t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x006d8220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 A/A/A 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00490090:MAD dest:9 rgb_C_src:0 0/0/0 0 alp_C_src:0 R 0 14 0:CMN_INST 0x00004007:TEX TEX_WAIT wmask: A omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40ae409: src: 9 R/G/B/A dst: 10 R/G/B/A 3:TEX_DXDY: 0x00000000 15 0:CMN_INST 0x00001804:ALU TEX_WAIT wmask: RG omask: NONE 1:RGB_ADDR 0x00941008:Addr0: 8t, Addr1: 4c, Addr2: 9t, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00002220:rgb_A_src:0 R/G/B 0 rgb_B_src:1 R/R/R 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222090:MAD dest:9 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 16 0:CMN_INST 0x00004004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x00040c0a:Addr0: 10t, Addr1: 3c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0068c0a0:MAD dest:10 alp_A_src:0 A 0 alp_B_src:1 A 0 targ 0 w:0 5 RGBA_INST: 0x10000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 B 0 17 0:CMN_INST 0x00104004:ALU TEX_WAIT wmask: A omask: NONE 1:RGB_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000a:Addr0: 10t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x0000c0b0:MAD dest:11 alp_A_src:0 A 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 18 0:CMN_INST 0x00040005:OUT TEX_WAIT wmask: NONE omask: A 1:RGB_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0000000b:Addr0: 11t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00000000:rgb_A_src:0 R/R/R 0 rgb_B_src:0 R/R/R 0 targ: 0 4 ALPHA_INST:0x00c0c000:MAD dest:0 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x20000000:MAD dest:0 rgb_C_src:0 R/R/R 0 alp_C_src:0 0 0 19 0:CMN_INST 0x00003807:TEX TEX_WAIT wmask: RGB omask: NONE 1:TEX_INST: 0x06430000: id: 3 op:LD, ACQ, IGNUNC SCALED 2:TEX_ADDR: 0xe40be409: src: 9 R/G/B/A dst: 11 R/G/B/A 3:TEX_DXDY: 0x00000000 20 0:CMN_INST 0x00007804:ALU TEX_WAIT wmask: ARGB omask: NONE 1:RGB_ADDR 0x0004040b:Addr0: 11t, Addr1: 1c, Addr2: 0t, srcp:0 2:ALPHA_ADDR 0x0004040b:Addr0: 11t, Addr1: 1c, Addr2: 0t, srcp:0 3 RGB_INST: 0x00db0220:rgb_A_src:0 R/G/B 0 rgb_B_src:0 1/1/1 0 targ: 0 4 ALPHA_INST:0x00c0c0e0:MAD dest:14 alp_A_src:0 A 0 alp_B_src:0 1 0 targ 0 w:0 5 RGBA_INST: 0x5aa210e0:MAD dest:14 rgb_C_src:1 R/G/B 1 alp_C_src:1 A 1 21 0:CMN_INST 0x00038005:OUT TEX_WAIT wmask: NONE omask: RGB 1:RGB_ADDR 0x1010380c:Addr0: 12t, Addr1: 14t, Addr2: 1c, srcp:0 2:ALPHA_ADDR 0x00000000:Addr0: 0t, Addr1: 0t, Addr2: 0t, srcp:0 3 RGB_INST: 0x00442000:rgb_A_src:0 R/R/R 0 rgb_B_src:1 R/G/B 0 targ: 0 4 ALPHA_INST:0x00000000:MAD dest:0 alp_A_src:0 R 0 alp_B_src:0 R 0 targ 0 w:0 5 RGBA_INST: 0x00222000:MAD dest:0 rgb_C_src:2 R/G/B 0 alp_C_src:0 R 0 rapide fragged n00b|cheese you got fragged by DaBesTwIZARD Earathon fragged rapide disconnected