debug_get_option: GALLIUM_TRACE = (null) debug_get_bool_option: GALLIUM_RBUG = FALSE radeon: Successfully grabbed chipset info from kernel! radeon: DRM version: 2.0.0 ID: 0x4152 GB: 1 Z: 1 radeon: GART size: 61 MB VRAM size: 128 MB debug_get_flags_option: RADEON_DEBUG = 0x2 (fp) debug_get_bool_option: RADEON_NO_TCL = FALSE Mesa: CPU vendor: GenuineIntel Mesa: CPU name: Intel(R) Pentium(R) 4 CPU 2.80GHz Mesa: Mesa 7.9-devel DEBUG build Jun 10 2010 23:16:01 Mesa warning: software DXTn compression/decompression available debug_get_bool_option: MESA_MVP_DP4 = FALSE debug_get_flags_option: ST_DEBUG = 0x0 debug_get_bool_option: DRAW_FSE = FALSE debug_get_bool_option: DRAW_NO_FSE = FALSE debug_get_bool_option: GALLIUM_DUMP_VS = FALSE r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 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].xy__, 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 register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], temp[0].xy__, 2D[0]; 2: 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 pc=0************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) TEX: TEX t0, t0, texture[0] (00008000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow passes # 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 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 pc=1************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow passes # 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 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 pc=2************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program 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], TEMP[0], IN[0] 2: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[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].xy__, 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1], temp[1].xy__, 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1], 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 pc=3************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL OUT[0], COLOR DCL CONST[0] 0: MOV OUT[0], CONST[0] 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0], const[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = const[0], src0.w = const[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 = const[0], src0.w = const[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = const[0], src0.w = const[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 MAD color[0].w, src0.w, src0.1, src0.0 pc=4************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: c0 t0 t0 -> o0.xyz (1c000020) w: c0 t0 t0 -> o0.w (01000020) xyz: c0.xyz 1.0 0.0 op: 00050a80 w: c0.w 1.0 0.0 op: 00040889 r300: Initial fragment program FRAG DCL OUT[0], COLOR IMM FLT32 { 0.0000, 0.0000, 0.0000, 0.0000} 0: MOV OUT[0], IMM[0].xxxx 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0], temp[0].0000; Fragment Program: after pair translate # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 pc=5************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: 0.0 1.0 0.0 op: 00040890 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[2], PERSPECTIVE DCL IN[2], GENERIC[4], PERSPECTIVE DCL IN[3], GENERIC[5], PERSPECTIVE DCL IN[4], GENERIC[6], PERSPECTIVE DCL IN[5], GENERIC[7], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL SAMP[5] DCL CONST[3..5] DCL TEMP[0..11] IMM FLT32 { 0.0010, 0.0000, 1.0000, 0.1000} IMM FLT32 { 2.0000, -1.0000, 8.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: SUB TEMP[1].w, TEMP[0].wwww, IMM[0].xxxx 2: KIL TEMP[1].wwww 3: TEX TEMP[2], IN[2], SAMP[1], 2D 4: MOV TEMP[2].x, TEMP[2].wwww 5: MAD TEMP[2].xy, TEMP[2], IMM[1].xxxx, IMM[1].yyyy 6: MOV TEMP[2].z, IMM[0].yyyy 7: DP3 TEMP[3].x, TEMP[2], TEMP[2] 8: ADD TEMP[3].x, IMM[0].zzzz, -TEMP[3].xxxx 9: RSQ TEMP[3].x, TEMP[3].xxxx 10: RCP TEMP[2].z, TEMP[3].xxxx 11: DP3 TEMP[4].x, IN[3], TEMP[2] 12: DP3 TEMP[4].y, IN[4], TEMP[2] 13: DP3 TEMP[4].z, IN[5], TEMP[2] 14: TEX TEMP[5], TEMP[4], SAMP[2], CUBE 15: MUL TEMP[5], TEMP[5], CONST[3] 16: MUL TEMP[5], TEMP[5], IMM[1].xxxx 17: MUL TEMP[6], TEMP[0], CONST[4] 18: MUL TEMP[6], TEMP[5], TEMP[6] 19: DP3 TEMP[3], IN[1], TEMP[4] 20: ADD TEMP[3], TEMP[3], TEMP[3] 21: MAD TEMP[7], TEMP[4], TEMP[3].xxxx, -IN[1] 22: TEX TEMP[8], TEMP[7], SAMP[3], CUBE 23: TEX TEMP[9], IN[2], SAMP[4], 2D 24: ADD TEMP[1], TEMP[9], TEMP[9] 25: MAD TEMP[6], TEMP[1], TEMP[8], TEMP[6] 26: MUL TEMP[3], TEMP[6], IN[0] 27: MOV OUT[0].w, TEMP[0].wwww 28: DP3 TEMP[1], IN[1], TEMP[4] 29: ADD TEMP[1], IMM[0].zzzz, -TEMP[1] 30: MUL TEMP[1], TEMP[1], TEMP[1] 31: MUL TEMP[1], TEMP[1], TEMP[1] 32: MUL TEMP[1], TEMP[1], CONST[5] 33: MUL TEMP[10], TEMP[1], TEMP[5] 34: MAD TEMP[10], TEMP[1], IMM[0].wwww, TEMP[10] 35: TEX TEMP[11], IN[2], SAMP[5], 2D 36: MUL_SAT TEMP[5], TEMP[5], IMM[1].zzzz 37: MAD TEMP[1], TEMP[11], -TEMP[5].xxxx, TEMP[11] 38: MAX TEMP[1], TEMP[1], IMM[0].yyyy 39: ADD TEMP[10], TEMP[1], TEMP[10] 40: ADD OUT[0].xyz, TEMP[3], TEMP[10] 41: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: SUB temp[1].w, temp[0].wwww, const[6].xxxx; 2: KIL temp[1].wwww; 3: TEX temp[2], input[2], 2D[1]; 4: MOV temp[2].x, temp[2].wwww; 5: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 6: MOV temp[2].z, const[6].yyyy; 7: DP3 temp[3].x, temp[2], temp[2]; 8: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 9: RSQ temp[3].x, temp[3].xxxx; 10: RCP temp[2].z, temp[3].xxxx; 11: DP3 temp[4].x, input[3], temp[2]; 12: DP3 temp[4].y, input[4], temp[2]; 13: DP3 temp[4].z, input[5], temp[2]; 14: TEX temp[5], temp[4], CUBE[2]; 15: MUL temp[5], temp[5], const[3]; 16: MUL temp[5], temp[5], const[7].xxxx; 17: MUL temp[6], temp[0], const[4]; 18: MUL temp[6], temp[5], temp[6]; 19: DP3 temp[3], input[1], temp[4]; 20: ADD temp[3], temp[3], temp[3]; 21: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 22: TEX temp[8], temp[7], CUBE[3]; 23: TEX temp[9], input[2], 2D[4]; 24: ADD temp[1], temp[9], temp[9]; 25: MAD temp[6], temp[1], temp[8], temp[6]; 26: MUL temp[3], temp[6], input[0]; 27: MOV output[0].w, temp[0].wwww; 28: DP3 temp[1], input[1], temp[4]; 29: ADD temp[1], const[6].zzzz, -temp[1]; 30: MUL temp[1], temp[1], temp[1]; 31: MUL temp[1], temp[1], temp[1]; 32: MUL temp[1], temp[1], const[5]; 33: MUL temp[10], temp[1], temp[5]; 34: MAD temp[10], temp[1], const[6].wwww, temp[10]; 35: TEX temp[11], input[2], 2D[5]; 36: MUL_SAT temp[5], temp[5], const[7].zzzz; 37: MAD temp[1], temp[11], -temp[5].xxxx, temp[11]; 38: MAX temp[1], temp[1], const[6].yyyy; 39: ADD temp[10], temp[1], temp[10]; 40: ADD output[0].xyz, temp[3], temp[10]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: SUB temp[1].w, temp[0].wwww, const[6].xxxx; 2: KIL temp[1].wwww; 3: TEX temp[2], input[2], 2D[1]; 4: MOV temp[2].x, temp[2].wwww; 5: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 6: MOV temp[2].z, const[6].yyyy; 7: DP3 temp[3].x, temp[2], temp[2]; 8: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 9: RSQ temp[3].x, temp[3].xxxx; 10: RCP temp[2].z, temp[3].xxxx; 11: DP3 temp[4].x, input[3], temp[2]; 12: DP3 temp[4].y, input[4], temp[2]; 13: DP3 temp[4].z, input[5], temp[2]; 14: TEX temp[5], temp[4], CUBE[2]; 15: MUL temp[5], temp[5], const[3]; 16: MUL temp[5], temp[5], const[7].xxxx; 17: MUL temp[6], temp[0], const[4]; 18: MUL temp[6], temp[5], temp[6]; 19: DP3 temp[3], input[1], temp[4]; 20: ADD temp[3], temp[3], temp[3]; 21: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 22: TEX temp[8], temp[7], CUBE[3]; 23: TEX temp[9], input[2], 2D[4]; 24: ADD temp[1], temp[9], temp[9]; 25: MAD temp[6], temp[1], temp[8], temp[6]; 26: MUL temp[3], temp[6], input[0]; 27: MOV output[0].w, temp[0].wwww; 28: DP3 temp[1], input[1], temp[4]; 29: ADD temp[1], const[6].zzzz, -temp[1]; 30: MUL temp[1], temp[1], temp[1]; 31: MUL temp[1], temp[1], temp[1]; 32: MUL temp[1], temp[1], const[5]; 33: MUL temp[10], temp[1], temp[5]; 34: MAD temp[10], temp[1], const[6].wwww, temp[10]; 35: TEX temp[11], input[2], 2D[5]; 36: MUL_SAT temp[5], temp[5], const[7].zzzz; 37: MAD temp[1], temp[11], -temp[5].xxxx, temp[11]; 38: MAX temp[1], temp[1], const[6].yyyy; 39: ADD temp[10], temp[1], temp[10]; 40: ADD output[0].xyz, temp[3], temp[10]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: SUB temp[1].w, temp[0].wwww, const[6].xxxx; 2: KIL temp[1].wwww; 3: TEX temp[2], input[2], 2D[1]; 4: MOV temp[2].x, temp[2].wwww; 5: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 6: MOV temp[2].z, const[6].yyyy; 7: DP3 temp[3].x, temp[2], temp[2]; 8: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 9: RSQ temp[3].x, temp[3].xxxx; 10: RCP temp[2].z, temp[3].xxxx; 11: DP3 temp[4].x, input[3], temp[2]; 12: DP3 temp[4].y, input[4], temp[2]; 13: DP3 temp[4].z, input[5], temp[2]; 14: TEX temp[5], temp[4], CUBE[2]; 15: MUL temp[5], temp[5], const[3]; 16: MUL temp[5], temp[5], const[7].xxxx; 17: MUL temp[6], temp[0], const[4]; 18: MUL temp[6], temp[5], temp[6]; 19: DP3 temp[3], input[1], temp[4]; 20: ADD temp[3], temp[3], temp[3]; 21: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 22: TEX temp[8], temp[7], CUBE[3]; 23: TEX temp[9], input[2], 2D[4]; 24: ADD temp[1], temp[9], temp[9]; 25: MAD temp[6], temp[1], temp[8], temp[6]; 26: MUL temp[3], temp[6], input[0]; 27: MOV output[0].w, temp[0].wwww; 28: DP3 temp[1], input[1], temp[4]; 29: ADD temp[1], const[6].zzzz, -temp[1]; 30: MUL temp[1], temp[1], temp[1]; 31: MUL temp[1], temp[1], temp[1]; 32: MUL temp[1], temp[1], const[5]; 33: MUL temp[10], temp[1], temp[5]; 34: MAD temp[10], temp[1], const[6].wwww, temp[10]; 35: TEX temp[11], input[2], 2D[5]; 36: MUL_SAT temp[5], temp[5], const[7].zzzz; 37: MAD temp[1], temp[11], -temp[5].xxxx, temp[11]; 38: MAX temp[1], temp[1], const[6].yyyy; 39: ADD temp[10], temp[1], temp[10]; 40: ADD output[0].xyz, temp[3], temp[10]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[1].w, temp[0].wwww, -const[6].xxxx; 2: KIL temp[1].wwww; 3: TEX temp[2], input[2], 2D[1]; 4: MOV temp[2].x, temp[2].wwww; 5: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 6: MOV temp[2].z, const[6].yyyy; 7: DP3 temp[3].x, temp[2], temp[2]; 8: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 9: RSQ temp[3].x, |temp[3].xxxx|; 10: RCP temp[2].z, temp[3].xxxx; 11: DP3 temp[4].x, input[3], temp[2]; 12: DP3 temp[4].y, input[4], temp[2]; 13: DP3 temp[4].z, input[5], temp[2]; 14: TEX temp[5], temp[4], CUBE[2]; 15: MUL temp[5], temp[5], const[3]; 16: MUL temp[5], temp[5], const[7].xxxx; 17: MUL temp[6], temp[0], const[4]; 18: MUL temp[6], temp[5], temp[6]; 19: DP3 temp[3], input[1], temp[4]; 20: ADD temp[3], temp[3], temp[3]; 21: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 22: TEX temp[8], temp[7], CUBE[3]; 23: TEX temp[9], input[2], 2D[4]; 24: ADD temp[1], temp[9], temp[9]; 25: MAD temp[6], temp[1], temp[8], temp[6]; 26: MUL temp[3], temp[6], input[0]; 27: MOV output[0].w, temp[0].wwww; 28: DP3 temp[1], input[1], temp[4]; 29: ADD temp[1], const[6].zzzz, -temp[1]; 30: MUL temp[1], temp[1], temp[1]; 31: MUL temp[1], temp[1], temp[1]; 32: MUL temp[1], temp[1], const[5]; 33: MUL temp[10], temp[1], temp[5]; 34: MAD temp[10], temp[1], const[6].wwww, temp[10]; 35: TEX temp[11], input[2], 2D[5]; 36: MUL_SAT temp[5], temp[5], const[7].zzzz; 37: MAD temp[1], temp[11], -temp[5].xxxx, temp[11]; 38: MAX temp[1], temp[1], const[6].yyyy; 39: ADD temp[10], temp[1], temp[10]; 40: ADD output[0].xyz, temp[3], temp[10]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[1].w, temp[0].wwww, -const[6].xxxx; 2: KIL temp[1].wwww; 3: TEX temp[2], input[2], 2D[1]; 4: MOV temp[2].x, temp[2].wwww; 5: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 6: MOV temp[2].z, const[6].yyyy; 7: DP3 temp[3].x, temp[2], temp[2]; 8: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 9: RSQ temp[3].x, |temp[3].xxxx|; 10: RCP temp[2].z, temp[3].xxxx; 11: DP3 temp[4].x, input[3], temp[2]; 12: DP3 temp[4].y, input[4], temp[2]; 13: DP3 temp[4].z, input[5], temp[2]; 14: TEX temp[5], temp[4], CUBE[2]; 15: MUL temp[5], temp[5], const[3]; 16: MUL temp[5], temp[5], const[7].xxxx; 17: MUL temp[6], temp[0], const[4]; 18: MUL temp[6], temp[5], temp[6]; 19: DP3 temp[3], input[1], temp[4]; 20: ADD temp[3], temp[3], temp[3]; 21: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 22: TEX temp[8], temp[7], CUBE[3]; 23: TEX temp[9], input[2], 2D[4]; 24: ADD temp[1], temp[9], temp[9]; 25: MAD temp[6], temp[1], temp[8], temp[6]; 26: MUL temp[3], temp[6], input[0]; 27: MOV output[0].w, temp[0].wwww; 28: DP3 temp[1], input[1], temp[4]; 29: ADD temp[1], const[6].zzzz, -temp[1]; 30: MUL temp[1], temp[1], temp[1]; 31: MUL temp[1], temp[1], temp[1]; 32: MUL temp[1], temp[1], const[5]; 33: MUL temp[10], temp[1], temp[5]; 34: MAD temp[10], temp[1], const[6].wwww, temp[10]; 35: TEX temp[11], input[2], 2D[5]; 36: MUL_SAT temp[5], temp[5], const[7].zzzz; 37: MAD temp[1], temp[11], -temp[5].xxxx, temp[11]; 38: MAX temp[1], temp[1], const[6].yyyy; 39: ADD temp[10], temp[1], temp[10]; 40: ADD output[0].xyz, temp[3], temp[10]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: ADD temp[1].w, temp[0].___w, -const[6].___x; 2: KIL temp[1].wwww; 3: TEX temp[2].yw, input[2].xy__, 2D[1]; 4: MOV temp[2].x, temp[2].w___; 5: MAD temp[2].xy, temp[2].xy__, const[7].xx__, const[7].yy__; 6: MOV temp[2].z, const[6].__y_; 7: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 8: ADD temp[3].x, const[6].z___, -temp[3].x___; 9: RSQ temp[3].x, |temp[3].x___|; 10: RCP temp[2].z, temp[3].x___; 11: DP3 temp[4].x, input[3].xyz_, temp[2].xyz_; 12: DP3 temp[4].y, input[4].xyz_, temp[2].xyz_; 13: DP3 temp[4].z, input[5].xyz_, temp[2].xyz_; 14: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 15: MUL temp[5].xyz, temp[5].xyz_, const[3].xyz_; 16: MUL temp[5].xyz, temp[5].xyz_, const[7].xxx_; 17: MUL temp[6].xyz, temp[0].xyz_, const[4].xyz_; 18: MUL temp[6].xyz, temp[5].xyz_, temp[6].xyz_; 19: DP3 temp[3].x, input[1].xyz_, temp[4].xyz_; 20: ADD temp[3].x, temp[3].x___, temp[3].x___; 21: MAD temp[7].xyz, temp[4].xyz_, temp[3].xxx_, -input[1].xyz_; 22: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 23: TEX temp[9].xyz, input[2].xy__, 2D[4]; 24: ADD temp[1].xyz, temp[9].xyz_, temp[9].xyz_; 25: MAD temp[6].xyz, temp[1].xyz_, temp[8].xyz_, temp[6].xyz_; 26: MUL temp[3].xyz, temp[6].xyz_, input[0].xyz_; 27: MOV output[0].w, temp[0].___w; 28: DP3 temp[1].xyz, input[1].xyz_, temp[4].xyz_; 29: ADD temp[1].xyz, const[6].zzz_, -temp[1].xyz_; 30: MUL temp[1].xyz, temp[1].xyz_, temp[1].xyz_; 31: MUL temp[1].xyz, temp[1].xyz_, temp[1].xyz_; 32: MUL temp[1].xyz, temp[1].xyz_, const[5].xyz_; 33: MUL temp[10].xyz, temp[1].xyz_, temp[5].xyz_; 34: MAD temp[10].xyz, temp[1].xyz_, const[6].www_, temp[10].xyz_; 35: TEX temp[11].xyz, input[2].xy__, 2D[5]; 36: MUL_SAT temp[5].x, temp[5].x___, const[7].z___; 37: MAD temp[1].xyz, temp[11].xyz_, -temp[5].xxx_, temp[11].xyz_; 38: MAX temp[1].xyz, temp[1].xyz_, const[6].yyy_; 39: ADD temp[10].xyz, temp[1].xyz_, temp[10].xyz_; 40: ADD output[0].xyz, temp[3].xyz_, temp[10].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: ADD temp[1].w, temp[0].___w, -const[6].___x; 2: KIL temp[1].wwww; 3: TEX temp[2].yw, input[2].xy__, 2D[1]; 4: MOV temp[2].x, temp[2].w___; 5: MAD temp[2].xy, temp[2].xy__, const[7].xx__, none.-1-1__; 6: MOV temp[2].z, none.__0_; 7: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 8: ADD temp[3].x, none.1___, -temp[3].x___; 9: RSQ temp[3].x, |temp[3].x___|; 10: RCP temp[2].z, temp[3].x___; 11: DP3 temp[4].x, input[3].xyz_, temp[2].xyz_; 12: DP3 temp[4].y, input[4].xyz_, temp[2].xyz_; 13: DP3 temp[4].z, input[5].xyz_, temp[2].xyz_; 14: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 15: MUL temp[5].xyz, temp[5].xyz_, const[3].xyz_; 16: MUL temp[5].xyz, temp[5].xyz_, const[7].xxx_; 17: MUL temp[6].xyz, temp[0].xyz_, const[4].xyz_; 18: MUL temp[6].xyz, temp[5].xyz_, temp[6].xyz_; 19: DP3 temp[3].x, input[1].xyz_, temp[4].xyz_; 20: ADD temp[3].x, temp[3].x___, temp[3].x___; 21: MAD temp[7].xyz, temp[4].xyz_, temp[3].xxx_, -input[1].xyz_; 22: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 23: TEX temp[9].xyz, input[2].xy__, 2D[4]; 24: ADD temp[1].xyz, temp[9].xyz_, temp[9].xyz_; 25: MAD temp[6].xyz, temp[1].xyz_, temp[8].xyz_, temp[6].xyz_; 26: MUL temp[3].xyz, temp[6].xyz_, input[0].xyz_; 27: MOV output[0].w, temp[0].___w; 28: DP3 temp[1].xyz, input[1].xyz_, temp[4].xyz_; 29: ADD temp[1].xyz, none.111_, -temp[1].xyz_; 30: MUL temp[1].xyz, temp[1].xyz_, temp[1].xyz_; 31: MUL temp[1].xyz, temp[1].xyz_, temp[1].xyz_; 32: MUL temp[1].xyz, temp[1].xyz_, const[5].xyz_; 33: MUL temp[10].xyz, temp[1].xyz_, temp[5].xyz_; 34: MAD temp[10].xyz, temp[1].xyz_, const[6].www_, temp[10].xyz_; 35: TEX temp[11].xyz, input[2].xy__, 2D[5]; 36: MUL_SAT temp[5].x, temp[5].x___, const[7].z___; 37: MAD temp[1].xyz, temp[11].xyz_, -temp[5].xxx_, temp[11].xyz_; 38: MAX temp[1].xyz, temp[1].xyz_, none.000_; 39: ADD temp[10].xyz, temp[1].xyz_, temp[10].xyz_; 40: ADD output[0].xyz, temp[3].xyz_, temp[10].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: ADD temp[1].w, temp[0].___w, -const[6].___x; 2: MOV temp[12], temp[1].wwww; 3: KIL temp[12]; 4: TEX temp[2].yw, input[2].xy__, 2D[1]; 5: MOV temp[2].x, temp[2].w___; 6: MAD temp[2].xy, temp[2].xy__, const[7].xx__, none.-1-1__; 7: MOV temp[2].z, none.__0_; 8: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 9: ADD temp[3].x, none.1___, -temp[3].x___; 10: RSQ temp[3].x, |temp[3].x___|; 11: RCP temp[2].z, temp[3].x___; 12: DP3 temp[4].x, input[3].xyz_, temp[2].xyz_; 13: DP3 temp[4].y, input[4].xyz_, temp[2].xyz_; 14: DP3 temp[4].z, input[5].xyz_, temp[2].xyz_; 15: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 16: MUL temp[5].xyz, temp[5].xyz_, const[3].xyz_; 17: MUL temp[5].xyz, temp[5].xyz_, const[7].xxx_; 18: MUL temp[6].xyz, temp[0].xyz_, const[4].xyz_; 19: MUL temp[6].xyz, temp[5].xyz_, temp[6].xyz_; 20: DP3 temp[3].x, input[1].xyz_, temp[4].xyz_; 21: ADD temp[3].x, temp[3].x___, temp[3].x___; 22: MAD temp[7].xyz, temp[4].xyz_, temp[3].xxx_, -input[1].xyz_; 23: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 24: TEX temp[9].xyz, input[2].xy__, 2D[4]; 25: ADD temp[1].xyz, temp[9].xyz_, temp[9].xyz_; 26: MAD temp[6].xyz, temp[1].xyz_, temp[8].xyz_, temp[6].xyz_; 27: MUL temp[3].xyz, temp[6].xyz_, input[0].xyz_; 28: MOV output[0].w, temp[0].___w; 29: DP3 temp[1].xyz, input[1].xyz_, temp[4].xyz_; 30: ADD temp[1].xyz, none.111_, -temp[1].xyz_; 31: MUL temp[1].xyz, temp[1].xyz_, temp[1].xyz_; 32: MUL temp[1].xyz, temp[1].xyz_, temp[1].xyz_; 33: MUL temp[1].xyz, temp[1].xyz_, const[5].xyz_; 34: MUL temp[10].xyz, temp[1].xyz_, temp[5].xyz_; 35: MAD temp[10].xyz, temp[1].xyz_, const[6].www_, temp[10].xyz_; 36: TEX temp[11].xyz, input[2].xy__, 2D[5]; 37: MUL_SAT temp[5].x, temp[5].x___, const[7].z___; 38: MAD temp[1].xyz, temp[11].xyz_, -temp[5].xxx_, temp[11].xyz_; 39: MAX temp[1].xyz, temp[1].xyz_, none.000_; 40: ADD temp[10].xyz, temp[1].xyz_, temp[10].xyz_; 41: ADD output[0].xyz, temp[3].xyz_, temp[10].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: src0.xyz = const[6], src0.w = temp[0] MAD temp[1].w, src0.w, src0.1, -src0.x 2: src0.w = temp[1] MAD temp[12].xyz, src0.www, src0.111, src0.000 MAD temp[12].w, src0.w, src0.1, src0.0 3: KIL temp[12]; 4: TEX temp[2].yw, input[2].xy__, 2D[1]; 5: src0.w = temp[2] MAD temp[2].x, src0.w__, src0.111, src0.000 6: src0.xyz = temp[2], src1.xyz = const[7] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 7: MAD temp[2].z, src0.__0, src0.111, src0.000 8: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 9: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 10: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 11: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 12: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[4].x, src0.xyz, src1.xyz 13: src0.xyz = input[4], src1.xyz = temp[2] DP3 temp[4].y, src0.xyz, src1.xyz 14: src0.xyz = input[5], src1.xyz = temp[2] DP3 temp[4].z, src0.xyz, src1.xyz 15: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 16: src0.xyz = temp[5], src1.xyz = const[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 17: src0.xyz = temp[5], src1.xyz = const[7] MAD temp[5].xyz, src0.xyz, src1.xxx, src0.000 18: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 19: src0.xyz = temp[5], src1.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 20: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[3].x, src0.xyz, src1.xyz 21: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.x__ 22: src0.xyz = temp[4], src1.xyz = temp[3], src2.xyz = input[1] MAD temp[7].xyz, src0.xyz, src1.xxx, -src2.xyz 23: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 24: TEX temp[9].xyz, input[2].xy__, 2D[4]; 25: src0.xyz = temp[9] MAD temp[1].xyz, src0.xyz, src0.111, src0.xyz 26: src0.xyz = temp[1], src1.xyz = temp[8], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 27: src0.xyz = temp[6], src1.xyz = input[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 28: src0.w = temp[0] MAD color[0].w, src0.w, src0.1, src0.0 29: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[1].xyz, src0.xyz, src1.xyz 30: src0.xyz = temp[1] MAD temp[1].xyz, src0.111, src0.111, -src0.xyz 31: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 32: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 33: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 34: src0.xyz = temp[1], src1.xyz = temp[5] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 35: src0.xyz = temp[1], src0.w = const[6], src1.xyz = temp[10] MAD temp[10].xyz, src0.xyz, src0.www, src1.xyz 36: TEX temp[11].xyz, input[2].xy__, 2D[5]; 37: src0.xyz = temp[5], src1.xyz = const[7] MAD_SAT temp[5].x, src0.x__, src1.z__, src0.000 38: src0.xyz = temp[11], src1.xyz = temp[5] MAD temp[1].xyz, src0.xyz, -src1.xxx, src0.xyz 39: src0.xyz = temp[1] MAX temp[1].xyz, src0.xyz, src0.000 40: src0.xyz = temp[1], src1.xyz = temp[10] MAD temp[10].xyz, src0.xyz, src0.111, src1.xyz 41: src0.xyz = temp[3], src1.xyz = temp[10] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[11].xyz, input[2].xy__, 2D[5]; 2: TEX temp[9].xyz, input[2].xy__, 2D[4]; 3: TEX temp[2].yw, input[2].xy__, 2D[1]; 4: TEX temp[0], input[2].xy__, 2D[0]; 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[4], src2.xyz = const[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src0.1, -src2.x 6: src0.w = temp[1] MAD temp[12].xyz, src0.www, src0.111, src0.000 MAD temp[12].w, src0.w, src0.1, src0.0 7: src0.w = temp[2], src1.w = temp[0] MAD temp[2].x, src0.w__, src0.111, src0.000 MAD color[0].w, src1.w, src0.1, src0.0 8: src0.xyz = temp[2], src1.xyz = const[7] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 9: src0.xyz = temp[9] MAD temp[1].xyz, src0.xyz, src0.111, src0.xyz 10: MAD temp[2].z, src0.__0, src0.111, src0.000 11: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 12: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 13: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 14: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 15: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[4].x, src0.xyz, src1.xyz 16: src0.xyz = input[4], src1.xyz = temp[2] DP3 temp[4].y, src0.xyz, src1.xyz 17: src0.xyz = input[5], src1.xyz = temp[2] DP3 temp[4].z, src0.xyz, src1.xyz 18: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[3].x, src0.xyz, src1.xyz 19: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.x__ 20: src0.xyz = temp[4], src1.xyz = temp[3], src2.xyz = input[1] MAD temp[7].xyz, src0.xyz, src1.xxx, -src2.xyz 21: BEGIN_TEX; 22: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 23: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 24: KIL temp[12]; 25: src0.xyz = temp[5], src1.xyz = const[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[5], src1.xyz = const[7] MAD temp[5].xyz, src0.xyz, src1.xxx, src0.000 27: src0.xyz = temp[5], src1.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[1], src1.xyz = temp[8], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 29: src0.xyz = temp[6], src1.xyz = input[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[1].xyz, src0.xyz, src1.xyz 31: src0.xyz = temp[1] MAD temp[1].xyz, src0.111, src0.111, -src0.xyz 32: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 33: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 34: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 35: src0.xyz = temp[1], src1.xyz = temp[5] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 36: src0.xyz = temp[1], src0.w = const[6], src1.xyz = temp[10] MAD temp[10].xyz, src0.xyz, src0.www, src1.xyz 37: src0.xyz = temp[5], src1.xyz = const[7] MAD_SAT temp[5].x, src0.x__, src1.z__, src0.000 38: src0.xyz = temp[11], src1.xyz = temp[5] MAD temp[1].xyz, src0.xyz, -src1.xxx, src0.xyz 39: src0.xyz = temp[1] MAX temp[1].xyz, src0.xyz, src0.000 40: src0.xyz = temp[1], src1.xyz = temp[10] MAD temp[10].xyz, src0.xyz, src0.111, src1.xyz 41: src0.xyz = temp[3], src1.xyz = temp[10] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[10].xyz, temp[2].xy__, 2D[5]; 2: TEX temp[9].xyz, temp[2].xy__, 2D[4]; 3: TEX temp[7].yw, temp[2].xy__, 2D[1]; 4: TEX temp[2], temp[2].xy__, 2D[0]; 5: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[4], src2.xyz = const[6] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[6].w, src0.w, src0.1, -src2.x 6: src0.w = temp[6] MAD temp[11].xyz, src0.www, src0.111, src0.000 MAD temp[11].w, src0.w, src0.1, src0.0 7: src0.w = temp[7], src1.w = temp[2] MAD temp[7].x, src0.w__, src0.111, src0.000 MAD color[0].w, src1.w, src0.1, src0.0 8: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xy, src0.xy_, src1.xx_, -src0.11_ 9: src0.xyz = temp[9] MAD temp[6].xyz, src0.xyz, src0.111, src0.xyz 10: MAD temp[7].z, src0.__0, src0.111, src0.000 11: src0.xyz = temp[7] DP3 temp[2].x, src0.xyz, src0.xyz 12: src0.xyz = temp[2] MAD temp[2].x, src0.1__, src0.111, -src0.x__ 13: src0.xyz = temp[2] REPL_ALPHA temp[2].x RSQ, |src0.x| 14: src0.xyz = temp[2] REPL_ALPHA temp[7].z RCP, src0.x 15: src0.xyz = temp[3], src1.xyz = temp[7] DP3 temp[3].x, src0.xyz, src1.xyz 16: src0.xyz = temp[4], src1.xyz = temp[7] DP3 temp[3].y, src0.xyz, src1.xyz 17: src0.xyz = temp[5], src1.xyz = temp[7] DP3 temp[3].z, src0.xyz, src1.xyz 18: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2] MAD temp[2].x, src0.x__, src0.111, src0.x__ 20: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[4].xyz, src0.xyz, src1.xxx, -src2.xyz 21: BEGIN_TEX; 22: TEX temp[5].xyz, temp[4].xyz_, CUBE[3]; 23: TEX temp[4].xyz, temp[3].xyz_, CUBE[2]; 24: KIL temp[11]; 25: src0.xyz = temp[4], src1.xyz = const[3] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = temp[4], src1.xyz = const[7] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 27: src0.xyz = temp[4], src1.xyz = temp[8] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[6], src1.xyz = temp[5], src2.xyz = temp[8] MAD temp[8].xyz, src0.xyz, src1.xyz, src2.xyz 29: src0.xyz = temp[8], src1.xyz = temp[0] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[6].xyz, src0.xyz, src1.xyz 31: src0.xyz = temp[6] MAD temp[6].xyz, src0.111, src0.111, -src0.xyz 32: src0.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src0.xyz, src0.000 33: src0.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src0.xyz, src0.000 34: src0.xyz = temp[6], src1.xyz = const[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 35: src0.xyz = temp[6], src1.xyz = temp[4] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 36: src0.xyz = temp[6], src0.w = const[6], src1.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.www, src1.xyz 37: src0.xyz = temp[4], src1.xyz = const[7] MAD_SAT temp[4].x, src0.x__, src1.z__, src0.000 38: src0.xyz = temp[10], src1.xyz = temp[4] MAD temp[6].xyz, src0.xyz, -src1.xxx, src0.xyz 39: src0.xyz = temp[6] MAX temp[6].xyz, src0.xyz, src0.000 40: src0.xyz = temp[6], src1.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz 41: src0.xyz = temp[2], src1.xyz = temp[0] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz pc=6************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 15, tex_end: 3 (code_addr: 004603c0) TEX: TEX t10, t2, texture[5] (0000aa82) TEX t9, t2, texture[4] (0000a242) TEX t7, t2, texture[1] (000089c2) TEX t2, t2, texture[0] (00008082) 0: xyz: t2 c4 c6 -> t8.xyz (03a26902) w: t2 t0 t0 -> t6.w (00980002) xyz: t2.xyz c4.xyz 0.0 op: 00050200 w: t2.w 1.0 -c6.x op: 00098889 1: xyz: t0 t0 t0 -> t11.xyz (03ac0000) w: t6 t0 t0 -> t11.w (00ac0006) xyz: t6.www 1.0 0.0 op: 00050a8c w: t6.w 1.0 0.0 op: 00040889 2: xyz: t0 t0 t0 -> t7.x (009c0000) w: t7 t2 t0 -> o0.w (01000087) xyz: t7.www 1.0 0.0 op: 00050a8c w: t2.w 1.0 0.0 op: 0004088a 3: xyz: t7 c7 t0 -> t7.xy (019c09c7) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c7.xxx -1.0 op: 000d4280 w: t7.x t7.x t7.x op: 00000000 4: xyz: t9 t0 t0 -> t6.xyz (03980009) w: t0 t0 t0 -> (00000000) xyz: t9.xyz 1.0 t9.xyz op: 00000a80 w: t9.x t9.x t9.x op: 00000000 5: xyz: t0 t0 t0 -> t7.z (021c0000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 6: xyz: t7 t0 t0 -> t2.x (00880007) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t7.xyz t7.xxx op: 00804000 w: t7.x t7.x t7.x op: 00000000 7: xyz: t2 t0 t0 -> t2.x (00880002) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t2.xyz op: 00080a95 w: t2.x t2.x t2.x op: 00000000 8: xyz: t2 t0 t0 -> t2.x (00880002) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t2.xxx t2.xxx op: 05004081 w: |t2.x| t2.x t2.x op: 05800040 9: xyz: t2 t0 t0 -> t7.z (021c0002) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t2.xxx t2.xxx op: 05004081 w: t2.x t2.x t2.x op: 05000000 10: xyz: t3 t7 t0 -> t3.x (008c01c3) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t7.xyz t3.xxx op: 00804200 w: t3.x t3.x t3.x op: 00000000 11: xyz: t4 t7 t0 -> t3.y (010c01c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz t7.xyz t4.xxx op: 00804200 w: t4.x t4.x t4.x op: 00000000 12: xyz: t5 t7 t0 -> t3.z (020c01c5) w: t0 t0 t0 -> (00000000) xyz: t5.xyz t7.xyz t5.xxx op: 00804200 w: t5.x t5.x t5.x op: 00000000 13: xyz: t1 t3 t0 -> t2.x (008800c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 14: xyz: t2 t0 t0 -> t2.x (00880002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz 1.0 t2.xyz op: 00000a80 w: t2.x t2.x t2.x op: 00000000 15: xyz: t3 t2 t1 -> t4.xyz (03901083) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t2.xxx -t1.xyz op: 000a0280 w: t3.x t3.x t3.x op: 00000000 NODE 1: alu_offset: 16, tex_offset: 4, alu_end: 16, tex_end: 2 (code_addr: 00444410) TEX: TEX t5, t4, texture[3] (00009944) TEX t4, t3, texture[2] (00009103) KIL t0, t11, texture[0] (0001000b) 16: xyz: t4 c3 t0 -> t4.xyz (039008c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c3.xyz 0.0 op: 00050200 w: t4.x t4.x t4.x op: 00000000 17: xyz: t4 c7 t0 -> t4.xyz (039009c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c7.xxx 0.0 op: 00050280 w: t4.x t4.x t4.x op: 00000000 18: xyz: t4 t8 t0 -> t8.xyz (03a00204) w: t0 t0 t0 -> (00000000) xyz: t4.xyz t8.xyz 0.0 op: 00050200 w: t4.x t4.x t4.x op: 00000000 19: xyz: t6 t5 t8 -> t8.xyz (03a08146) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t5.xyz t8.xyz op: 00020200 w: t6.x t6.x t6.x op: 00000000 20: xyz: t8 t0 t0 -> t2.xyz (03880008) w: t0 t0 t0 -> (00000000) xyz: t8.xyz t0.xyz 0.0 op: 00050200 w: t8.x t8.x t8.x op: 00000000 21: xyz: t1 t3 t0 -> t6.xyz (039800c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 22: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t6.xyz op: 00080a95 w: t6.x t6.x t6.x op: 00000000 23: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t6.xyz 0.0 op: 00050000 w: t6.x t6.x t6.x op: 00000000 24: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t6.xyz 0.0 op: 00050000 w: t6.x t6.x t6.x op: 00000000 25: xyz: t6 c5 t0 -> t6.xyz (03980946) w: t0 t0 t0 -> (00000000) xyz: t6.xyz c5.xyz 0.0 op: 00050200 w: t6.x t6.x t6.x op: 00000000 26: xyz: t6 t4 t0 -> t0.xyz (03800106) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t4.xyz 0.0 op: 00050200 w: t6.x t6.x t6.x op: 00000000 27: xyz: t6 t0 t0 -> t0.xyz (03800006) w: c6 t0 t0 -> (00000026) xyz: t6.xyz c6.www t0.xyz op: 00010600 w: t6.x t6.x t6.x op: 00000000 28: xyz: t4 c7 t0 -> t4.x (009009c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c7.zzz 0.0 op: 40050380 w: t4.x t4.x t4.x op: 00000000 29: xyz: t10 t4 t0 -> t6.xyz (0398010a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz -t4.xxx t10.xyz op: 00001280 w: t10.x t10.x t10.x op: 00000000 30: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz 0.0 t6.xxx op: 02804a00 w: t6.x t6.x t6.x op: 00000000 31: xyz: t6 t0 t0 -> t0.xyz (03800006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz 1.0 t0.xyz op: 00010a80 w: t6.x t6.x t6.x op: 00000000 32: xyz: t2 t0 t0 -> o0.xyz (1c000002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz 1.0 t0.xyz op: 00010a80 w: t2.x t2.x t2.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[2], PERSPECTIVE DCL IN[2], GENERIC[4], PERSPECTIVE DCL IN[3], GENERIC[5], PERSPECTIVE DCL IN[4], GENERIC[6], PERSPECTIVE DCL IN[5], GENERIC[7], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL SAMP[5] DCL CONST[3..5] DCL TEMP[0..12] IMM FLT32 { 0.0010, 0.0000, 1.0000, 0.1000} IMM FLT32 { 2.0000, -1.0000, 8.0000, 0.0000} 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: SUB TEMP[1].w, TEMP[0].wwww, IMM[0].xxxx 2: TEX TEMP[2], IN[2], SAMP[1], 2D 3: MOV TEMP[2].x, TEMP[2].wwww 4: MAD TEMP[2].xy, TEMP[2], IMM[1].xxxx, IMM[1].yyyy 5: MOV TEMP[2].z, IMM[0].yyyy 6: DP3 TEMP[3].x, TEMP[2], TEMP[2] 7: ADD TEMP[3].x, IMM[0].zzzz, -TEMP[3].xxxx 8: RSQ TEMP[3].x, TEMP[3].xxxx 9: RCP TEMP[2].z, TEMP[3].xxxx 10: DP3 TEMP[4].x, IN[3], TEMP[2] 11: DP3 TEMP[4].y, IN[4], TEMP[2] 12: DP3 TEMP[4].z, IN[5], TEMP[2] 13: TEX TEMP[5], TEMP[4], SAMP[2], CUBE 14: MUL TEMP[5], TEMP[5], CONST[3] 15: MUL TEMP[5], TEMP[5], IMM[1].xxxx 16: MUL TEMP[6], TEMP[0], CONST[4] 17: MUL TEMP[6], TEMP[5], TEMP[6] 18: DP3 TEMP[3], IN[1], TEMP[4] 19: ADD TEMP[3], TEMP[3], TEMP[3] 20: MAD TEMP[7], TEMP[4], TEMP[3].xxxx, -IN[1] 21: TEX TEMP[8], TEMP[7], SAMP[3], CUBE 22: TEX TEMP[9], IN[2], SAMP[4], 2D 23: ADD TEMP[1], TEMP[9], TEMP[9] 24: MAD TEMP[6], TEMP[1], TEMP[8], TEMP[6] 25: MUL TEMP[3], TEMP[6], IN[0] 26: DP3 TEMP[1], IN[1], TEMP[4] 27: ADD TEMP[1], IMM[0].zzzz, -TEMP[1] 28: MUL TEMP[1], TEMP[1], TEMP[1] 29: MUL TEMP[1], TEMP[1], TEMP[1] 30: MUL TEMP[10], TEMP[1], CONST[5] 31: MUL TEMP[11], TEMP[10], TEMP[5] 32: MAD TEMP[11], TEMP[10], IMM[0].wwww, TEMP[11] 33: TEX TEMP[12], IN[2], SAMP[5], 2D 34: MUL_SAT TEMP[5], TEMP[5], IMM[1].zzzz 35: MAD TEMP[1], TEMP[12], -TEMP[5].xxxx, TEMP[12] 36: ADD OUT[0].xyz, TEMP[3], TEMP[11] 37: SUB TEMP[1], IMM[0].zzzz, TEMP[10] 38: MUL OUT[0].w, TEMP[0].wwww, TEMP[1] 39: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: SUB temp[1].w, temp[0].wwww, const[6].xxxx; 2: TEX temp[2], input[2], 2D[1]; 3: MOV temp[2].x, temp[2].wwww; 4: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 5: MOV temp[2].z, const[6].yyyy; 6: DP3 temp[3].x, temp[2], temp[2]; 7: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 8: RSQ temp[3].x, temp[3].xxxx; 9: RCP temp[2].z, temp[3].xxxx; 10: DP3 temp[4].x, input[3], temp[2]; 11: DP3 temp[4].y, input[4], temp[2]; 12: DP3 temp[4].z, input[5], temp[2]; 13: TEX temp[5], temp[4], CUBE[2]; 14: MUL temp[5], temp[5], const[3]; 15: MUL temp[5], temp[5], const[7].xxxx; 16: MUL temp[6], temp[0], const[4]; 17: MUL temp[6], temp[5], temp[6]; 18: DP3 temp[3], input[1], temp[4]; 19: ADD temp[3], temp[3], temp[3]; 20: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 21: TEX temp[8], temp[7], CUBE[3]; 22: TEX temp[9], input[2], 2D[4]; 23: ADD temp[1], temp[9], temp[9]; 24: MAD temp[6], temp[1], temp[8], temp[6]; 25: MUL temp[3], temp[6], input[0]; 26: DP3 temp[1], input[1], temp[4]; 27: ADD temp[1], const[6].zzzz, -temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[1], temp[1], temp[1]; 30: MUL temp[10], temp[1], const[5]; 31: MUL temp[11], temp[10], temp[5]; 32: MAD temp[11], temp[10], const[6].wwww, temp[11]; 33: TEX temp[12], input[2], 2D[5]; 34: MUL_SAT temp[5], temp[5], const[7].zzzz; 35: MAD temp[1], temp[12], -temp[5].xxxx, temp[12]; 36: ADD output[0].xyz, temp[3], temp[11]; 37: SUB temp[1], const[6].zzzz, temp[10]; 38: MUL output[0].w, temp[0].wwww, temp[1]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: SUB temp[1].w, temp[0].wwww, const[6].xxxx; 2: TEX temp[2], input[2], 2D[1]; 3: MOV temp[2].x, temp[2].wwww; 4: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 5: MOV temp[2].z, const[6].yyyy; 6: DP3 temp[3].x, temp[2], temp[2]; 7: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 8: RSQ temp[3].x, temp[3].xxxx; 9: RCP temp[2].z, temp[3].xxxx; 10: DP3 temp[4].x, input[3], temp[2]; 11: DP3 temp[4].y, input[4], temp[2]; 12: DP3 temp[4].z, input[5], temp[2]; 13: TEX temp[5], temp[4], CUBE[2]; 14: MUL temp[5], temp[5], const[3]; 15: MUL temp[5], temp[5], const[7].xxxx; 16: MUL temp[6], temp[0], const[4]; 17: MUL temp[6], temp[5], temp[6]; 18: DP3 temp[3], input[1], temp[4]; 19: ADD temp[3], temp[3], temp[3]; 20: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 21: TEX temp[8], temp[7], CUBE[3]; 22: TEX temp[9], input[2], 2D[4]; 23: ADD temp[1], temp[9], temp[9]; 24: MAD temp[6], temp[1], temp[8], temp[6]; 25: MUL temp[3], temp[6], input[0]; 26: DP3 temp[1], input[1], temp[4]; 27: ADD temp[1], const[6].zzzz, -temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[1], temp[1], temp[1]; 30: MUL temp[10], temp[1], const[5]; 31: MUL temp[11], temp[10], temp[5]; 32: MAD temp[11], temp[10], const[6].wwww, temp[11]; 33: TEX temp[12], input[2], 2D[5]; 34: MUL_SAT temp[5], temp[5], const[7].zzzz; 35: MAD temp[1], temp[12], -temp[5].xxxx, temp[12]; 36: ADD output[0].xyz, temp[3], temp[11]; 37: SUB temp[1], const[6].zzzz, temp[10]; 38: MUL output[0].w, temp[0].wwww, temp[1]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: SUB temp[1].w, temp[0].wwww, const[6].xxxx; 2: TEX temp[2], input[2], 2D[1]; 3: MOV temp[2].x, temp[2].wwww; 4: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 5: MOV temp[2].z, const[6].yyyy; 6: DP3 temp[3].x, temp[2], temp[2]; 7: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 8: RSQ temp[3].x, temp[3].xxxx; 9: RCP temp[2].z, temp[3].xxxx; 10: DP3 temp[4].x, input[3], temp[2]; 11: DP3 temp[4].y, input[4], temp[2]; 12: DP3 temp[4].z, input[5], temp[2]; 13: TEX temp[5], temp[4], CUBE[2]; 14: MUL temp[5], temp[5], const[3]; 15: MUL temp[5], temp[5], const[7].xxxx; 16: MUL temp[6], temp[0], const[4]; 17: MUL temp[6], temp[5], temp[6]; 18: DP3 temp[3], input[1], temp[4]; 19: ADD temp[3], temp[3], temp[3]; 20: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 21: TEX temp[8], temp[7], CUBE[3]; 22: TEX temp[9], input[2], 2D[4]; 23: ADD temp[1], temp[9], temp[9]; 24: MAD temp[6], temp[1], temp[8], temp[6]; 25: MUL temp[3], temp[6], input[0]; 26: DP3 temp[1], input[1], temp[4]; 27: ADD temp[1], const[6].zzzz, -temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[1], temp[1], temp[1]; 30: MUL temp[10], temp[1], const[5]; 31: MUL temp[11], temp[10], temp[5]; 32: MAD temp[11], temp[10], const[6].wwww, temp[11]; 33: TEX temp[12], input[2], 2D[5]; 34: MUL_SAT temp[5], temp[5], const[7].zzzz; 35: MAD temp[1], temp[12], -temp[5].xxxx, temp[12]; 36: ADD output[0].xyz, temp[3], temp[11]; 37: SUB temp[1], const[6].zzzz, temp[10]; 38: MUL output[0].w, temp[0].wwww, temp[1]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[1].w, temp[0].wwww, -const[6].xxxx; 2: TEX temp[2], input[2], 2D[1]; 3: MOV temp[2].x, temp[2].wwww; 4: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 5: MOV temp[2].z, const[6].yyyy; 6: DP3 temp[3].x, temp[2], temp[2]; 7: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 8: RSQ temp[3].x, |temp[3].xxxx|; 9: RCP temp[2].z, temp[3].xxxx; 10: DP3 temp[4].x, input[3], temp[2]; 11: DP3 temp[4].y, input[4], temp[2]; 12: DP3 temp[4].z, input[5], temp[2]; 13: TEX temp[5], temp[4], CUBE[2]; 14: MUL temp[5], temp[5], const[3]; 15: MUL temp[5], temp[5], const[7].xxxx; 16: MUL temp[6], temp[0], const[4]; 17: MUL temp[6], temp[5], temp[6]; 18: DP3 temp[3], input[1], temp[4]; 19: ADD temp[3], temp[3], temp[3]; 20: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 21: TEX temp[8], temp[7], CUBE[3]; 22: TEX temp[9], input[2], 2D[4]; 23: ADD temp[1], temp[9], temp[9]; 24: MAD temp[6], temp[1], temp[8], temp[6]; 25: MUL temp[3], temp[6], input[0]; 26: DP3 temp[1], input[1], temp[4]; 27: ADD temp[1], const[6].zzzz, -temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[1], temp[1], temp[1]; 30: MUL temp[10], temp[1], const[5]; 31: MUL temp[11], temp[10], temp[5]; 32: MAD temp[11], temp[10], const[6].wwww, temp[11]; 33: TEX temp[12], input[2], 2D[5]; 34: MUL_SAT temp[5], temp[5], const[7].zzzz; 35: MAD temp[1], temp[12], -temp[5].xxxx, temp[12]; 36: ADD output[0].xyz, temp[3], temp[11]; 37: ADD temp[1], const[6].zzzz, -temp[10]; 38: MUL output[0].w, temp[0].wwww, temp[1]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: ADD temp[1].w, temp[0].wwww, -const[6].xxxx; 2: TEX temp[2], input[2], 2D[1]; 3: MOV temp[2].x, temp[2].wwww; 4: MAD temp[2].xy, temp[2], const[7].xxxx, const[7].yyyy; 5: MOV temp[2].z, const[6].yyyy; 6: DP3 temp[3].x, temp[2], temp[2]; 7: ADD temp[3].x, const[6].zzzz, -temp[3].xxxx; 8: RSQ temp[3].x, |temp[3].xxxx|; 9: RCP temp[2].z, temp[3].xxxx; 10: DP3 temp[4].x, input[3], temp[2]; 11: DP3 temp[4].y, input[4], temp[2]; 12: DP3 temp[4].z, input[5], temp[2]; 13: TEX temp[5], temp[4], CUBE[2]; 14: MUL temp[5], temp[5], const[3]; 15: MUL temp[5], temp[5], const[7].xxxx; 16: MUL temp[6], temp[0], const[4]; 17: MUL temp[6], temp[5], temp[6]; 18: DP3 temp[3], input[1], temp[4]; 19: ADD temp[3], temp[3], temp[3]; 20: MAD temp[7], temp[4], temp[3].xxxx, -input[1]; 21: TEX temp[8], temp[7], CUBE[3]; 22: TEX temp[9], input[2], 2D[4]; 23: ADD temp[1], temp[9], temp[9]; 24: MAD temp[6], temp[1], temp[8], temp[6]; 25: MUL temp[3], temp[6], input[0]; 26: DP3 temp[1], input[1], temp[4]; 27: ADD temp[1], const[6].zzzz, -temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[1], temp[1], temp[1]; 30: MUL temp[10], temp[1], const[5]; 31: MUL temp[11], temp[10], temp[5]; 32: MAD temp[11], temp[10], const[6].wwww, temp[11]; 33: TEX temp[12], input[2], 2D[5]; 34: MUL_SAT temp[5], temp[5], const[7].zzzz; 35: MAD temp[1], temp[12], -temp[5].xxxx, temp[12]; 36: ADD output[0].xyz, temp[3], temp[11]; 37: ADD temp[1], const[6].zzzz, -temp[10]; 38: MUL output[0].w, temp[0].wwww, temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: TEX temp[2].yw, input[2].xy__, 2D[1]; 2: MOV temp[2].x, temp[2].w___; 3: MAD temp[2].xy, temp[2].xy__, const[7].xx__, const[7].yy__; 4: MOV temp[2].z, const[6].__y_; 5: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 6: ADD temp[3].x, const[6].z___, -temp[3].x___; 7: RSQ temp[3].x, |temp[3].x___|; 8: RCP temp[2].z, temp[3].x___; 9: DP3 temp[4].x, input[3].xyz_, temp[2].xyz_; 10: DP3 temp[4].y, input[4].xyz_, temp[2].xyz_; 11: DP3 temp[4].z, input[5].xyz_, temp[2].xyz_; 12: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 13: MUL temp[5].xyz, temp[5].xyz_, const[3].xyz_; 14: MUL temp[5].xyz, temp[5].xyz_, const[7].xxx_; 15: MUL temp[6].xyz, temp[0].xyz_, const[4].xyz_; 16: MUL temp[6].xyz, temp[5].xyz_, temp[6].xyz_; 17: DP3 temp[3].x, input[1].xyz_, temp[4].xyz_; 18: ADD temp[3].x, temp[3].x___, temp[3].x___; 19: MAD temp[7].xyz, temp[4].xyz_, temp[3].xxx_, -input[1].xyz_; 20: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 21: TEX temp[9].xyz, input[2].xy__, 2D[4]; 22: ADD temp[1].xyz, temp[9].xyz_, temp[9].xyz_; 23: MAD temp[6].xyz, temp[1].xyz_, temp[8].xyz_, temp[6].xyz_; 24: MUL temp[3].xyz, temp[6].xyz_, input[0].xyz_; 25: DP3 temp[1], input[1].xyz_, temp[4].xyz_; 26: ADD temp[1], const[6].zzzz, -temp[1]; 27: MUL temp[1], temp[1], temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[10], temp[1], const[5]; 30: MUL temp[11].xyz, temp[10].xyz_, temp[5].xyz_; 31: MAD temp[11].xyz, temp[10].xyz_, const[6].www_, temp[11].xyz_; 32: ADD output[0].xyz, temp[3].xyz_, temp[11].xyz_; 33: ADD temp[1].w, const[6].___z, -temp[10].___w; 34: MUL output[0].w, temp[0].___w, temp[1].___w; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: TEX temp[2].yw, input[2].xy__, 2D[1]; 2: MOV temp[2].x, temp[2].w___; 3: MAD temp[2].xy, temp[2].xy__, const[7].xx__, none.-1-1__; 4: MOV temp[2].z, none.__0_; 5: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 6: ADD temp[3].x, none.1___, -temp[3].x___; 7: RSQ temp[3].x, |temp[3].x___|; 8: RCP temp[2].z, temp[3].x___; 9: DP3 temp[4].x, input[3].xyz_, temp[2].xyz_; 10: DP3 temp[4].y, input[4].xyz_, temp[2].xyz_; 11: DP3 temp[4].z, input[5].xyz_, temp[2].xyz_; 12: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 13: MUL temp[5].xyz, temp[5].xyz_, const[3].xyz_; 14: MUL temp[5].xyz, temp[5].xyz_, const[7].xxx_; 15: MUL temp[6].xyz, temp[0].xyz_, const[4].xyz_; 16: MUL temp[6].xyz, temp[5].xyz_, temp[6].xyz_; 17: DP3 temp[3].x, input[1].xyz_, temp[4].xyz_; 18: ADD temp[3].x, temp[3].x___, temp[3].x___; 19: MAD temp[7].xyz, temp[4].xyz_, temp[3].xxx_, -input[1].xyz_; 20: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 21: TEX temp[9].xyz, input[2].xy__, 2D[4]; 22: ADD temp[1].xyz, temp[9].xyz_, temp[9].xyz_; 23: MAD temp[6].xyz, temp[1].xyz_, temp[8].xyz_, temp[6].xyz_; 24: MUL temp[3].xyz, temp[6].xyz_, input[0].xyz_; 25: DP3 temp[1], input[1].xyz_, temp[4].xyz_; 26: ADD temp[1], none.1111, -temp[1]; 27: MUL temp[1], temp[1], temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[10], temp[1], const[5]; 30: MUL temp[11].xyz, temp[10].xyz_, temp[5].xyz_; 31: MAD temp[11].xyz, temp[10].xyz_, const[6].www_, temp[11].xyz_; 32: ADD output[0].xyz, temp[3].xyz_, temp[11].xyz_; 33: ADD temp[1].w, none.___1, -temp[10].___w; 34: MUL output[0].w, temp[0].___w, temp[1].___w; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: TEX temp[2].yw, input[2].xy__, 2D[1]; 2: MOV temp[2].x, temp[2].w___; 3: MAD temp[2].xy, temp[2].xy__, const[7].xx__, none.-1-1__; 4: MOV temp[2].z, none.__0_; 5: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 6: ADD temp[3].x, none.1___, -temp[3].x___; 7: RSQ temp[3].x, |temp[3].x___|; 8: RCP temp[2].z, temp[3].x___; 9: DP3 temp[4].x, input[3].xyz_, temp[2].xyz_; 10: DP3 temp[4].y, input[4].xyz_, temp[2].xyz_; 11: DP3 temp[4].z, input[5].xyz_, temp[2].xyz_; 12: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 13: MUL temp[5].xyz, temp[5].xyz_, const[3].xyz_; 14: MUL temp[5].xyz, temp[5].xyz_, const[7].xxx_; 15: MUL temp[6].xyz, temp[0].xyz_, const[4].xyz_; 16: MUL temp[6].xyz, temp[5].xyz_, temp[6].xyz_; 17: DP3 temp[3].x, input[1].xyz_, temp[4].xyz_; 18: ADD temp[3].x, temp[3].x___, temp[3].x___; 19: MAD temp[7].xyz, temp[4].xyz_, temp[3].xxx_, -input[1].xyz_; 20: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 21: TEX temp[9].xyz, input[2].xy__, 2D[4]; 22: ADD temp[1].xyz, temp[9].xyz_, temp[9].xyz_; 23: MAD temp[6].xyz, temp[1].xyz_, temp[8].xyz_, temp[6].xyz_; 24: MUL temp[3].xyz, temp[6].xyz_, input[0].xyz_; 25: DP3 temp[1], input[1].xyz_, temp[4].xyz_; 26: ADD temp[1], none.1111, -temp[1]; 27: MUL temp[1], temp[1], temp[1]; 28: MUL temp[1], temp[1], temp[1]; 29: MUL temp[10], temp[1], const[5]; 30: MUL temp[11].xyz, temp[10].xyz_, temp[5].xyz_; 31: MAD temp[11].xyz, temp[10].xyz_, const[6].www_, temp[11].xyz_; 32: ADD output[0].xyz, temp[3].xyz_, temp[11].xyz_; 33: ADD temp[1].w, none.___1, -temp[10].___w; 34: MUL output[0].w, temp[0].___w, temp[1].___w; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[0]; 1: TEX temp[2].yw, input[2].xy__, 2D[1]; 2: src0.w = temp[2] MAD temp[2].x, src0.w__, src0.111, src0.000 3: src0.xyz = temp[2], src1.xyz = const[7] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 4: MAD temp[2].z, src0.__0, src0.111, src0.000 5: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 6: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 7: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 8: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 9: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[4].x, src0.xyz, src1.xyz 10: src0.xyz = input[4], src1.xyz = temp[2] DP3 temp[4].y, src0.xyz, src1.xyz 11: src0.xyz = input[5], src1.xyz = temp[2] DP3 temp[4].z, src0.xyz, src1.xyz 12: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 13: src0.xyz = temp[5], src1.xyz = const[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 14: src0.xyz = temp[5], src1.xyz = const[7] MAD temp[5].xyz, src0.xyz, src1.xxx, src0.000 15: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[5], src1.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 17: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[3].x, src0.xyz, src1.xyz 18: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.x__ 19: src0.xyz = temp[4], src1.xyz = temp[3], src2.xyz = input[1] MAD temp[7].xyz, src0.xyz, src1.xxx, -src2.xyz 20: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 21: TEX temp[9].xyz, input[2].xy__, 2D[4]; 22: src0.xyz = temp[9] MAD temp[1].xyz, src0.xyz, src0.111, src0.xyz 23: src0.xyz = temp[1], src1.xyz = temp[8], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 24: src0.xyz = temp[6], src1.xyz = input[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[1].xyz, src0.xyz, src1.xyz DP3 temp[1].w, src0._, src0._ 26: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.111, src0.111, -src0.xyz MAD temp[1].w, src0.1, src0.1, -src0.w 27: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 MAD temp[1].w, src0.w, src0.w, src0.0 28: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 MAD temp[1].w, src0.w, src0.w, src0.0 29: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[10].w, src0.w, src1.w, src0.0 30: src0.xyz = temp[10], src1.xyz = temp[5] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 31: src0.xyz = temp[10], src0.w = const[6], src1.xyz = temp[11] MAD temp[11].xyz, src0.xyz, src0.www, src1.xyz 32: src0.xyz = temp[3], src1.xyz = temp[11] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 33: src0.w = temp[10] MAD temp[1].w, src0.1, src0.1, -src0.w 34: src0.w = temp[0], src1.w = temp[1] MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[9].xyz, input[2].xy__, 2D[4]; 2: TEX temp[2].yw, input[2].xy__, 2D[1]; 3: TEX temp[0], input[2].xy__, 2D[0]; 4: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 5: src0.w = temp[2] MAD temp[2].x, src0.w__, src0.111, src0.000 6: src0.xyz = temp[2], src1.xyz = const[7] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 7: src0.xyz = temp[9] MAD temp[1].xyz, src0.xyz, src0.111, src0.xyz 8: MAD temp[2].z, src0.__0, src0.111, src0.000 9: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 10: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 11: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 12: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 13: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[4].x, src0.xyz, src1.xyz 14: src0.xyz = input[4], src1.xyz = temp[2] DP3 temp[4].y, src0.xyz, src1.xyz 15: src0.xyz = input[5], src1.xyz = temp[2] DP3 temp[4].z, src0.xyz, src1.xyz 16: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[3].x, src0.xyz, src1.xyz 17: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.x__ 18: src0.xyz = temp[4], src1.xyz = temp[3], src2.xyz = input[1] MAD temp[7].xyz, src0.xyz, src1.xxx, -src2.xyz 19: BEGIN_TEX; 20: TEX temp[8].xyz, temp[7].xyz_, CUBE[3]; 21: TEX temp[5].xyz, temp[4].xyz_, CUBE[2]; 22: src0.xyz = temp[5], src1.xyz = const[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 23: src0.xyz = temp[5], src1.xyz = const[7] MAD temp[5].xyz, src0.xyz, src1.xxx, src0.000 24: src0.xyz = temp[5], src1.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = temp[1], src1.xyz = temp[8], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 26: src0.xyz = input[1], src1.xyz = temp[4] DP3 temp[1].xyz, src0.xyz, src1.xyz DP3 temp[1].w, src0._, src0._ 27: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.111, src0.111, -src0.xyz MAD temp[1].w, src0.1, src0.1, -src0.w 28: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 MAD temp[1].w, src0.w, src0.w, src0.0 29: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.xyz, src0.000 MAD temp[1].w, src0.w, src0.w, src0.0 30: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[5], src1.w = const[5] MAD temp[10].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[10].w, src0.w, src1.w, src0.0 31: src0.xyz = temp[10], src0.w = temp[10], src1.xyz = temp[5] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.1, src0.1, -src0.w 32: src0.xyz = temp[10], src0.w = const[6], src1.xyz = temp[11], src1.w = temp[0], src2.w = temp[1] MAD temp[11].xyz, src0.xyz, src0.www, src1.xyz MAD color[0].w, src1.w, src2.w, src0.0 33: src0.xyz = temp[6], src1.xyz = input[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 34: src0.xyz = temp[3], src1.xyz = temp[11] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[6].xyz, temp[2].xy__, 2D[4]; 2: TEX temp[7].yw, temp[2].xy__, 2D[1]; 3: TEX temp[2], temp[2].xy__, 2D[0]; 4: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 5: src0.w = temp[7] MAD temp[7].x, src0.w__, src0.111, src0.000 6: src0.xyz = temp[7], src1.xyz = const[7] MAD temp[7].xy, src0.xy_, src1.xx_, -src0.11_ 7: src0.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src0.111, src0.xyz 8: MAD temp[7].z, src0.__0, src0.111, src0.000 9: src0.xyz = temp[7] DP3 temp[8].x, src0.xyz, src0.xyz 10: src0.xyz = temp[8] MAD temp[8].x, src0.1__, src0.111, -src0.x__ 11: src0.xyz = temp[8] REPL_ALPHA temp[8].x RSQ, |src0.x| 12: src0.xyz = temp[8] REPL_ALPHA temp[7].z RCP, src0.x 13: src0.xyz = temp[3], src1.xyz = temp[7] DP3 temp[3].x, src0.xyz, src1.xyz 14: src0.xyz = temp[4], src1.xyz = temp[7] DP3 temp[3].y, src0.xyz, src1.xyz 15: src0.xyz = temp[5], src1.xyz = temp[7] DP3 temp[3].z, src0.xyz, src1.xyz 16: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[8].x, src0.xyz, src1.xyz 17: src0.xyz = temp[8] MAD temp[8].x, src0.x__, src0.111, src0.x__ 18: src0.xyz = temp[3], src1.xyz = temp[8], src2.xyz = temp[1] MAD temp[4].xyz, src0.xyz, src1.xxx, -src2.xyz 19: BEGIN_TEX; 20: TEX temp[5].xyz, temp[4].xyz_, CUBE[3]; 21: TEX temp[4].xyz, temp[3].xyz_, CUBE[2]; 22: src0.xyz = temp[4], src1.xyz = const[3] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 23: src0.xyz = temp[4], src1.xyz = const[7] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 24: src0.xyz = temp[4], src1.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = temp[6], src1.xyz = temp[5], src2.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src2.xyz 26: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[6].xyz, src0.xyz, src1.xyz DP3 temp[6].w, src0._, src0._ 27: src0.xyz = temp[6], src0.w = temp[6] MAD temp[6].xyz, src0.111, src0.111, -src0.xyz MAD temp[6].w, src0.1, src0.1, -src0.w 28: src0.xyz = temp[6], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.xyz, src0.000 MAD temp[6].w, src0.w, src0.w, src0.0 29: src0.xyz = temp[6], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.xyz, src0.000 MAD temp[6].w, src0.w, src0.w, src0.0 30: src0.xyz = temp[6], src0.w = temp[6], src1.xyz = const[5], src1.w = const[5] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 31: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[4] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[6].w, src0.1, src0.1, -src0.w 32: src0.xyz = temp[1], src0.w = const[6], src1.xyz = temp[3], src1.w = temp[2], src2.w = temp[6] MAD temp[3].xyz, src0.xyz, src0.www, src1.xyz MAD color[0].w, src1.w, src2.w, src0.0 33: src0.xyz = temp[9], src1.xyz = temp[0] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 34: src0.xyz = temp[8], src1.xyz = temp[3] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz pc=7************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 14, tex_end: 2 (code_addr: 00040380) TEX: TEX t6, t2, texture[4] (0000a182) TEX t7, t2, texture[1] (000089c2) TEX t2, t2, texture[0] (00008082) 0: xyz: t2 c4 t0 -> t9.xyz (03a40902) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c4.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 1: xyz: t0 t0 t0 -> t7.x (009c0000) w: t7 t0 t0 -> (00000007) xyz: t7.www 1.0 0.0 op: 00050a8c w: t0.x t0.x t0.x op: 00000000 2: xyz: t7 c7 t0 -> t7.xy (019c09c7) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c7.xxx -1.0 op: 000d4280 w: t7.x t7.x t7.x op: 00000000 3: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz 1.0 t6.xyz op: 00000a80 w: t6.x t6.x t6.x op: 00000000 4: xyz: t0 t0 t0 -> t7.z (021c0000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 5: xyz: t7 t0 t0 -> t8.x (00a00007) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t7.xyz t7.xxx op: 00804000 w: t7.x t7.x t7.x op: 00000000 6: xyz: t8 t0 t0 -> t8.x (00a00008) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t8.xyz op: 00080a95 w: t8.x t8.x t8.x op: 00000000 7: xyz: t8 t0 t0 -> t8.x (00a00008) w: t0 t0 t0 -> (00000000) xyz: t8.xxx t8.xxx t8.xxx op: 05004081 w: |t8.x| t8.x t8.x op: 05800040 8: xyz: t8 t0 t0 -> t7.z (021c0008) w: t0 t0 t0 -> (00000000) xyz: t8.xxx t8.xxx t8.xxx op: 05004081 w: t8.x t8.x t8.x op: 05000000 9: xyz: t3 t7 t0 -> t3.x (008c01c3) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t7.xyz t3.xxx op: 00804200 w: t3.x t3.x t3.x op: 00000000 10: xyz: t4 t7 t0 -> t3.y (010c01c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz t7.xyz t4.xxx op: 00804200 w: t4.x t4.x t4.x op: 00000000 11: xyz: t5 t7 t0 -> t3.z (020c01c5) w: t0 t0 t0 -> (00000000) xyz: t5.xyz t7.xyz t5.xxx op: 00804200 w: t5.x t5.x t5.x op: 00000000 12: xyz: t1 t3 t0 -> t8.x (00a000c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 13: xyz: t8 t0 t0 -> t8.x (00a00008) w: t0 t0 t0 -> (00000000) xyz: t8.xyz 1.0 t8.xyz op: 00000a80 w: t8.x t8.x t8.x op: 00000000 14: xyz: t3 t8 t1 -> t4.xyz (03901203) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t8.xxx -t1.xyz op: 000a0280 w: t3.x t3.x t3.x op: 00000000 NODE 1: alu_offset: 15, tex_offset: 3, alu_end: 12, tex_end: 1 (code_addr: 0042330f) TEX: TEX t5, t4, texture[3] (00009944) TEX t4, t3, texture[2] (00009103) 15: xyz: t4 c3 t0 -> t4.xyz (039008c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c3.xyz 0.0 op: 00050200 w: t4.x t4.x t4.x op: 00000000 16: xyz: t4 c7 t0 -> t4.xyz (039009c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c7.xxx 0.0 op: 00050280 w: t4.x t4.x t4.x op: 00000000 17: xyz: t4 t9 t0 -> t9.xyz (03a40244) w: t0 t0 t0 -> (00000000) xyz: t4.xyz t9.xyz 0.0 op: 00050200 w: t4.x t4.x t4.x op: 00000000 18: xyz: t6 t5 t9 -> t9.xyz (03a49146) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t5.xyz t9.xyz op: 00020200 w: t6.x t6.x t6.x op: 00000000 19: xyz: t1 t3 t0 -> t6.xyz (039800c1) w: t0 t0 t0 -> t6.w (00980000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: 1.0 1.0 t1.x op: 00800891 20: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t6 t0 t0 -> t6.w (00980006) xyz: 1.0 1.0 -t6.xyz op: 00080a95 w: 1.0 1.0 -t6.w op: 000a4891 21: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t6 t0 t0 -> t6.w (00980006) xyz: t6.xyz t6.xyz 0.0 op: 00050000 w: t6.w t6.w 0.0 op: 00040489 22: xyz: t6 t0 t0 -> t6.xyz (03980006) w: t6 t0 t0 -> t6.w (00980006) xyz: t6.xyz t6.xyz 0.0 op: 00050000 w: t6.w t6.w 0.0 op: 00040489 23: xyz: t6 c5 t0 -> t1.xyz (03840946) w: t6 c5 t0 -> t1.w (00840946) xyz: t6.xyz c5.xyz 0.0 op: 00050200 w: t6.w c5.w 0.0 op: 00040509 24: xyz: t1 t4 t0 -> t3.xyz (038c0101) w: t1 t0 t0 -> t6.w (00980001) xyz: t1.xyz t4.xyz 0.0 op: 00050200 w: 1.0 1.0 -t1.w op: 000a4891 25: xyz: t1 t3 t0 -> t3.xyz (038c00c1) w: c6 t2 t6 -> o0.w (010060a6) xyz: t1.xyz c6.www t3.xyz op: 00010600 w: t2.w t6.w 0.0 op: 0004058a 26: xyz: t9 t0 t0 -> t8.xyz (03a00009) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t0.xyz 0.0 op: 00050200 w: t9.x t9.x t9.x op: 00000000 27: xyz: t8 t3 t0 -> o0.xyz (1c0000c8) w: t0 t0 t0 -> (00000000) xyz: t8.xyz 1.0 t3.xyz op: 00010a80 w: t8.x t8.x t8.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], GENERIC[1], PERSPECTIVE DCL IN[1], GENERIC[2], PERSPECTIVE DCL IN[2], GENERIC[5], PERSPECTIVE DCL IN[3], GENERIC[6], PERSPECTIVE DCL IN[4], GENERIC[7], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[3] DCL TEMP[0..3] IMM FLT32 { 2.0000, -1.0000, 0.0000, 1.0000} IMM FLT32 { 0.0000, 1.0000, 5.0000, 0.0000} 0: TEX TEMP[0], IN[0], SAMP[0], 2D 1: MOV TEMP[0].x, TEMP[0].wwww 2: MAD TEMP[0].xy, TEMP[0], IMM[0].xxxx, IMM[0].yyyy 3: MOV TEMP[0].z, IMM[1].xxxx 4: DP3 TEMP[1].x, TEMP[0], TEMP[0] 5: ADD TEMP[1].x, IMM[1].yyyy, -TEMP[1].xxxx 6: RSQ TEMP[1].x, TEMP[1].xxxx 7: RCP TEMP[0].z, TEMP[1].xxxx 8: DP3 TEMP[2].x, IN[2], TEMP[0] 9: DP3 TEMP[2].y, IN[3], TEMP[0] 10: DP3 TEMP[2].z, IN[4], TEMP[0] 11: DP3 TEMP[3], IN[1], TEMP[2] 12: MUL TEMP[3], TEMP[3], TEMP[3] 13: MUL_SAT TEMP[3], TEMP[3], IMM[1].zzzz 14: MUL TEMP[3], TEMP[3], CONST[3] 15: MOV OUT[0].xyz, TEMP[3] 16: MOV OUT[0].w, IMM[1].yyyy 17: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[0].xy, temp[0], const[4].xxxx, const[4].yyyy; 3: MOV temp[0].z, const[5].xxxx; 4: DP3 temp[1].x, temp[0], temp[0]; 5: ADD temp[1].x, const[5].yyyy, -temp[1].xxxx; 6: RSQ temp[1].x, temp[1].xxxx; 7: RCP temp[0].z, temp[1].xxxx; 8: DP3 temp[2].x, input[2], temp[0]; 9: DP3 temp[2].y, input[3], temp[0]; 10: DP3 temp[2].z, input[4], temp[0]; 11: DP3 temp[3], input[1], temp[2]; 12: MUL temp[3], temp[3], temp[3]; 13: MUL_SAT temp[3], temp[3], const[5].zzzz; 14: MUL temp[3], temp[3], const[3]; 15: MOV output[0].xyz, temp[3]; 16: MOV output[0].w, const[5].yyyy; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[0].xy, temp[0], const[4].xxxx, const[4].yyyy; 3: MOV temp[0].z, const[5].xxxx; 4: DP3 temp[1].x, temp[0], temp[0]; 5: ADD temp[1].x, const[5].yyyy, -temp[1].xxxx; 6: RSQ temp[1].x, temp[1].xxxx; 7: RCP temp[0].z, temp[1].xxxx; 8: DP3 temp[2].x, input[2], temp[0]; 9: DP3 temp[2].y, input[3], temp[0]; 10: DP3 temp[2].z, input[4], temp[0]; 11: DP3 temp[3], input[1], temp[2]; 12: MUL temp[3], temp[3], temp[3]; 13: MUL_SAT temp[3], temp[3], const[5].zzzz; 14: MUL temp[3], temp[3], const[3]; 15: MOV output[0].xyz, temp[3]; 16: MOV output[0].w, const[5].yyyy; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[0].xy, temp[0], const[4].xxxx, const[4].yyyy; 3: MOV temp[0].z, const[5].xxxx; 4: DP3 temp[1].x, temp[0], temp[0]; 5: ADD temp[1].x, const[5].yyyy, -temp[1].xxxx; 6: RSQ temp[1].x, temp[1].xxxx; 7: RCP temp[0].z, temp[1].xxxx; 8: DP3 temp[2].x, input[2], temp[0]; 9: DP3 temp[2].y, input[3], temp[0]; 10: DP3 temp[2].z, input[4], temp[0]; 11: DP3 temp[3], input[1], temp[2]; 12: MUL temp[3], temp[3], temp[3]; 13: MUL_SAT temp[3], temp[3], const[5].zzzz; 14: MUL temp[3], temp[3], const[3]; 15: MOV output[0].xyz, temp[3]; 16: MOV output[0].w, const[5].yyyy; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[0].xy, temp[0], const[4].xxxx, const[4].yyyy; 3: MOV temp[0].z, const[5].xxxx; 4: DP3 temp[1].x, temp[0], temp[0]; 5: ADD temp[1].x, const[5].yyyy, -temp[1].xxxx; 6: RSQ temp[1].x, |temp[1].xxxx|; 7: RCP temp[0].z, temp[1].xxxx; 8: DP3 temp[2].x, input[2], temp[0]; 9: DP3 temp[2].y, input[3], temp[0]; 10: DP3 temp[2].z, input[4], temp[0]; 11: DP3 temp[3], input[1], temp[2]; 12: MUL temp[3], temp[3], temp[3]; 13: MUL_SAT temp[3], temp[3], const[5].zzzz; 14: MUL temp[3], temp[3], const[3]; 15: MOV output[0].xyz, temp[3]; 16: MOV output[0].w, const[5].yyyy; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[0].xy, temp[0], const[4].xxxx, const[4].yyyy; 3: MOV temp[0].z, const[5].xxxx; 4: DP3 temp[1].x, temp[0], temp[0]; 5: ADD temp[1].x, const[5].yyyy, -temp[1].xxxx; 6: RSQ temp[1].x, |temp[1].xxxx|; 7: RCP temp[0].z, temp[1].xxxx; 8: DP3 temp[2].x, input[2], temp[0]; 9: DP3 temp[2].y, input[3], temp[0]; 10: DP3 temp[2].z, input[4], temp[0]; 11: DP3 temp[3], input[1], temp[2]; 12: MUL temp[3], temp[3], temp[3]; 13: MUL_SAT temp[3], temp[3], const[5].zzzz; 14: MUL temp[3], temp[3], const[3]; 15: MOV output[0].xyz, temp[3]; 16: MOV output[0].w, const[5].yyyy; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[0].xy, temp[0].xy__, const[4].xx__, const[4].yy__; 3: MOV temp[0].z, const[5].__x_; 4: DP3 temp[1].x, temp[0].xyz_, temp[0].xyz_; 5: ADD temp[1].x, const[5].y___, -temp[1].x___; 6: RSQ temp[1].x, |temp[1].x___|; 7: RCP temp[0].z, temp[1].x___; 8: DP3 temp[2].x, input[2].xyz_, temp[0].xyz_; 9: DP3 temp[2].y, input[3].xyz_, temp[0].xyz_; 10: DP3 temp[2].z, input[4].xyz_, temp[0].xyz_; 11: DP3 temp[3].xyz, input[1].xyz_, temp[2].xyz_; 12: MUL temp[3].xyz, temp[3].xyz_, temp[3].xyz_; 13: MUL_SAT temp[3].xyz, temp[3].xyz_, const[5].zzz_; 14: MUL temp[3].xyz, temp[3].xyz_, const[3].xyz_; 15: MOV output[0].xyz, temp[3].xyz_; 16: MOV output[0].w, const[5].___y; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[0].xy, temp[0].xy__, const[4].xx__, none.-1-1__; 3: MOV temp[0].z, none.__0_; 4: DP3 temp[1].x, temp[0].xyz_, temp[0].xyz_; 5: ADD temp[1].x, none.1___, -temp[1].x___; 6: RSQ temp[1].x, |temp[1].x___|; 7: RCP temp[0].z, temp[1].x___; 8: DP3 temp[2].x, input[2].xyz_, temp[0].xyz_; 9: DP3 temp[2].y, input[3].xyz_, temp[0].xyz_; 10: DP3 temp[2].z, input[4].xyz_, temp[0].xyz_; 11: DP3 temp[3].xyz, input[1].xyz_, temp[2].xyz_; 12: MUL temp[3].xyz, temp[3].xyz_, temp[3].xyz_; 13: MUL_SAT temp[3].xyz, temp[3].xyz_, const[5].zzz_; 14: MUL temp[3].xyz, temp[3].xyz_, const[3].xyz_; 15: MOV output[0].xyz, temp[3].xyz_; 16: MOV output[0].w, none.___1; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[0].xy, temp[0].xy__, const[4].xx__, none.-1-1__; 3: MOV temp[0].z, none.__0_; 4: DP3 temp[1].x, temp[0].xyz_, temp[0].xyz_; 5: ADD temp[1].x, none.1___, -temp[1].x___; 6: RSQ temp[1].x, |temp[1].x___|; 7: RCP temp[0].z, temp[1].x___; 8: DP3 temp[2].x, input[2].xyz_, temp[0].xyz_; 9: DP3 temp[2].y, input[3].xyz_, temp[0].xyz_; 10: DP3 temp[2].z, input[4].xyz_, temp[0].xyz_; 11: DP3 temp[3].xyz, input[1].xyz_, temp[2].xyz_; 12: MUL temp[3].xyz, temp[3].xyz_, temp[3].xyz_; 13: MUL_SAT temp[3].xyz, temp[3].xyz_, const[5].zzz_; 14: MUL temp[3].xyz, temp[3].xyz_, const[3].xyz_; 15: MOV output[0].xyz, temp[3].xyz_; 16: MOV output[0].w, none.___1; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: src0.w = temp[0] MAD temp[0].x, src0.w__, src0.111, src0.000 2: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[0].xy, src0.xy_, src1.xx_, -src0.11_ 3: MAD temp[0].z, src0.__0, src0.111, src0.000 4: src0.xyz = temp[0] DP3 temp[1].x, src0.xyz, src0.xyz 5: src0.xyz = temp[1] MAD temp[1].x, src0.1__, src0.111, -src0.x__ 6: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 7: src0.xyz = temp[1] REPL_ALPHA temp[0].z RCP, src0.x 8: src0.xyz = input[2], src1.xyz = temp[0] DP3 temp[2].x, src0.xyz, src1.xyz 9: src0.xyz = input[3], src1.xyz = temp[0] DP3 temp[2].y, src0.xyz, src1.xyz 10: src0.xyz = input[4], src1.xyz = temp[0] DP3 temp[2].z, src0.xyz, src1.xyz 11: src0.xyz = input[1], src1.xyz = temp[2] DP3 temp[3].xyz, src0.xyz, src1.xyz 12: src0.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src0.xyz, src0.000 13: src0.xyz = temp[3], src1.xyz = const[5] MAD_SAT temp[3].xyz, src0.xyz, src1.zzz, src0.000 14: src0.xyz = temp[3], src1.xyz = const[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 15: src0.xyz = temp[3] MAD color[0].xyz, src0.xyz, src0.111, src0.000 16: MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0].yw, input[0].xy__, 2D[0]; 2: src0.w = temp[0] MAD temp[0].x, src0.w__, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[0].xy, src0.xy_, src1.xx_, -src0.11_ 4: MAD temp[0].z, src0.__0, src0.111, src0.000 5: src0.xyz = temp[0] DP3 temp[1].x, src0.xyz, src0.xyz 6: src0.xyz = temp[1] MAD temp[1].x, src0.1__, src0.111, -src0.x__ 7: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 8: src0.xyz = temp[1] REPL_ALPHA temp[0].z RCP, src0.x 9: src0.xyz = input[2], src1.xyz = temp[0] DP3 temp[2].x, src0.xyz, src1.xyz 10: src0.xyz = input[3], src1.xyz = temp[0] DP3 temp[2].y, src0.xyz, src1.xyz 11: src0.xyz = input[4], src1.xyz = temp[0] DP3 temp[2].z, src0.xyz, src1.xyz 12: src0.xyz = input[1], src1.xyz = temp[2] DP3 temp[3].xyz, src0.xyz, src1.xyz 13: src0.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src0.xyz, src0.000 14: src0.xyz = temp[3], src1.xyz = const[5] MAD_SAT temp[3].xyz, src0.xyz, src1.zzz, src0.000 15: src0.xyz = temp[3], src1.xyz = const[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[3] MAD color[0].xyz, src0.xyz, src0.111, src0.000 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0].yw, temp[0].xy__, 2D[0]; 2: src0.w = temp[0] MAD temp[0].x, src0.w__, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[0].xy, src0.xy_, src1.xx_, -src0.11_ 4: MAD temp[0].z, src0.__0, src0.111, src0.000 5: src0.xyz = temp[0] DP3 temp[5].x, src0.xyz, src0.xyz 6: src0.xyz = temp[5] MAD temp[5].x, src0.1__, src0.111, -src0.x__ 7: src0.xyz = temp[5] REPL_ALPHA temp[5].x RSQ, |src0.x| 8: src0.xyz = temp[5] REPL_ALPHA temp[0].z RCP, src0.x 9: src0.xyz = temp[2], src1.xyz = temp[0] DP3 temp[2].x, src0.xyz, src1.xyz 10: src0.xyz = temp[3], src1.xyz = temp[0] DP3 temp[2].y, src0.xyz, src1.xyz 11: src0.xyz = temp[4], src1.xyz = temp[0] DP3 temp[2].z, src0.xyz, src1.xyz 12: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[0].xyz, src0.xyz, src1.xyz 13: src0.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.xyz, src0.000 14: src0.xyz = temp[0], src1.xyz = const[5] MAD_SAT temp[0].xyz, src0.xyz, src1.zzz, src0.000 15: src0.xyz = temp[0], src1.xyz = const[3] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 pc=8************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 14, tex_end: 0 (code_addr: 00400380) TEX: TEX t0, t0, texture[0] (00008000) 0: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.www 1.0 0.0 op: 00050a8c w: 1.0 1.0 0.0 op: 00040891 1: xyz: t0 c4 t0 -> t0.xy (01800900) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c4.xxx -1.0 op: 000d4280 w: t0.x t0.x t0.x op: 00000000 2: xyz: t0 t0 t0 -> t0.z (02000000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 3: xyz: t0 t0 t0 -> t5.x (00940000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t0.xyz t0.xxx op: 00804000 w: t0.x t0.x t0.x op: 00000000 4: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t5.xyz op: 00080a95 w: t5.x t5.x t5.x op: 00000000 5: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: |t5.x| t5.x t5.x op: 05800040 6: xyz: t5 t0 t0 -> t0.z (02000005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: t5.x t5.x t5.x op: 05000000 7: xyz: t2 t0 t0 -> t2.x (00880002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t0.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 8: xyz: t3 t0 t0 -> t2.y (01080003) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t0.xyz t3.xxx op: 00804200 w: t3.x t3.x t3.x op: 00000000 9: xyz: t4 t0 t0 -> t2.z (02080004) w: t0 t0 t0 -> (00000000) xyz: t4.xyz t0.xyz t4.xxx op: 00804200 w: t4.x t4.x t4.x op: 00000000 10: xyz: t1 t2 t0 -> t0.xyz (03800081) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t2.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 11: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t0.xyz 0.0 op: 00050000 w: t0.x t0.x t0.x op: 00000000 12: xyz: t0 c5 t0 -> t0.xyz (03800940) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c5.zzz 0.0 op: 40050380 w: t0.x t0.x t0.x op: 00000000 13: xyz: t0 c3 t0 -> t0.xyz (038008c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c3.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 14: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.x t0.x t0.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0] IMM FLT32 { 0.3330, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: DP3 TEMP[0].w, TEMP[0], IMM[0].xxxx 2: MOV TEMP[0].xyz, IMM[0].yyyy 3: MUL OUT[0], TEMP[0], IN[0] 4: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: DP3 temp[0].w, temp[0], const[0].xxxx; 2: MOV temp[0].xyz, const[0].yyyy; 3: MUL output[0], temp[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: DP3 temp[0].w, temp[0], const[0].xxxx; 2: MOV temp[0].xyz, const[0].yyyy; 3: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: DP3 temp[0].w, temp[0], const[0].xxxx; 2: MOV temp[0].xyz, const[0].yyyy; 3: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: DP3 temp[0].w, temp[0], const[0].xxxx; 2: MOV temp[0].xyz, const[0].yyyy; 3: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: DP3 temp[0].w, temp[0], const[0].xxxx; 2: MOV temp[0].xyz, const[0].yyyy; 3: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: DP3 temp[0].w, temp[0].xyz_, const[0].xxx_; 2: MOV temp[0].xyz, const[0].yyy_; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: DP3 temp[0].w, temp[0].xyz_, const[0].xxx_; 2: MOV temp[0].xyz, none.111_; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: DP3 temp[0].w, temp[0].xyz_, const[0].xxx_; 2: MOV temp[0].xyz, none.111_; 3: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: src0.xyz = temp[0], src1.xyz = const[0] DP3, src0.xyz, src1.xxx DP3 temp[0].w, src0._, src0._ 2: MAD temp[0].xyz, src0.111, src0.111, src0.000 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[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].xyz, input[1].xy__, 2D[0]; 2: src0.xyz = temp[0], src1.xyz = const[0] DP3, src0.xyz, src1.xxx DP3 temp[0].w, src0._, src0._ 3: MAD temp[0].xyz, src0.111, src0.111, src0.000 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1].xyz, temp[1].xy__, 2D[0]; 2: src0.xyz = temp[1], src1.xyz = const[0] DP3, src0.xyz, src1.xxx DP3 temp[1].w, src0._, src0._ 3: MAD temp[1].xyz, src0.111, src0.111, src0.000 4: src0.xyz = temp[1], src0.w = temp[1], 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 pc=9************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 2, tex_end: 0 (code_addr: 00400080) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t1 c0 t0 -> (00000801) w: t0 t0 t0 -> t1.w (00840000) xyz: t1.xyz c0.xxx t1.xxx op: 00804280 w: 1.0 1.0 t1.x op: 00800891 1: xyz: t0 t0 t0 -> t1.xyz (03840000) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 0.0 op: 00050a95 w: t0.x t0.x t0.x op: 00000000 2: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0] IMM FLT32 { 1.0000, 0.0000, 0.0000, 0.0000} 0: MOV TEMP[0].xyz, IMM[0].xxxx 1: TEX TEMP[0].w, IN[1], SAMP[0], 2D 2: MUL OUT[0], TEMP[0], IN[0] 3: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].1111; 1: TEX temp[0].w, input[1], 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].1111; 1: TEX temp[0].w, input[1], 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].1111; 1: TEX temp[0].w, input[1], 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].1111; 1: TEX temp[0].w, input[1], 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].1111; 1: TEX temp[1], input[1], 2D[0]; 2: MOV temp[0].w, temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].111_; 1: TEX temp[1].w, input[1].xy__, 2D[0]; 2: MOV temp[0].w, temp[1].___w; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].111_; 1: TEX temp[1].w, input[1].xy__, 2D[0]; 2: MOV temp[0].w, temp[1].___w; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV temp[0].xyz, temp[0].111_; 1: TEX temp[1].w, input[1].xy__, 2D[0]; 2: MOV temp[0].w, temp[1].___w; 3: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: MAD temp[0].xyz, src0.111, src0.111, src0.000 1: TEX temp[1].w, input[1].xy__, 2D[0]; 2: src0.w = temp[1] MAD temp[0].w, src0.w, src0.1, src0.0 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[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[1].w, input[1].xy__, 2D[0]; 2: src0.w = temp[1] MAD temp[0].xyz, src0.111, src0.111, src0.000 MAD temp[0].w, src0.w, src0.1, src0.0 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1].w, temp[1].xy__, 2D[0]; 2: src0.w = temp[1] MAD temp[1].xyz, src0.111, src0.111, src0.000 MAD temp[1].w, src0.w, src0.1, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], 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 pc=10************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 0 (code_addr: 00400040) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t0 t0 t0 -> t1.xyz (03840000) w: t1 t0 t0 -> t1.w (00840001) xyz: 1.0 1.0 0.0 op: 00050a95 w: t1.w 1.0 0.0 op: 00040889 1: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 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].xy__, 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 register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], temp[0].xy__, 2D[0]; 2: 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 pc=11************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) TEX: TEX t0, t0, texture[0] (00008000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow passes # 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 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 pc=12************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX output[0], input[0], 2D[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[1], input[0], 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 2D[0]; 1: MOV output[0], temp[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[1], input[0].xy__, 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].xy__, 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 register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0], temp[0].xy__, 2D[0]; 2: 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 pc=13************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) TEX: TEX t0, t0, texture[0] (00008000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[1], PERSPECTIVE DCL IN[2], GENERIC[2], PERSPECTIVE DCL IN[3], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[1] DCL TEMP[0..2] IMM FLT32 { 0.2500, 0.3300, 1.0000, 2.0000} IMM FLT32 { 3.0000, 0.0000, 1.0000, 0.0000} 0: TEX TEMP[0], IN[1], SAMP[0], RECT 1: TEX TEMP[1], IN[0], SAMP[0], RECT 2: ADD TEMP[2], TEMP[1], TEMP[0] 3: TEX TEMP[1], IN[2], SAMP[0], RECT 4: ADD TEMP[1], TEMP[2], TEMP[1] 5: TEX TEMP[0], IN[3], SAMP[0], RECT 6: ADD TEMP[0], TEMP[1], TEMP[0] 7: MOV TEMP[1].x, IMM[0].zzzz 8: ADD TEMP[1].y, -CONST[1].zzzz, TEMP[1].xxxx 9: MUL TEMP[0], TEMP[0], IMM[0].xxxx 10: DP3 TEMP[1].x, TEMP[0], IMM[0].yyyy 11: RCP TEMP[1].y, TEMP[1].yyyy 12: ADD TEMP[1].x, TEMP[1], -CONST[1].zzzz 13: MUL_SAT TEMP[1].x, TEMP[1], TEMP[1].yyyy 14: MUL TEMP[1].y, -TEMP[1].xxxx, IMM[0].wwww 15: ADD TEMP[1].y, TEMP[1], IMM[1].xxxx 16: MUL TEMP[1].x, TEMP[1], TEMP[1] 17: MAD TEMP[1].x, TEMP[1], TEMP[1].yyyy, -IMM[0].zzzz 18: MUL TEMP[1].x, TEMP[1], CONST[1].wwww 19: ADD TEMP[1].x, TEMP[1], IMM[0].zzzz 20: MOV TEMP[1].w, IMM[0].zzzz 21: MUL TEMP[1].xyz, TEMP[1].xxxx, TEMP[0].wwww 22: MUL OUT[0], TEMP[0], TEMP[1] 23: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[3], input[1], const[4]; 1: TEX temp[0], temp[3], 2D[0]; 2: MUL temp[4], input[0], const[4]; 3: TEX temp[1], temp[4], 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5], input[2], const[4]; 6: TEX temp[1], temp[5], 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6], input[3], const[4]; 9: TEX temp[0], temp[6], 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: MOV temp[1].x, const[2].zzzz; 12: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 13: MUL temp[0], temp[0], const[2].xxxx; 14: DP3 temp[1].x, temp[0], const[2].yyyy; 15: RCP temp[1].y, temp[1].yyyy; 16: ADD temp[1].x, temp[1], -const[1].zzzz; 17: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 18: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 19: ADD temp[1].y, temp[1], const[3].xxxx; 20: MUL temp[1].x, temp[1], temp[1]; 21: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 22: MUL temp[1].x, temp[1], const[1].wwww; 23: ADD temp[1].x, temp[1], const[2].zzzz; 24: MOV temp[1].w, const[2].zzzz; 25: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 26: MUL output[0], temp[0], temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[3].xy, input[1].xy__, const[4].xy__; 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: MUL temp[4].xy, input[0].xy__, const[4].xy__; 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5].xy, input[2].xy__, const[4].xy__; 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6].xy, input[3].xy__, const[4].xy__; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: MOV temp[1].x, const[2].z___; 12: ADD temp[1].y, -const[1]._z__, temp[1]._x__; 13: MUL temp[0], temp[0], const[2].xxxx; 14: DP3 temp[1].x, temp[0].xyz_, const[2].yyy_; 15: RCP temp[1].y, temp[1].y___; 16: ADD temp[1].x, temp[1].x___, -const[1].z___; 17: MUL_SAT temp[1].x, temp[1].x___, temp[1].y___; 18: MUL temp[1].y, -temp[1]._x__, const[2]._w__; 19: ADD temp[1].y, temp[1]._y__, const[3]._x__; 20: MUL temp[1].x, temp[1].x___, temp[1].x___; 21: MAD temp[1].x, temp[1].x___, temp[1].y___, -const[2].z___; 22: MUL temp[1].x, temp[1].x___, const[1].w___; 23: ADD temp[1].x, temp[1].x___, const[2].z___; 24: MOV temp[1].w, const[2].___z; 25: MUL temp[1].xyz, temp[1].xxx_, temp[0].www_; 26: MUL output[0], temp[0], temp[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[3].xy, input[1].xy__, const[4].xy__; 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: MUL temp[4].xy, input[0].xy__, const[4].xy__; 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5].xy, input[2].xy__, const[4].xy__; 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6].xy, input[3].xy__, const[4].xy__; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: ADD temp[1].y, -const[1]._z__, none._1__; 12: MUL temp[0], temp[0], const[2].xxxx; 13: DP3 temp[1].x, temp[0].xyz_, const[2].yyy_; 14: RCP temp[1].y, temp[1].y___; 15: ADD temp[1].x, temp[1].x___, -const[1].z___; 16: MUL_SAT temp[1].x, temp[1].x___, temp[1].y___; 17: MUL temp[1].y, -temp[1]._x__, const[2]._w__; 18: ADD temp[1].y, temp[1]._y__, const[3]._x__; 19: MUL temp[1].x, temp[1].x___, temp[1].x___; 20: MAD temp[1].x, temp[1].x___, temp[1].y___, -none.1___; 21: MUL temp[1].x, temp[1].x___, const[1].w___; 22: ADD temp[1].x, temp[1].x___, none.1___; 23: MOV temp[1].w, none.___1; 24: MUL temp[1].xyz, temp[1].xxx_, temp[0].www_; 25: MUL output[0], temp[0], temp[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[3].xy, input[1].xy__, const[4].xy__; 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: MUL temp[4].xy, input[0].xy__, const[4].xy__; 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5].xy, input[2].xy__, const[4].xy__; 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6].xy, input[3].xy__, const[4].xy__; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: ADD temp[1].y, -const[1]._z__, none._1__; 12: MUL temp[0], temp[0], const[2].xxxx; 13: DP3 temp[1].x, temp[0].xyz_, const[2].yyy_; 14: RCP temp[1].y, temp[1].y___; 15: ADD temp[1].x, temp[1].x___, -const[1].z___; 16: MUL_SAT temp[1].x, temp[1].x___, temp[1].y___; 17: MUL temp[1].y, -temp[1]._x__, const[2]._w__; 18: ADD temp[1].y, temp[1]._y__, const[3]._x__; 19: MUL temp[1].x, temp[1].x___, temp[1].x___; 20: MAD temp[1].x, temp[1].x___, temp[1].y___, -none.1___; 21: MUL temp[1].x, temp[1].x___, const[1].w___; 22: ADD temp[1].x, temp[1].x___, none.1___; 23: MOV temp[1].w, none.___1; 24: MUL temp[1].xyz, temp[1].xxx_, temp[0].www_; 25: MUL output[0], temp[0], temp[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[4] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: src0.xyz = input[0], src1.xyz = const[4] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz MAD temp[2].w, src0.w, src0.1, src1.w 5: src0.xyz = input[2], src1.xyz = const[4] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src1.xyz MAD temp[1].w, src0.w, src0.1, src1.w 8: src0.xyz = input[3], src1.xyz = const[4] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz MAD temp[0].w, src0.w, src0.1, src1.w 11: src0.xyz = const[1] MAD temp[1].y, -src0._z_, src0.111, src0._1_ 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 13: src0.xyz = temp[0], src1.xyz = const[2] DP3 temp[1].x, src0.xyz, src1.yyy 14: src0.xyz = temp[1] REPL_ALPHA temp[1].y RCP, src0.y 15: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[1].x, src0.x__, src0.111, -src1.z__ 16: src0.xyz = temp[1] MAD_SAT temp[1].x, src0.x__, src0.y__, src0.000 17: src0.xyz = temp[1], src0.w = const[2] MAD temp[1].y, -src0._x_, src0._w_, src0.000 18: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[1].y, src0._y_, src0.111, src1._x_ 19: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.x__, src0.000 20: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.y__, -src0.1__ 21: src0.xyz = temp[1], src0.w = const[1] MAD temp[1].x, src0.x__, src0.w__, src0.000 22: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.111, src0.1__ 23: MAD temp[1].w, src0.1, src0.1, src0.0 24: src0.xyz = temp[1], src0.w = temp[0] MAD temp[1].xyz, src0.xxx, src0.www, src0.000 25: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] 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: src0.xyz = input[3], src1.xyz = const[4] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = input[2], src1.xyz = const[4] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 2: src0.xyz = input[0], src1.xyz = const[4] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 3: src0.xyz = input[1], src1.xyz = const[4] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 4: BEGIN_TEX; 5: TEX temp[0], temp[3].xy__, 2D[0]; 6: TEX temp[1], temp[4].xy__, 2D[0]; 7: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz MAD temp[2].w, src0.w, src0.1, src1.w 8: BEGIN_TEX; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: TEX temp[1], temp[5].xy__, 2D[0]; 11: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src1.xyz MAD temp[1].w, src0.w, src0.1, src1.w 12: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz MAD temp[0].w, src0.w, src0.1, src1.w 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 14: src0.xyz = temp[0], src1.xyz = const[2] DP3 temp[1].x, src0.xyz, src1.yyy MAD temp[1].w, src0.1, src0.1, src0.0 15: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[1].x, src0.x__, src0.111, -src1.z__ 16: src0.xyz = const[1] MAD temp[1].y, -src0._z_, src0.111, src0._1_ 17: src0.xyz = temp[1] REPL_ALPHA temp[1].y RCP, src0.y 18: src0.xyz = temp[1] MAD_SAT temp[1].x, src0.x__, src0.y__, src0.000 19: src0.xyz = temp[1], src0.w = const[2] MAD temp[1].y, -src0._x_, src0._w_, src0.000 20: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[1].y, src0._y_, src0.111, src1._x_ 21: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.x__, src0.000 22: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.y__, -src0.1__ 23: src0.xyz = temp[1], src0.w = const[1] MAD temp[1].x, src0.x__, src0.w__, src0.000 24: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.111, src0.1__ 25: src0.xyz = temp[1], src0.w = temp[0] MAD temp[1].xyz, src0.xxx, src0.www, src0.000 26: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[3], src1.xyz = const[4] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 2: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 3: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[0].xy, src0.xy_, src1.xy_, src0.000 4: BEGIN_TEX; 5: TEX temp[0], temp[0].xy__, 2D[0]; 6: TEX temp[1], temp[2].xy__, 2D[0]; 7: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz MAD temp[2].w, src0.w, src0.1, src1.w 8: BEGIN_TEX; 9: TEX temp[0], temp[4].xy__, 2D[0]; 10: TEX temp[1], temp[3].xy__, 2D[0]; 11: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src1.xyz MAD temp[1].w, src0.w, src0.1, src1.w 12: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz MAD temp[0].w, src0.w, src0.1, src1.w 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 14: src0.xyz = temp[0], src1.xyz = const[2] DP3 temp[1].x, src0.xyz, src1.yyy MAD temp[1].w, src0.1, src0.1, src0.0 15: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[1].x, src0.x__, src0.111, -src1.z__ 16: src0.xyz = const[1] MAD temp[1].y, -src0._z_, src0.111, src0._1_ 17: src0.xyz = temp[1] REPL_ALPHA temp[1].y RCP, src0.y 18: src0.xyz = temp[1] MAD_SAT temp[1].x, src0.x__, src0.y__, src0.000 19: src0.xyz = temp[1], src0.w = const[2] MAD temp[1].y, -src0._x_, src0._w_, src0.000 20: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[1].y, src0._y_, src0.111, src1._x_ 21: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.x__, src0.000 22: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.y__, -src0.1__ 23: src0.xyz = temp[1], src0.w = const[1] MAD temp[1].x, src0.x__, src0.w__, src0.000 24: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.111, src0.1__ 25: src0.xyz = temp[1], src0.w = temp[0] MAD temp[1].xyz, src0.xxx, src0.www, src0.000 26: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 pc=14************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 3, tex_end: 0 (code_addr: 000000c0) 0: xyz: t3 c4 t0 -> t4.xy (01900903) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c4.xyz 0.0 op: 00050200 w: t3.x t3.x t3.x op: 00000000 1: xyz: t2 c4 t0 -> t3.xy (018c0902) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c4.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 2: xyz: t0 c4 t0 -> t2.xy (01880900) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c4.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 3: xyz: t1 c4 t0 -> t0.xy (01800901) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c4.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 4, tex_offset: 0, alu_end: 0, tex_end: 1 (code_addr: 00020004) TEX: TEX t0, t0, texture[0] (00008000) TEX t1, t2, texture[0] (00008042) 4: xyz: t1 t0 t0 -> t2.xyz (03880001) w: t1 t0 t0 -> t2.w (00880001) xyz: t1.xyz 1.0 t0.xyz op: 00010a80 w: t1.w 1.0 t0.w op: 00028889 NODE 2: alu_offset: 5, tex_offset: 2, alu_end: 15, tex_end: 1 (code_addr: 004223c5) TEX: TEX t0, t4, texture[0] (00008004) TEX t1, t3, texture[0] (00008043) 5: xyz: t2 t1 t0 -> t1.xyz (03840042) w: t2 t1 t0 -> t1.w (00840042) xyz: t2.xyz 1.0 t1.xyz op: 00010a80 w: t2.w 1.0 t1.w op: 00028889 6: xyz: t1 t0 t0 -> t0.xyz (03800001) w: t1 t0 t0 -> t0.w (00800001) xyz: t1.xyz 1.0 t0.xyz op: 00010a80 w: t1.w 1.0 t0.w op: 00028889 7: xyz: t0 c2 t0 -> t0.xyz (03800880) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz c2.xxx 0.0 op: 00050280 w: t0.w c2.x 0.0 op: 00040189 8: xyz: t0 c2 t0 -> t1.x (00840880) w: t0 t0 t0 -> t1.w (00840000) xyz: t0.xyz c2.yyy t0.xxx op: 00804300 w: 1.0 1.0 0.0 op: 00040891 9: xyz: t1 c1 t0 -> t1.x (00840841) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 -c1.zzz op: 0009ca80 w: t1.x t1.x t1.x op: 00000000 10: xyz: c1 t0 t0 -> t1.y (01040021) w: t0 t0 t0 -> (00000000) xyz: -c1.zzz 1.0 1.0 op: 00054aa3 w: c1.x c1.x c1.x op: 00000000 11: xyz: t1 t0 t0 -> t1.y (01040001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: t1.y t1.x t1.x op: 05000001 12: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.yyy 0.0 op: 40050100 w: t1.x t1.x t1.x op: 00000000 13: xyz: t1 t0 t0 -> t1.y (01040001) w: c2 t0 t0 -> (00000022) xyz: -t1.xxx c2.www 0.0 op: 00050621 w: t1.x t1.x t1.x op: 00000000 14: xyz: t1 c3 t0 -> t1.y (010408c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 c3.xxx op: 00014a80 w: t1.x t1.x t1.x op: 00000000 15: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.xyz 0.0 op: 00050000 w: t1.x t1.x t1.x op: 00000000 16: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.yyy -1.0 op: 000d4100 w: t1.x t1.x t1.x op: 00000000 17: xyz: t1 t0 t0 -> t1.x (00840001) w: c1 t0 t0 -> (00000021) xyz: t1.xyz c1.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 18: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 1.0 op: 00054a80 w: t1.x t1.x t1.x op: 00000000 19: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t0.www 0.0 op: 00050601 w: t1.x t1.x t1.x op: 00000000 20: xyz: t0 t1 t0 -> o0.xyz (1c000040) w: t0 t1 t0 -> o0.w (01000040) xyz: t0.xyz t1.xyz 0.0 op: 00050200 w: t0.w t1.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[1], PERSPECTIVE DCL IN[2], GENERIC[2], PERSPECTIVE DCL IN[3], GENERIC[3], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[1] DCL TEMP[0..2] IMM FLT32 { 0.2500, 0.3300, 1.0000, 2.0000} IMM FLT32 { 3.0000, 0.0000, 1.0000, 0.0000} 0: TEX TEMP[0], IN[1], SAMP[0], RECT 1: TEX TEMP[1], IN[0], SAMP[0], RECT 2: ADD TEMP[2], TEMP[1], TEMP[0] 3: TEX TEMP[1], IN[2], SAMP[0], RECT 4: ADD TEMP[1], TEMP[2], TEMP[1] 5: TEX TEMP[0], IN[3], SAMP[0], RECT 6: ADD TEMP[0], TEMP[1], TEMP[0] 7: MOV TEMP[1].x, IMM[0].zzzz 8: ADD TEMP[1].y, -CONST[1].zzzz, TEMP[1].xxxx 9: MUL TEMP[0], TEMP[0], IMM[0].xxxx 10: DP3 TEMP[1].x, TEMP[0], IMM[0].yyyy 11: RCP TEMP[1].y, TEMP[1].yyyy 12: ADD TEMP[1].x, TEMP[1], -CONST[1].zzzz 13: MUL_SAT TEMP[1].x, TEMP[1], TEMP[1].yyyy 14: MUL TEMP[1].y, -TEMP[1].xxxx, IMM[0].wwww 15: ADD TEMP[1].y, TEMP[1], IMM[1].xxxx 16: MUL TEMP[1].x, TEMP[1], TEMP[1] 17: MAD TEMP[1].x, TEMP[1], TEMP[1].yyyy, -IMM[0].zzzz 18: MUL TEMP[1].x, TEMP[1], CONST[1].wwww 19: ADD TEMP[1].x, TEMP[1], IMM[0].zzzz 20: MOV TEMP[1].w, IMM[0].zzzz 21: MUL TEMP[1].xyz, TEMP[1].xxxx, TEMP[0].wwww 22: MUL OUT[0], TEMP[0], TEMP[1] 23: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: TEX temp[1], input[0], RECT[0]; 2: ADD temp[2], temp[1], temp[0]; 3: TEX temp[1], input[2], RECT[0]; 4: ADD temp[1], temp[2], temp[1]; 5: TEX temp[0], input[3], RECT[0]; 6: ADD temp[0], temp[1], temp[0]; 7: MOV temp[1].x, const[2].zzzz; 8: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 9: MUL temp[0], temp[0], const[2].xxxx; 10: DP3 temp[1].x, temp[0], const[2].yyyy; 11: RCP temp[1].y, temp[1].yyyy; 12: ADD temp[1].x, temp[1], -const[1].zzzz; 13: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 14: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 15: ADD temp[1].y, temp[1], const[3].xxxx; 16: MUL temp[1].x, temp[1], temp[1]; 17: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 18: MUL temp[1].x, temp[1], const[1].wwww; 19: ADD temp[1].x, temp[1], const[2].zzzz; 20: MOV temp[1].w, const[2].zzzz; 21: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 22: MUL output[0], temp[0], temp[1]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[3], input[1], const[4]; 1: TEX temp[0], temp[3], 2D[0]; 2: MUL temp[4], input[0], const[4]; 3: TEX temp[1], temp[4], 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5], input[2], const[4]; 6: TEX temp[1], temp[5], 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6], input[3], const[4]; 9: TEX temp[0], temp[6], 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: MOV temp[1].x, const[2].zzzz; 12: ADD temp[1].y, -const[1].zzzz, temp[1].xxxx; 13: MUL temp[0], temp[0], const[2].xxxx; 14: DP3 temp[1].x, temp[0], const[2].yyyy; 15: RCP temp[1].y, temp[1].yyyy; 16: ADD temp[1].x, temp[1], -const[1].zzzz; 17: MUL_SAT temp[1].x, temp[1], temp[1].yyyy; 18: MUL temp[1].y, -temp[1].xxxx, const[2].wwww; 19: ADD temp[1].y, temp[1], const[3].xxxx; 20: MUL temp[1].x, temp[1], temp[1]; 21: MAD temp[1].x, temp[1], temp[1].yyyy, -const[2].zzzz; 22: MUL temp[1].x, temp[1], const[1].wwww; 23: ADD temp[1].x, temp[1], const[2].zzzz; 24: MOV temp[1].w, const[2].zzzz; 25: MUL temp[1].xyz, temp[1].xxxx, temp[0].wwww; 26: MUL output[0], temp[0], temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[3].xy, input[1].xy__, const[4].xy__; 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: MUL temp[4].xy, input[0].xy__, const[4].xy__; 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5].xy, input[2].xy__, const[4].xy__; 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6].xy, input[3].xy__, const[4].xy__; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: MOV temp[1].x, const[2].z___; 12: ADD temp[1].y, -const[1]._z__, temp[1]._x__; 13: MUL temp[0], temp[0], const[2].xxxx; 14: DP3 temp[1].x, temp[0].xyz_, const[2].yyy_; 15: RCP temp[1].y, temp[1].y___; 16: ADD temp[1].x, temp[1].x___, -const[1].z___; 17: MUL_SAT temp[1].x, temp[1].x___, temp[1].y___; 18: MUL temp[1].y, -temp[1]._x__, const[2]._w__; 19: ADD temp[1].y, temp[1]._y__, const[3]._x__; 20: MUL temp[1].x, temp[1].x___, temp[1].x___; 21: MAD temp[1].x, temp[1].x___, temp[1].y___, -const[2].z___; 22: MUL temp[1].x, temp[1].x___, const[1].w___; 23: ADD temp[1].x, temp[1].x___, const[2].z___; 24: MOV temp[1].w, const[2].___z; 25: MUL temp[1].xyz, temp[1].xxx_, temp[0].www_; 26: MUL output[0], temp[0], temp[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[3].xy, input[1].xy__, const[4].xy__; 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: MUL temp[4].xy, input[0].xy__, const[4].xy__; 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5].xy, input[2].xy__, const[4].xy__; 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6].xy, input[3].xy__, const[4].xy__; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: ADD temp[1].y, -const[1]._z__, none._1__; 12: MUL temp[0], temp[0], const[2].xxxx; 13: DP3 temp[1].x, temp[0].xyz_, const[2].yyy_; 14: RCP temp[1].y, temp[1].y___; 15: ADD temp[1].x, temp[1].x___, -const[1].z___; 16: MUL_SAT temp[1].x, temp[1].x___, temp[1].y___; 17: MUL temp[1].y, -temp[1]._x__, const[2]._w__; 18: ADD temp[1].y, temp[1]._y__, const[3]._x__; 19: MUL temp[1].x, temp[1].x___, temp[1].x___; 20: MAD temp[1].x, temp[1].x___, temp[1].y___, -none.1___; 21: MUL temp[1].x, temp[1].x___, const[1].w___; 22: ADD temp[1].x, temp[1].x___, none.1___; 23: MOV temp[1].w, none.___1; 24: MUL temp[1].xyz, temp[1].xxx_, temp[0].www_; 25: MUL output[0], temp[0], temp[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[3].xy, input[1].xy__, const[4].xy__; 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: MUL temp[4].xy, input[0].xy__, const[4].xy__; 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: ADD temp[2], temp[1], temp[0]; 5: MUL temp[5].xy, input[2].xy__, const[4].xy__; 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: ADD temp[1], temp[2], temp[1]; 8: MUL temp[6].xy, input[3].xy__, const[4].xy__; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: ADD temp[0], temp[1], temp[0]; 11: ADD temp[1].y, -const[1]._z__, none._1__; 12: MUL temp[0], temp[0], const[2].xxxx; 13: DP3 temp[1].x, temp[0].xyz_, const[2].yyy_; 14: RCP temp[1].y, temp[1].y___; 15: ADD temp[1].x, temp[1].x___, -const[1].z___; 16: MUL_SAT temp[1].x, temp[1].x___, temp[1].y___; 17: MUL temp[1].y, -temp[1]._x__, const[2]._w__; 18: ADD temp[1].y, temp[1]._y__, const[3]._x__; 19: MUL temp[1].x, temp[1].x___, temp[1].x___; 20: MAD temp[1].x, temp[1].x___, temp[1].y___, -none.1___; 21: MUL temp[1].x, temp[1].x___, const[1].w___; 22: ADD temp[1].x, temp[1].x___, none.1___; 23: MOV temp[1].w, none.___1; 24: MUL temp[1].xyz, temp[1].xxx_, temp[0].www_; 25: MUL output[0], temp[0], temp[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[4] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 1: TEX temp[0], temp[3].xy__, 2D[0]; 2: src0.xyz = input[0], src1.xyz = const[4] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 3: TEX temp[1], temp[4].xy__, 2D[0]; 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz MAD temp[2].w, src0.w, src0.1, src1.w 5: src0.xyz = input[2], src1.xyz = const[4] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 6: TEX temp[1], temp[5].xy__, 2D[0]; 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src1.xyz MAD temp[1].w, src0.w, src0.1, src1.w 8: src0.xyz = input[3], src1.xyz = const[4] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz MAD temp[0].w, src0.w, src0.1, src1.w 11: src0.xyz = const[1] MAD temp[1].y, -src0._z_, src0.111, src0._1_ 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 13: src0.xyz = temp[0], src1.xyz = const[2] DP3 temp[1].x, src0.xyz, src1.yyy 14: src0.xyz = temp[1] REPL_ALPHA temp[1].y RCP, src0.y 15: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[1].x, src0.x__, src0.111, -src1.z__ 16: src0.xyz = temp[1] MAD_SAT temp[1].x, src0.x__, src0.y__, src0.000 17: src0.xyz = temp[1], src0.w = const[2] MAD temp[1].y, -src0._x_, src0._w_, src0.000 18: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[1].y, src0._y_, src0.111, src1._x_ 19: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.x__, src0.000 20: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.y__, -src0.1__ 21: src0.xyz = temp[1], src0.w = const[1] MAD temp[1].x, src0.x__, src0.w__, src0.000 22: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.111, src0.1__ 23: MAD temp[1].w, src0.1, src0.1, src0.0 24: src0.xyz = temp[1], src0.w = temp[0] MAD temp[1].xyz, src0.xxx, src0.www, src0.000 25: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] 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: src0.xyz = input[3], src1.xyz = const[4] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = input[2], src1.xyz = const[4] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 2: src0.xyz = input[0], src1.xyz = const[4] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 3: src0.xyz = input[1], src1.xyz = const[4] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 4: BEGIN_TEX; 5: TEX temp[0], temp[3].xy__, 2D[0]; 6: TEX temp[1], temp[4].xy__, 2D[0]; 7: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz MAD temp[2].w, src0.w, src0.1, src1.w 8: BEGIN_TEX; 9: TEX temp[0], temp[6].xy__, 2D[0]; 10: TEX temp[1], temp[5].xy__, 2D[0]; 11: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src1.xyz MAD temp[1].w, src0.w, src0.1, src1.w 12: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz MAD temp[0].w, src0.w, src0.1, src1.w 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 14: src0.xyz = temp[0], src1.xyz = const[2] DP3 temp[1].x, src0.xyz, src1.yyy MAD temp[1].w, src0.1, src0.1, src0.0 15: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[1].x, src0.x__, src0.111, -src1.z__ 16: src0.xyz = const[1] MAD temp[1].y, -src0._z_, src0.111, src0._1_ 17: src0.xyz = temp[1] REPL_ALPHA temp[1].y RCP, src0.y 18: src0.xyz = temp[1] MAD_SAT temp[1].x, src0.x__, src0.y__, src0.000 19: src0.xyz = temp[1], src0.w = const[2] MAD temp[1].y, -src0._x_, src0._w_, src0.000 20: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[1].y, src0._y_, src0.111, src1._x_ 21: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.x__, src0.000 22: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.y__, -src0.1__ 23: src0.xyz = temp[1], src0.w = const[1] MAD temp[1].x, src0.x__, src0.w__, src0.000 24: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.111, src0.1__ 25: src0.xyz = temp[1], src0.w = temp[0] MAD temp[1].xyz, src0.xxx, src0.www, src0.000 26: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[3], src1.xyz = const[4] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 2: src0.xyz = temp[0], src1.xyz = const[4] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 3: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[0].xy, src0.xy_, src1.xy_, src0.000 4: BEGIN_TEX; 5: TEX temp[0], temp[0].xy__, 2D[0]; 6: TEX temp[1], temp[2].xy__, 2D[0]; 7: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz MAD temp[2].w, src0.w, src0.1, src1.w 8: BEGIN_TEX; 9: TEX temp[0], temp[4].xy__, 2D[0]; 10: TEX temp[1], temp[3].xy__, 2D[0]; 11: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src1.xyz MAD temp[1].w, src0.w, src0.1, src1.w 12: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz MAD temp[0].w, src0.w, src0.1, src1.w 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 MAD temp[0].w, src0.w, src1.x, src0.0 14: src0.xyz = temp[0], src1.xyz = const[2] DP3 temp[1].x, src0.xyz, src1.yyy MAD temp[1].w, src0.1, src0.1, src0.0 15: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[1].x, src0.x__, src0.111, -src1.z__ 16: src0.xyz = const[1] MAD temp[1].y, -src0._z_, src0.111, src0._1_ 17: src0.xyz = temp[1] REPL_ALPHA temp[1].y RCP, src0.y 18: src0.xyz = temp[1] MAD_SAT temp[1].x, src0.x__, src0.y__, src0.000 19: src0.xyz = temp[1], src0.w = const[2] MAD temp[1].y, -src0._x_, src0._w_, src0.000 20: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[1].y, src0._y_, src0.111, src1._x_ 21: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.x__, src0.000 22: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.y__, -src0.1__ 23: src0.xyz = temp[1], src0.w = const[1] MAD temp[1].x, src0.x__, src0.w__, src0.000 24: src0.xyz = temp[1] MAD temp[1].x, src0.x__, src0.111, src0.1__ 25: src0.xyz = temp[1], src0.w = temp[0] MAD temp[1].xyz, src0.xxx, src0.www, src0.000 26: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 pc=15************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 3, tex_end: 0 (code_addr: 000000c0) 0: xyz: t3 c4 t0 -> t4.xy (01900903) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c4.xyz 0.0 op: 00050200 w: t3.x t3.x t3.x op: 00000000 1: xyz: t2 c4 t0 -> t3.xy (018c0902) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c4.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 2: xyz: t0 c4 t0 -> t2.xy (01880900) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c4.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 3: xyz: t1 c4 t0 -> t0.xy (01800901) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c4.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 4, tex_offset: 0, alu_end: 0, tex_end: 1 (code_addr: 00020004) TEX: TEX t0, t0, texture[0] (00008000) TEX t1, t2, texture[0] (00008042) 4: xyz: t1 t0 t0 -> t2.xyz (03880001) w: t1 t0 t0 -> t2.w (00880001) xyz: t1.xyz 1.0 t0.xyz op: 00010a80 w: t1.w 1.0 t0.w op: 00028889 NODE 2: alu_offset: 5, tex_offset: 2, alu_end: 15, tex_end: 1 (code_addr: 004223c5) TEX: TEX t0, t4, texture[0] (00008004) TEX t1, t3, texture[0] (00008043) 5: xyz: t2 t1 t0 -> t1.xyz (03840042) w: t2 t1 t0 -> t1.w (00840042) xyz: t2.xyz 1.0 t1.xyz op: 00010a80 w: t2.w 1.0 t1.w op: 00028889 6: xyz: t1 t0 t0 -> t0.xyz (03800001) w: t1 t0 t0 -> t0.w (00800001) xyz: t1.xyz 1.0 t0.xyz op: 00010a80 w: t1.w 1.0 t0.w op: 00028889 7: xyz: t0 c2 t0 -> t0.xyz (03800880) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz c2.xxx 0.0 op: 00050280 w: t0.w c2.x 0.0 op: 00040189 8: xyz: t0 c2 t0 -> t1.x (00840880) w: t0 t0 t0 -> t1.w (00840000) xyz: t0.xyz c2.yyy t0.xxx op: 00804300 w: 1.0 1.0 0.0 op: 00040891 9: xyz: t1 c1 t0 -> t1.x (00840841) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 -c1.zzz op: 0009ca80 w: t1.x t1.x t1.x op: 00000000 10: xyz: c1 t0 t0 -> t1.y (01040021) w: t0 t0 t0 -> (00000000) xyz: -c1.zzz 1.0 1.0 op: 00054aa3 w: c1.x c1.x c1.x op: 00000000 11: xyz: t1 t0 t0 -> t1.y (01040001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: t1.y t1.x t1.x op: 05000001 12: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.yyy 0.0 op: 40050100 w: t1.x t1.x t1.x op: 00000000 13: xyz: t1 t0 t0 -> t1.y (01040001) w: c2 t0 t0 -> (00000022) xyz: -t1.xxx c2.www 0.0 op: 00050621 w: t1.x t1.x t1.x op: 00000000 14: xyz: t1 c3 t0 -> t1.y (010408c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 c3.xxx op: 00014a80 w: t1.x t1.x t1.x op: 00000000 15: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.xyz 0.0 op: 00050000 w: t1.x t1.x t1.x op: 00000000 16: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.yyy -1.0 op: 000d4100 w: t1.x t1.x t1.x op: 00000000 17: xyz: t1 t0 t0 -> t1.x (00840001) w: c1 t0 t0 -> (00000021) xyz: t1.xyz c1.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 18: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 1.0 op: 00054a80 w: t1.x t1.x t1.x op: 00000000 19: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t0.www 0.0 op: 00050601 w: t1.x t1.x t1.x op: 00000000 20: xyz: t0 t1 t0 -> o0.xyz (1c000040) w: t0 t1 t0 -> o0.w (01000040) xyz: t0.xyz t1.xyz 0.0 op: 00050200 w: t0.w t1.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[1], PERSPECTIVE DCL IN[2], GENERIC[2], PERSPECTIVE DCL IN[3], GENERIC[3], PERSPECTIVE DCL IN[4], GENERIC[4], PERSPECTIVE DCL IN[5], GENERIC[5], PERSPECTIVE DCL IN[6], GENERIC[6], PERSPECTIVE DCL IN[7], GENERIC[7], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0..1] IMM FLT32 { 0.0714, 0.1071, 0.1429, 0.1786} 0: TEX TEMP[0], IN[1], SAMP[0], RECT 1: MUL TEMP[1], TEMP[0], IMM[0].yyyy 2: TEX TEMP[0], IN[0], SAMP[0], RECT 3: MAD TEMP[1], TEMP[0], IMM[0].xxxx, TEMP[1] 4: TEX TEMP[0], IN[2], SAMP[0], RECT 5: MAD TEMP[1], TEMP[0], IMM[0].zzzz, TEMP[1] 6: TEX TEMP[0], IN[3], SAMP[0], RECT 7: MAD TEMP[1], TEMP[0], IMM[0].wwww, TEMP[1] 8: TEX TEMP[0], IN[4], SAMP[0], RECT 9: MAD TEMP[1], TEMP[0], IMM[0].wwww, TEMP[1] 10: TEX TEMP[0], IN[5], SAMP[0], RECT 11: MAD TEMP[1], TEMP[0], IMM[0].zzzz, TEMP[1] 12: TEX TEMP[0], IN[6], SAMP[0], RECT 13: MAD TEMP[1], TEMP[0], IMM[0].yyyy, TEMP[1] 14: TEX TEMP[0], IN[7], SAMP[0], RECT 15: MAD OUT[0], TEMP[0], IMM[0].xxxx, TEMP[1] 16: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[0]; 3: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 4: TEX temp[0], input[2], RECT[0]; 5: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 6: TEX temp[0], input[3], RECT[0]; 7: MAD temp[1], temp[0], const[0].wwww, temp[1]; 8: TEX temp[0], input[4], RECT[0]; 9: MAD temp[1], temp[0], const[0].wwww, temp[1]; 10: TEX temp[0], input[5], RECT[0]; 11: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 12: TEX temp[0], input[6], RECT[0]; 13: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 14: TEX temp[0], input[7], RECT[0]; 15: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[0]; 3: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 4: TEX temp[0], input[2], RECT[0]; 5: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 6: TEX temp[0], input[3], RECT[0]; 7: MAD temp[1], temp[0], const[0].wwww, temp[1]; 8: TEX temp[0], input[4], RECT[0]; 9: MAD temp[1], temp[0], const[0].wwww, temp[1]; 10: TEX temp[0], input[5], RECT[0]; 11: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 12: TEX temp[0], input[6], RECT[0]; 13: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 14: TEX temp[0], input[7], RECT[0]; 15: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[0]; 3: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 4: TEX temp[0], input[2], RECT[0]; 5: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 6: TEX temp[0], input[3], RECT[0]; 7: MAD temp[1], temp[0], const[0].wwww, temp[1]; 8: TEX temp[0], input[4], RECT[0]; 9: MAD temp[1], temp[0], const[0].wwww, temp[1]; 10: TEX temp[0], input[5], RECT[0]; 11: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 12: TEX temp[0], input[6], RECT[0]; 13: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 14: TEX temp[0], input[7], RECT[0]; 15: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[0]; 3: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 4: TEX temp[0], input[2], RECT[0]; 5: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 6: TEX temp[0], input[3], RECT[0]; 7: MAD temp[1], temp[0], const[0].wwww, temp[1]; 8: TEX temp[0], input[4], RECT[0]; 9: MAD temp[1], temp[0], const[0].wwww, temp[1]; 10: TEX temp[0], input[5], RECT[0]; 11: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 12: TEX temp[0], input[6], RECT[0]; 13: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 14: TEX temp[0], input[7], RECT[0]; 15: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[2], input[1], const[1]; 1: TEX temp[0], temp[2], 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3], input[0], const[1]; 4: TEX temp[0], temp[3], 2D[0]; 5: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 6: MUL temp[4], input[2], const[1]; 7: TEX temp[0], temp[4], 2D[0]; 8: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 9: MUL temp[5], input[3], const[1]; 10: TEX temp[0], temp[5], 2D[0]; 11: MAD temp[1], temp[0], const[0].wwww, temp[1]; 12: MUL temp[6], input[4], const[1]; 13: TEX temp[0], temp[6], 2D[0]; 14: MAD temp[1], temp[0], const[0].wwww, temp[1]; 15: MUL temp[7], input[5], const[1]; 16: TEX temp[0], temp[7], 2D[0]; 17: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 18: MUL temp[8], input[6], const[1]; 19: TEX temp[0], temp[8], 2D[0]; 20: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 21: MUL temp[9], input[7], const[1]; 22: TEX temp[0], temp[9], 2D[0]; 23: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[1].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[1].xy__; 4: TEX temp[0], temp[3].xy__, 2D[0]; 5: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 6: MUL temp[4].xy, input[2].xy__, const[1].xy__; 7: TEX temp[0], temp[4].xy__, 2D[0]; 8: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 9: MUL temp[5].xy, input[3].xy__, const[1].xy__; 10: TEX temp[0], temp[5].xy__, 2D[0]; 11: MAD temp[1], temp[0], const[0].wwww, temp[1]; 12: MUL temp[6].xy, input[4].xy__, const[1].xy__; 13: TEX temp[0], temp[6].xy__, 2D[0]; 14: MAD temp[1], temp[0], const[0].wwww, temp[1]; 15: MUL temp[7].xy, input[5].xy__, const[1].xy__; 16: TEX temp[0], temp[7].xy__, 2D[0]; 17: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 18: MUL temp[8].xy, input[6].xy__, const[1].xy__; 19: TEX temp[0], temp[8].xy__, 2D[0]; 20: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 21: MUL temp[9].xy, input[7].xy__, const[1].xy__; 22: TEX temp[0], temp[9].xy__, 2D[0]; 23: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[1].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[1].xy__; 4: TEX temp[0], temp[3].xy__, 2D[0]; 5: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 6: MUL temp[4].xy, input[2].xy__, const[1].xy__; 7: TEX temp[0], temp[4].xy__, 2D[0]; 8: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 9: MUL temp[5].xy, input[3].xy__, const[1].xy__; 10: TEX temp[0], temp[5].xy__, 2D[0]; 11: MAD temp[1], temp[0], const[0].wwww, temp[1]; 12: MUL temp[6].xy, input[4].xy__, const[1].xy__; 13: TEX temp[0], temp[6].xy__, 2D[0]; 14: MAD temp[1], temp[0], const[0].wwww, temp[1]; 15: MUL temp[7].xy, input[5].xy__, const[1].xy__; 16: TEX temp[0], temp[7].xy__, 2D[0]; 17: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 18: MUL temp[8].xy, input[6].xy__, const[1].xy__; 19: TEX temp[0], temp[8].xy__, 2D[0]; 20: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 21: MUL temp[9].xy, input[7].xy__, const[1].xy__; 22: TEX temp[0], temp[9].xy__, 2D[0]; 23: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[1].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[1].xy__; 4: TEX temp[0], temp[3].xy__, 2D[0]; 5: MAD temp[1], temp[0], const[0].xxxx, temp[1]; 6: MUL temp[4].xy, input[2].xy__, const[1].xy__; 7: TEX temp[0], temp[4].xy__, 2D[0]; 8: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 9: MUL temp[5].xy, input[3].xy__, const[1].xy__; 10: TEX temp[0], temp[5].xy__, 2D[0]; 11: MAD temp[1], temp[0], const[0].wwww, temp[1]; 12: MUL temp[6].xy, input[4].xy__, const[1].xy__; 13: TEX temp[0], temp[6].xy__, 2D[0]; 14: MAD temp[1], temp[0], const[0].wwww, temp[1]; 15: MUL temp[7].xy, input[5].xy__, const[1].xy__; 16: TEX temp[0], temp[7].xy__, 2D[0]; 17: MAD temp[1], temp[0], const[0].zzzz, temp[1]; 18: MUL temp[8].xy, input[6].xy__, const[1].xy__; 19: TEX temp[0], temp[8].xy__, 2D[0]; 20: MAD temp[1], temp[0], const[0].yyyy, temp[1]; 21: MUL temp[9].xy, input[7].xy__, const[1].xy__; 22: TEX temp[0], temp[9].xy__, 2D[0]; 23: MAD output[0], temp[0], const[0].xxxx, temp[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 3: src0.xyz = input[0], src1.xyz = const[1] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 4: TEX temp[0], temp[3].xy__, 2D[0]; 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[1].w, src0.w, src1.x, src1.w 6: src0.xyz = input[2], src1.xyz = const[1] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 7: TEX temp[0], temp[4].xy__, 2D[0]; 8: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[1].w, src0.w, src1.z, src1.w 9: src0.xyz = input[3], src1.xyz = const[1] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 10: TEX temp[0], temp[5].xy__, 2D[0]; 11: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = const[0], src2.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.www, src1.xyz MAD temp[1].w, src0.w, src1.w, src2.w 12: src0.xyz = input[4], src1.xyz = const[1] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 13: TEX temp[0], temp[6].xy__, 2D[0]; 14: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = const[0], src2.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.www, src1.xyz MAD temp[1].w, src0.w, src1.w, src2.w 15: src0.xyz = input[5], src1.xyz = const[1] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 16: TEX temp[0], temp[7].xy__, 2D[0]; 17: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[1].w, src0.w, src1.z, src1.w 18: src0.xyz = input[6], src1.xyz = const[1] MAD temp[8].xy, src0.xy_, src1.xy_, src0.000 19: TEX temp[0], temp[8].xy__, 2D[0]; 20: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.yyy, src2.xyz MAD temp[1].w, src0.w, src1.y, src1.w 21: src0.xyz = input[7], src1.xyz = const[1] MAD temp[9].xy, src0.xy_, src1.xy_, src0.000 22: TEX temp[0], temp[9].xy__, 2D[0]; 23: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD color[0].w, src0.w, src1.x, src1.w Fragment Program: after pair scheduling # Radeon Compiler Program 0: src0.xyz = input[7], src1.xyz = const[1] MAD temp[9].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = input[6], src1.xyz = const[1] MAD temp[8].xy, src0.xy_, src1.xy_, src0.000 2: src0.xyz = input[5], src1.xyz = const[1] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 3: src0.xyz = input[4], src1.xyz = const[1] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 4: src0.xyz = input[3], src1.xyz = const[1] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 5: src0.xyz = input[2], src1.xyz = const[1] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 6: src0.xyz = input[0], src1.xyz = const[1] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 7: src0.xyz = input[1], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 8: BEGIN_TEX; 9: TEX temp[0], temp[2].xy__, 2D[0]; 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 11: BEGIN_TEX; 12: TEX temp[0], temp[3].xy__, 2D[0]; 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[1].w, src0.w, src1.x, src1.w 14: BEGIN_TEX; 15: TEX temp[0], temp[4].xy__, 2D[0]; 16: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[1].w, src0.w, src1.z, src1.w 17: BEGIN_TEX; 18: TEX temp[0], temp[5].xy__, 2D[0]; 19: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = const[0], src2.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.www, src1.xyz MAD temp[1].w, src0.w, src1.w, src2.w 20: BEGIN_TEX; 21: TEX temp[0], temp[6].xy__, 2D[0]; 22: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = const[0], src2.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.www, src1.xyz MAD temp[1].w, src0.w, src1.w, src2.w 23: BEGIN_TEX; 24: TEX temp[0], temp[7].xy__, 2D[0]; 25: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[1].w, src0.w, src1.z, src1.w 26: BEGIN_TEX; 27: TEX temp[0], temp[8].xy__, 2D[0]; 28: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.yyy, src2.xyz MAD temp[1].w, src0.w, src1.y, src1.w 29: BEGIN_TEX; 30: TEX temp[0], temp[9].xy__, 2D[0]; 31: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD color[0].w, src0.w, src1.x, src1.w Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[7], src1.xyz = const[1] MAD temp[8].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = temp[6], src1.xyz = const[1] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 2: src0.xyz = temp[5], src1.xyz = const[1] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 3: src0.xyz = temp[4], src1.xyz = const[1] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 4: src0.xyz = temp[3], src1.xyz = const[1] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 5: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 6: src0.xyz = temp[0], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 7: src0.xyz = temp[1], src1.xyz = const[1] MAD temp[0].xy, src0.xy_, src1.xy_, src0.000 8: BEGIN_TEX; 9: TEX temp[0], temp[0].xy__, 2D[0]; 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 11: BEGIN_TEX; 12: TEX temp[0], temp[2].xy__, 2D[0]; 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[1].w, src0.w, src1.x, src1.w 14: BEGIN_TEX; 15: TEX temp[0], temp[3].xy__, 2D[0]; 16: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[1].w, src0.w, src1.z, src1.w 17: BEGIN_TEX; 18: TEX temp[0], temp[4].xy__, 2D[0]; 19: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = const[0], src2.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.www, src1.xyz MAD temp[1].w, src0.w, src1.w, src2.w 20: BEGIN_TEX; 21: TEX temp[0], temp[5].xy__, 2D[0]; 22: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = const[0], src2.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.www, src1.xyz MAD temp[1].w, src0.w, src1.w, src2.w 23: BEGIN_TEX; 24: TEX temp[0], temp[6].xy__, 2D[0]; 25: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz MAD temp[1].w, src0.w, src1.z, src1.w 26: BEGIN_TEX; 27: TEX temp[0], temp[7].xy__, 2D[0]; 28: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.yyy, src2.xyz MAD temp[1].w, src0.w, src1.y, src1.w 29: BEGIN_TEX; 30: TEX temp[0], temp[8].xy__, 2D[0]; 31: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD color[0].w, src0.w, src1.x, src1.w r300compiler error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections pc=16************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000000) 0: xyz: t7 c1 t0 -> t8.xy (01a00847) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c1.xyz 0.0 op: 00050200 w: t7.x t7.x t7.x op: 00000000 r300 FP: Compiler Error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections Using a dummy shader instead. If there's an 'unknown opcode' message, please file a bug report and attach this log. r300: Initial fragment program FRAG DCL OUT[0], COLOR IMM FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: MOV OUT[0], IMM[0].xxxy 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after pair translate # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 pc=17************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: 1.0 1.0 0.0 op: 00040891 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0] DCL CONST[2..3] DCL TEMP[0..1] IMM FLT32 { 0.2990, 0.5870, 0.1140, 0.5000} 0: TEX TEMP[0], IN[1], SAMP[0], RECT 1: MUL TEMP[1], TEMP[0], CONST[0].yyyy 2: TEX TEMP[0], IN[0], SAMP[1], RECT 3: MAD TEMP[0], TEMP[0], CONST[0].xxxx, TEMP[1] 4: DP3 TEMP[1].x, TEMP[0], IMM[0] 5: ADD TEMP[0], TEMP[0], -TEMP[1].xxxx 6: MAD TEMP[0], TEMP[0], CONST[2].xxxx, TEMP[1].xxxx 7: ADD TEMP[0], TEMP[0], -IMM[0].wwww 8: MUL TEMP[0], TEMP[0], CONST[2].yyyy 9: ADD TEMP[0], TEMP[0], IMM[0].wwww 10: MUL OUT[0], TEMP[0], CONST[3] 11: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[2], input[1], const[5]; 1: TEX temp[0], temp[2], 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3], input[0], const[6]; 4: TEX temp[0], temp[3], 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0], const[4]; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -const[4].wwww; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], const[4].wwww; 12: MUL output[0], temp[0], const[3]; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[5].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[6].xy__; 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0].xyz_, const[4].xyz_; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -const[4].wwww; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], const[4].wwww; 12: MUL output[0], temp[0], const[3]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[5].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[6].xy__; 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0].xyz_, const[4].xyz_; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -none.HHHH; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], none.HHHH; 12: MUL output[0], temp[0], const[3]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[5].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[6].xy__; 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0].xyz_, const[4].xyz_; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -none.HHHH; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], none.HHHH; 12: MUL output[0], temp[0], const[3]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[5] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 3: src0.xyz = input[0], src1.xyz = const[6] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[0].w, src0.w, src1.x, src1.w 6: src0.xyz = temp[0], src1.xyz = const[4] DP3 temp[1].x, src0.xyz, src1.xyz 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xxx MAD temp[0].w, src0.w, src0.1, -src1.x 8: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xxx MAD temp[0].w, src0.w, src1.x, src2.x 9: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH MAD temp[0].w, src0.w, src0.1, -src0.H 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[0].w, src0.w, src1.y, src0.0 11: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src0.HHH MAD temp[0].w, src0.w, src0.1, src0.H 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] 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: src0.xyz = input[0], src1.xyz = const[6] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = input[1], src1.xyz = const[5] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 2: BEGIN_TEX; 3: TEX temp[0], temp[2].xy__, 2D[0]; 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 5: BEGIN_TEX; 6: TEX temp[0], temp[3].xy__, 2D[1]; 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[0].w, src0.w, src1.x, src1.w 8: src0.xyz = temp[0], src1.xyz = const[4] DP3 temp[1].x, src0.xyz, src1.xyz 9: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xxx MAD temp[0].w, src0.w, src0.1, -src1.x 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xxx MAD temp[0].w, src0.w, src1.x, src2.x 11: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH MAD temp[0].w, src0.w, src0.1, -src0.H 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[0].w, src0.w, src1.y, src0.0 13: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src0.HHH MAD temp[0].w, src0.w, src0.1, src0.H 14: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[0], src1.xyz = const[6] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[0].xy, src0.xy_, src1.xy_, src0.000 2: BEGIN_TEX; 3: TEX temp[0], temp[0].xy__, 2D[0]; 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 5: BEGIN_TEX; 6: TEX temp[0], temp[2].xy__, 2D[1]; 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[0].w, src0.w, src1.x, src1.w 8: src0.xyz = temp[0], src1.xyz = const[4] DP3 temp[1].x, src0.xyz, src1.xyz 9: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xxx MAD temp[0].w, src0.w, src0.1, -src1.x 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xxx MAD temp[0].w, src0.w, src1.x, src2.x 11: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH MAD temp[0].w, src0.w, src0.1, -src0.H 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[0].w, src0.w, src1.y, src0.0 13: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src0.HHH MAD temp[0].w, src0.w, src0.1, src0.H 14: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 pc=18************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 0 (code_addr: 00000040) 0: xyz: t0 c6 t0 -> t2.xy (01880980) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c6.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 1: xyz: t1 c5 t0 -> t0.xy (01800941) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c5.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 2, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000002) TEX: TEX t0, t0, texture[0] (00008000) 2: xyz: t0 c0 t0 -> t1.xyz (03840800) w: t0 t0 t0 -> t1.w (00840000) xyz: t0.xyz c0.yyy 0.0 op: 00050300 w: t0.w c0.y 0.0 op: 00040209 NODE 2: alu_offset: 3, tex_offset: 1, alu_end: 7, tex_end: 0 (code_addr: 004011c3) TEX: TEX t0, t2, texture[1] (00008802) 3: xyz: t0 c0 t1 -> t0.xyz (03801800) w: t0 t1 t0 -> t0.w (00800040) xyz: t0.xyz c0.xxx t1.xyz op: 00020280 w: t0.w c0.x t1.w op: 00028189 4: xyz: t0 c4 t0 -> t1.x (00840900) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c4.xyz t0.xxx op: 00804200 w: t0.x t0.x t0.x op: 00000000 5: xyz: t0 t1 t0 -> t0.xyz (03800040) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz 1.0 -t1.xxx op: 00094a80 w: t0.w 1.0 -t1.x op: 0008c889 6: xyz: t0 c2 t1 -> t0.xyz (03801880) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz c2.xxx t1.xxx op: 00024280 w: t0.w c2.x t1.x op: 00018189 7: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz 1.0 -0.5 op: 000d8a80 w: t0.w 1.0 -0.5 op: 000c8889 8: xyz: t0 c2 t0 -> t0.xyz (03800880) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz c2.yyy 0.0 op: 00050300 w: t0.w c2.y 0.0 op: 00040209 9: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz 1.0 0.5 op: 00058a80 w: t0.w 1.0 0.5 op: 00048889 10: xyz: t0 c3 t0 -> o0.xyz (1c0008c0) w: t0 c3 t0 -> o0.w (010008c0) xyz: t0.xyz c3.xyz 0.0 op: 00050200 w: t0.w c3.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0] DCL CONST[2..3] DCL TEMP[0..1] IMM FLT32 { 0.2990, 0.5870, 0.1140, 0.5000} 0: TEX TEMP[0], IN[1], SAMP[0], RECT 1: MUL TEMP[1], TEMP[0], CONST[0].yyyy 2: TEX TEMP[0], IN[0], SAMP[1], RECT 3: MAD TEMP[0], TEMP[0], CONST[0].xxxx, TEMP[1] 4: DP3 TEMP[1].x, TEMP[0], IMM[0] 5: ADD TEMP[0], TEMP[0], -TEMP[1].xxxx 6: MAD TEMP[0], TEMP[0], CONST[2].xxxx, TEMP[1].xxxx 7: ADD TEMP[0], TEMP[0], -IMM[0].wwww 8: MUL TEMP[0], TEMP[0], CONST[2].yyyy 9: ADD TEMP[0], TEMP[0], IMM[0].wwww 10: MUL OUT[0], TEMP[0], CONST[3] 11: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], RECT[0]; 1: MUL temp[1], temp[0], const[0].yyyy; 2: TEX temp[0], input[0], RECT[1]; 3: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 4: DP3 temp[1].x, temp[0], const[4]; 5: ADD temp[0], temp[0], -temp[1].xxxx; 6: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 7: ADD temp[0], temp[0], -const[4].wwww; 8: MUL temp[0], temp[0], const[2].yyyy; 9: ADD temp[0], temp[0], const[4].wwww; 10: MUL output[0], temp[0], const[3]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[2], input[1], const[5]; 1: TEX temp[0], temp[2], 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3], input[0], const[6]; 4: TEX temp[0], temp[3], 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0], const[4]; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -const[4].wwww; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], const[4].wwww; 12: MUL output[0], temp[0], const[3]; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[5].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[6].xy__; 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0].xyz_, const[4].xyz_; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -const[4].wwww; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], const[4].wwww; 12: MUL output[0], temp[0], const[3]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[5].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[6].xy__; 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0].xyz_, const[4].xyz_; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -none.HHHH; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], none.HHHH; 12: MUL output[0], temp[0], const[3]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[2].xy, input[1].xy__, const[5].xy__; 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: MUL temp[1], temp[0], const[0].yyyy; 3: MUL temp[3].xy, input[0].xy__, const[6].xy__; 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: MAD temp[0], temp[0], const[0].xxxx, temp[1]; 6: DP3 temp[1].x, temp[0].xyz_, const[4].xyz_; 7: ADD temp[0], temp[0], -temp[1].xxxx; 8: MAD temp[0], temp[0], const[2].xxxx, temp[1].xxxx; 9: ADD temp[0], temp[0], -none.HHHH; 10: MUL temp[0], temp[0], const[2].yyyy; 11: ADD temp[0], temp[0], none.HHHH; 12: MUL output[0], temp[0], const[3]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[5] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 1: TEX temp[0], temp[2].xy__, 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 3: src0.xyz = input[0], src1.xyz = const[6] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 4: TEX temp[0], temp[3].xy__, 2D[1]; 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[0].w, src0.w, src1.x, src1.w 6: src0.xyz = temp[0], src1.xyz = const[4] DP3 temp[1].x, src0.xyz, src1.xyz 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xxx MAD temp[0].w, src0.w, src0.1, -src1.x 8: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xxx MAD temp[0].w, src0.w, src1.x, src2.x 9: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH MAD temp[0].w, src0.w, src0.1, -src0.H 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[0].w, src0.w, src1.y, src0.0 11: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src0.HHH MAD temp[0].w, src0.w, src0.1, src0.H 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] 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: src0.xyz = input[0], src1.xyz = const[6] MAD temp[3].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = input[1], src1.xyz = const[5] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 2: BEGIN_TEX; 3: TEX temp[0], temp[2].xy__, 2D[0]; 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 5: BEGIN_TEX; 6: TEX temp[0], temp[3].xy__, 2D[1]; 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[0].w, src0.w, src1.x, src1.w 8: src0.xyz = temp[0], src1.xyz = const[4] DP3 temp[1].x, src0.xyz, src1.xyz 9: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xxx MAD temp[0].w, src0.w, src0.1, -src1.x 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xxx MAD temp[0].w, src0.w, src1.x, src2.x 11: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH MAD temp[0].w, src0.w, src0.1, -src0.H 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[0].w, src0.w, src1.y, src0.0 13: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src0.HHH MAD temp[0].w, src0.w, src0.1, src0.H 14: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[0], src1.xyz = const[6] MAD temp[2].xy, src0.xy_, src1.xy_, src0.000 1: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[0].xy, src0.xy_, src1.xy_, src0.000 2: BEGIN_TEX; 3: TEX temp[0], temp[0].xy__, 2D[0]; 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[1].w, src0.w, src1.y, src0.0 5: BEGIN_TEX; 6: TEX temp[0], temp[2].xy__, 2D[1]; 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xyz MAD temp[0].w, src0.w, src1.x, src1.w 8: src0.xyz = temp[0], src1.xyz = const[4] DP3 temp[1].x, src0.xyz, src1.xyz 9: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xxx MAD temp[0].w, src0.w, src0.1, -src1.x 10: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2], src2.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src1.xxx, src2.xxx MAD temp[0].w, src0.w, src1.x, src2.x 11: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH MAD temp[0].w, src0.w, src0.1, -src0.H 12: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[2] MAD temp[0].xyz, src0.xyz, src1.yyy, src0.000 MAD temp[0].w, src0.w, src1.y, src0.0 13: src0.xyz = temp[0], src0.w = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src0.HHH MAD temp[0].w, src0.w, src0.1, src0.H 14: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[3], src1.w = const[3] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 pc=19************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 0 (code_addr: 00000040) 0: xyz: t0 c6 t0 -> t2.xy (01880980) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c6.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 1: xyz: t1 c5 t0 -> t0.xy (01800941) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c5.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 2, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000002) TEX: TEX t0, t0, texture[0] (00008000) 2: xyz: t0 c0 t0 -> t1.xyz (03840800) w: t0 t0 t0 -> t1.w (00840000) xyz: t0.xyz c0.yyy 0.0 op: 00050300 w: t0.w c0.y 0.0 op: 00040209 NODE 2: alu_offset: 3, tex_offset: 1, alu_end: 7, tex_end: 0 (code_addr: 004011c3) TEX: TEX t0, t2, texture[1] (00008802) 3: xyz: t0 c0 t1 -> t0.xyz (03801800) w: t0 t1 t0 -> t0.w (00800040) xyz: t0.xyz c0.xxx t1.xyz op: 00020280 w: t0.w c0.x t1.w op: 00028189 4: xyz: t0 c4 t0 -> t1.x (00840900) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c4.xyz t0.xxx op: 00804200 w: t0.x t0.x t0.x op: 00000000 5: xyz: t0 t1 t0 -> t0.xyz (03800040) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz 1.0 -t1.xxx op: 00094a80 w: t0.w 1.0 -t1.x op: 0008c889 6: xyz: t0 c2 t1 -> t0.xyz (03801880) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz c2.xxx t1.xxx op: 00024280 w: t0.w c2.x t1.x op: 00018189 7: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz 1.0 -0.5 op: 000d8a80 w: t0.w 1.0 -0.5 op: 000c8889 8: xyz: t0 c2 t0 -> t0.xyz (03800880) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz c2.yyy 0.0 op: 00050300 w: t0.w c2.y 0.0 op: 00040209 9: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> t0.w (00800000) xyz: t0.xyz 1.0 0.5 op: 00058a80 w: t0.w 1.0 0.5 op: 00048889 10: xyz: t0 c3 t0 -> o0.xyz (1c0008c0) w: t0 c3 t0 -> o0.w (010008c0) xyz: t0.xyz c3.xyz 0.0 op: 00050200 w: t0.w c3.w 0.0 op: 00040509 r300: Initial fragment program 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], TEMP[0], IN[0] 2: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[1], input[1], const[0]; 1: TEX temp[0], temp[1], 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[1].xy, input[1].xy__, const[0].xy__; 1: TEX temp[0], temp[1].xy__, 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[1].xy, input[1].xy__, const[0].xy__; 1: TEX temp[0], temp[1].xy__, 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[1].xy, input[1].xy__, const[0].xy__; 1: TEX temp[0], temp[1].xy__, 2D[0]; 2: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[0] MAD temp[1].xy, src0.xy_, src1.xy_, src0.000 1: TEX temp[0], temp[1].xy__, 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[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: src0.xyz = input[1], src1.xyz = const[0] MAD temp[1].xy, src0.xy_, src1.xy_, src0.000 1: BEGIN_TEX; 2: TEX temp[0], temp[1].xy__, 2D[0]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[1], src1.xyz = const[0] MAD temp[1].xy, src0.xy_, src1.xy_, src0.000 1: BEGIN_TEX; 2: TEX temp[1], temp[1].xy__, 2D[0]; 3: src0.xyz = temp[1], src0.w = temp[1], 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 pc=20************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000000) 0: xyz: t1 c0 t0 -> t1.xy (01840801) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c0.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 1, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400001) TEX: TEX t1, t1, texture[0] (00008041) 1: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL TEMP[0..1] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[0], TEMP[0], TEMP[1] 3: MUL OUT[0], TEMP[0], IN[0] 4: 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], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after emulate 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], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # 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], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # 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], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # 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], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: MUL temp[0], temp[0], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: MUL temp[0], temp[0], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: MUL temp[0], temp[0], temp[1]; 3: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] 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 = input[0], src1.w = input[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[1], input[2].xy__, 2D[1]; 2: TEX temp[0], input[1].xy__, 2D[0]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] 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 = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], temp[2].xy__, 2D[1]; 2: TEX temp[1], temp[1].xy__, 2D[0]; 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[2], src1.w = temp[2] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[1], src0.w = temp[1], 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 pc=21************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 1 (code_addr: 00420040) TEX: TEX t2, t2, texture[1] (00008882) TEX t1, t1, texture[0] (00008041) 0: xyz: t1 t2 t0 -> t1.xyz (03840081) w: t1 t2 t0 -> t1.w (00840081) xyz: t1.xyz t2.xyz 0.0 op: 00050200 w: t1.w t2.w 0.0 op: 00040509 1: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0] IMM FLT32 { 1.0000, 0.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: SUB TEMP[0], TEMP[0], IMM[0].xxxx 2: MAD OUT[0].xyz, TEMP[0], IN[0].wwww, IMM[0].xxxx 3: MOV OUT[0].w, IMM[0].xxxx 4: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: SUB temp[0], temp[0], temp[0].1111; 2: MAD output[0].xyz, temp[0], input[0].wwww, temp[0].1111; 3: MOV output[0].w, temp[0].1111; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: SUB temp[0], temp[0], temp[0].1111; 2: MAD output[0].xyz, temp[0], input[0].wwww, temp[0].1111; 3: MOV output[0].w, temp[0].1111; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: SUB temp[0], temp[0], temp[0].1111; 2: MAD output[0].xyz, temp[0], input[0].wwww, temp[0].1111; 3: MOV output[0].w, temp[0].1111; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: ADD temp[0], temp[0], -temp[0].1111; 2: MAD output[0].xyz, temp[0], input[0].wwww, temp[0].1111; 3: MOV output[0].w, temp[0].1111; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: ADD temp[0], temp[0], -temp[0].1111; 2: MAD output[0].xyz, temp[0], input[0].wwww, temp[0].1111; 3: MOV output[0].w, temp[0].1111; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: ADD temp[0].xyz, temp[0].xyz_, -temp[0].111_; 2: MAD output[0].xyz, temp[0].xyz_, input[0].www_, temp[0].111_; 3: MOV output[0].w, temp[0].___1; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: ADD temp[0].xyz, temp[0].xyz_, -temp[0].111_; 2: MAD output[0].xyz, temp[0].xyz_, input[0].www_, temp[0].111_; 3: MOV output[0].w, temp[0].___1; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: ADD temp[0].xyz, temp[0].xyz_, -temp[0].111_; 2: MAD output[0].xyz, temp[0].xyz_, input[0].www_, temp[0].111_; 3: MOV output[0].w, temp[0].___1; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: src0.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.111 2: src0.xyz = temp[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.www, src0.111 3: MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0].xyz, input[1].xy__, 2D[0]; 2: src0.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.111 MAD color[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[0], src0.w = input[0] MAD color[0].xyz, src0.xyz, src0.www, src0.111 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1].xyz, temp[1].xy__, 2D[0]; 2: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, -src0.111 MAD color[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[1], src0.w = temp[0] MAD color[0].xyz, src0.xyz, src0.www, src0.111 pc=22************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 0 (code_addr: 00400040) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t0 t0 t0 -> o0.w (01000000) xyz: t1.xyz 1.0 -1.0 op: 000d4a80 w: 1.0 1.0 0.0 op: 00040891 1: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t0.www 1.0 op: 00054600 w: t1.x t1.x t1.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL TEMP[0] IMM FLT32 { 1.0000, 0.0000, 0.0000, 0.0000} 0: TEX TEMP[0].xyz, IN[1], SAMP[0], 2D 1: MOV TEMP[0].w, IMM[0].xxxx 2: MUL OUT[0], TEMP[0], IN[0] 3: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0].xyz, input[1], 2D[0]; 1: MOV temp[0].w, temp[0].1111; 2: MUL output[0], temp[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0].xyz, input[1], 2D[0]; 1: MOV temp[0].w, temp[0].1111; 2: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0].xyz, input[1], 2D[0]; 1: MOV temp[0].w, temp[0].1111; 2: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0].xyz, input[1], 2D[0]; 1: MOV temp[0].w, temp[0].1111; 2: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[1], input[1], 2D[0]; 1: MOV temp[0].xyz, temp[1]; 2: MOV temp[0].w, temp[0].1111; 3: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[1].xyz, input[1].xy__, 2D[0]; 1: MOV temp[0].xyz, temp[1].xyz_; 2: MOV temp[0].w, temp[0].___1; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[1].xyz, input[1].xy__, 2D[0]; 1: MOV temp[0].xyz, temp[1].xyz_; 2: MOV temp[0].w, temp[0].___1; 3: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[1].xyz, input[1].xy__, 2D[0]; 1: MOV temp[0].xyz, temp[1].xyz_; 2: MOV temp[0].w, temp[0].___1; 3: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[1].xyz, input[1].xy__, 2D[0]; 1: src0.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, src0.000 2: MAD temp[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[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[1].xyz, input[1].xy__, 2D[0]; 2: src0.xyz = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, src0.000 MAD temp[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1].xyz, temp[1].xy__, 2D[0]; 2: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, src0.000 MAD temp[1].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], 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 pc=23************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 0 (code_addr: 00400040) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t0 t0 t0 -> t1.w (00840000) xyz: t1.xyz 1.0 0.0 op: 00050a80 w: 1.0 1.0 0.0 op: 00040891 1: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR, LINEAR DCL IN[2], COLOR[1], LINEAR DCL IN[3], GENERIC[2], PERSPECTIVE DCL IN[4], GENERIC[3], PERSPECTIVE DCL IN[5], GENERIC[4], PERSPECTIVE DCL IN[6], GENERIC[6], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[4..5] DCL CONST[1..3] DCL TEMP[0..4] IMM FLT32 { 0.0625, 1.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[5], IN[0] 2: TXP TEMP[1], IN[4], SAMP[0], 2D 3: MUL TEMP[2].xy, TEMP[0], IMM[0].xxxx 4: TEX TEMP[2], TEMP[2], SAMP[1], 2D 5: SLT TEMP[2].w, IN[6].wwww, TEMP[2].wwww 6: KIL -TEMP[2].wwww 7: TEX TEMP[2], IN[3], SAMP[2], 2D 8: MUL TEMP[1], TEMP[1], TEMP[2] 9: TEX TEMP[2], IN[5], SAMP[3], 2D 10: MUL TEMP[2].xyz, TEMP[2], IN[1] 11: MUL TEMP[3], TEMP[2], CONST[1] 12: SUB TEMP[4].w, TEMP[2].wwww, CONST[2] 13: KIL TEMP[4].wwww 14: MUL TEMP[3], TEMP[1], TEMP[3] 15: MAD TEMP[3], TEMP[2], CONST[3], TEMP[3] 16: LRP OUT[0].xyz, IN[2].xxxx, CONST[4], TEMP[3] 17: MOV OUT[0].w, IMM[0].yyyy 18: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[5].w, input[0].wwww; 1: MUL temp[5].xyz, input[0], temp[5].wwww; 2: MAD temp[5].xyz, temp[5].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[5]; 4: SUB temp[0].y, const[5], temp[5]; 5: TXP temp[1], input[4], 2D[0]; 6: MUL temp[2].xy, temp[0], const[6].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: SLT temp[2].w, input[6].wwww, temp[2].wwww; 9: KIL -temp[2].wwww; 10: TEX temp[2], input[3], 2D[2]; 11: MUL temp[1], temp[1], temp[2]; 12: TEX temp[2], input[5], 2D[3]; 13: MUL temp[2].xyz, temp[2], input[1]; 14: MUL temp[3], temp[2], const[1]; 15: SUB temp[4].w, temp[2].wwww, const[2]; 16: KIL temp[4].wwww; 17: MUL temp[3], temp[1], temp[3]; 18: MAD temp[3], temp[2], const[3], temp[3]; 19: LRP output[0].xyz, input[2].xxxx, const[4], temp[3]; 20: MOV output[0].w, const[6].yyyy; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[5].w, input[0].wwww; 1: MUL temp[5].xyz, input[0], temp[5].wwww; 2: MAD temp[5].xyz, temp[5].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[5]; 4: SUB temp[0].y, const[5], temp[5]; 5: TXP temp[1], input[4], 2D[0]; 6: MUL temp[2].xy, temp[0], const[6].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: SLT temp[2].w, input[6].wwww, temp[2].wwww; 9: KIL -temp[2].wwww; 10: TEX temp[2], input[3], 2D[2]; 11: MUL temp[1], temp[1], temp[2]; 12: TEX temp[2], input[5], 2D[3]; 13: MUL temp[2].xyz, temp[2], input[1]; 14: MUL temp[3], temp[2], const[1]; 15: SUB temp[4].w, temp[2].wwww, const[2]; 16: KIL temp[4].wwww; 17: MUL temp[3], temp[1], temp[3]; 18: MAD temp[3], temp[2], const[3], temp[3]; 19: LRP output[0].xyz, input[2].xxxx, const[4], temp[3]; 20: MOV output[0].w, const[6].yyyy; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[5].w, input[0].wwww; 1: MUL temp[5].xyz, input[0], temp[5].wwww; 2: MAD temp[5].xyz, temp[5].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[5]; 4: SUB temp[0].y, const[5], temp[5]; 5: TXP temp[1], input[4], 2D[0]; 6: MUL temp[2].xy, temp[0], const[6].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: SLT temp[2].w, input[6].wwww, temp[2].wwww; 9: KIL -temp[2].wwww; 10: TEX temp[2], input[3], 2D[2]; 11: MUL temp[1], temp[1], temp[2]; 12: TEX temp[2], input[5], 2D[3]; 13: MUL temp[2].xyz, temp[2], input[1]; 14: MUL temp[3], temp[2], const[1]; 15: SUB temp[4].w, temp[2].wwww, const[2]; 16: KIL temp[4].wwww; 17: MUL temp[3], temp[1], temp[3]; 18: MAD temp[3], temp[2], const[3], temp[3]; 19: LRP output[0].xyz, input[2].xxxx, const[4], temp[3]; 20: MOV output[0].w, const[6].yyyy; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[5].w, input[0].wwww; 1: MUL temp[5].xyz, input[0], temp[5].wwww; 2: MAD temp[5].xyz, temp[5].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[5]; 4: ADD temp[0].y, const[5], -temp[5]; 5: TXP temp[1], input[4], 2D[0]; 6: MUL temp[2].xy, temp[0], const[6].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: ADD temp[6], input[6].wwww, -temp[2].wwww; 9: CMP temp[2].w, temp[6], none.1111, none.0000; 10: KIL -temp[2].wwww; 11: TEX temp[2], input[3], 2D[2]; 12: MUL temp[1], temp[1], temp[2]; 13: TEX temp[2], input[5], 2D[3]; 14: MUL temp[2].xyz, temp[2], input[1]; 15: MUL temp[3], temp[2], const[1]; 16: ADD temp[4].w, temp[2].wwww, -const[2]; 17: KIL temp[4].wwww; 18: MUL temp[3], temp[1], temp[3]; 19: MAD temp[3], temp[2], const[3], temp[3]; 20: ADD temp[7], const[4], -temp[3]; 21: MAD output[0].xyz, input[2].xxxx, temp[7], temp[3]; 22: MOV output[0].w, const[6].yyyy; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[5].w, input[0].wwww; 1: MUL temp[5].xyz, input[0], temp[5].wwww; 2: MAD temp[5].xyz, temp[5].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[5]; 4: ADD temp[0].y, const[5], -temp[5]; 5: TXP temp[1], input[4], 2D[0]; 6: MUL temp[2].xy, temp[0], const[6].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: ADD temp[6], input[6].wwww, -temp[2].wwww; 9: CMP temp[2].w, temp[6], none.1111, none.0000; 10: KIL -temp[2].wwww; 11: TEX temp[2], input[3], 2D[2]; 12: MUL temp[1], temp[1], temp[2]; 13: TEX temp[2], input[5], 2D[3]; 14: MUL temp[2].xyz, temp[2], input[1]; 15: MUL temp[3], temp[2], const[1]; 16: ADD temp[4].w, temp[2].wwww, -const[2]; 17: KIL temp[4].wwww; 18: MUL temp[3], temp[1], temp[3]; 19: MAD temp[3], temp[2], const[3], temp[3]; 20: ADD temp[7], const[4], -temp[3]; 21: MAD output[0].xyz, input[2].xxxx, temp[7], temp[3]; 22: MOV output[0].w, const[6].yyyy; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[5].w, input[0].w___; 1: MUL temp[5].xy, input[0].xy__, temp[5].ww__; 2: MAD temp[5].xy, temp[5].xy__, const[7].xy__, const[8].xy__; 3: MOV temp[0].x, temp[5].x___; 4: ADD temp[0].y, const[5]._y__, -temp[5]._y__; 5: TXP temp[1].xyz, input[4].xy_w, 2D[0]; 6: MUL temp[2].xy, temp[0].xy__, const[6].xx__; 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: ADD temp[6].w, input[6].___w, -temp[2].___w; 9: CMP temp[2].w, temp[6].___w, none.___1, none.___0; 10: KIL -temp[2].wwww; 11: TEX temp[2].xyz, input[3].xy__, 2D[2]; 12: MUL temp[1].xyz, temp[1].xyz_, temp[2].xyz_; 13: TEX temp[2], input[5].xy__, 2D[3]; 14: MUL temp[2].xyz, temp[2].xyz_, input[1].xyz_; 15: MUL temp[3].xyz, temp[2].xyz_, const[1].xyz_; 16: ADD temp[4].w, temp[2].___w, -const[2].___w; 17: KIL temp[4].wwww; 18: MUL temp[3].xyz, temp[1].xyz_, temp[3].xyz_; 19: MAD temp[3].xyz, temp[2].xyz_, const[3].xyz_, temp[3].xyz_; 20: ADD temp[7].xyz, const[4].xyz_, -temp[3].xyz_; 21: MAD output[0].xyz, input[2].xxx_, temp[7].xyz_, temp[3].xyz_; 22: MOV output[0].w, const[6].___y; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[5].w, input[0].w___; 1: MUL temp[5].xy, input[0].xy__, temp[5].ww__; 2: MAD temp[5].xy, temp[5].xy__, const[7].xy__, const[8].xy__; 3: MOV temp[0].x, temp[5].x___; 4: ADD temp[0].y, const[5]._y__, -temp[5]._y__; 5: TXP temp[1].xyz, input[4].xy_w, 2D[0]; 6: MUL temp[2].xy, temp[0].xy__, const[6].xx__; 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: ADD temp[6].w, input[6].___w, -temp[2].___w; 9: CMP temp[2].w, temp[6].___w, none.___1, none.___0; 10: KIL -temp[2].wwww; 11: TEX temp[2].xyz, input[3].xy__, 2D[2]; 12: MUL temp[1].xyz, temp[1].xyz_, temp[2].xyz_; 13: TEX temp[2], input[5].xy__, 2D[3]; 14: MUL temp[2].xyz, temp[2].xyz_, input[1].xyz_; 15: MUL temp[3].xyz, temp[2].xyz_, const[1].xyz_; 16: ADD temp[4].w, temp[2].___w, -const[2].___w; 17: KIL temp[4].wwww; 18: MUL temp[3].xyz, temp[1].xyz_, temp[3].xyz_; 19: MAD temp[3].xyz, temp[2].xyz_, const[3].xyz_, temp[3].xyz_; 20: ADD temp[7].xyz, const[4].xyz_, -temp[3].xyz_; 21: MAD output[0].xyz, input[2].xxx_, temp[7].xyz_, temp[3].xyz_; 22: MOV output[0].w, none.___1; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[5].w, input[0].w___; 1: MUL temp[5].xy, input[0].xy__, temp[5].ww__; 2: MAD temp[5].xy, temp[5].xy__, const[7].xy__, const[8].xy__; 3: MOV temp[0].x, temp[5].x___; 4: ADD temp[0].y, const[5]._y__, -temp[5]._y__; 5: TXP temp[1].xyz, input[4].xy_w, 2D[0]; 6: MUL temp[2].xy, temp[0].xy__, const[6].xx__; 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: ADD temp[6].w, input[6].___w, -temp[2].___w; 9: CMP temp[2].w, temp[6].___w, none.___1, none.___0; 10: MOV temp[8], -temp[2].wwww; 11: KIL temp[8]; 12: TEX temp[2].xyz, input[3].xy__, 2D[2]; 13: MUL temp[1].xyz, temp[1].xyz_, temp[2].xyz_; 14: TEX temp[2], input[5].xy__, 2D[3]; 15: MUL temp[2].xyz, temp[2].xyz_, input[1].xyz_; 16: MUL temp[3].xyz, temp[2].xyz_, const[1].xyz_; 17: ADD temp[4].w, temp[2].___w, -const[2].___w; 18: MOV temp[9], temp[4].wwww; 19: KIL temp[9]; 20: MUL temp[3].xyz, temp[1].xyz_, temp[3].xyz_; 21: MAD temp[3].xyz, temp[2].xyz_, const[3].xyz_, temp[3].xyz_; 22: ADD temp[7].xyz, const[4].xyz_, -temp[3].xyz_; 23: MAD output[0].xyz, input[2].xxx_, temp[7].xyz_, temp[3].xyz_; 24: MOV output[0].w, none.___1; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[5].w, src0.w 1: src0.xyz = input[0], src0.w = temp[5] MAD temp[5].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[5], src1.xyz = const[7], src2.xyz = const[8] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[5] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[5], src1.xyz = temp[5] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TXP temp[1].xyz, input[4].xy_w, 2D[0]; 6: src0.xyz = temp[0], src1.xyz = const[6] MAD temp[2].xy, src0.xy_, src1.xx_, src0.000 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: src0.w = input[6], src1.w = temp[2] MAD temp[6].w, src0.w, src0.1, -src1.w 9: src0.w = temp[6] CMP temp[2].w, src0.0, src0.1, src0.w 10: src0.w = temp[2] MAD temp[8].xyz, -src0.www, src0.111, src0.000 MAD temp[8].w, -src0.w, src0.1, src0.0 11: KIL temp[8]; 12: TEX temp[2].xyz, input[3].xy__, 2D[2]; 13: src0.xyz = temp[1], src1.xyz = temp[2] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 14: TEX temp[2], input[5].xy__, 2D[3]; 15: src0.xyz = temp[2], src1.xyz = input[1] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 16: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 17: src0.w = temp[2], src1.w = const[2] MAD temp[4].w, src0.w, src0.1, -src1.w 18: src0.w = temp[4] MAD temp[9].xyz, src0.www, src0.111, src0.000 MAD temp[9].w, src0.w, src0.1, src0.0 19: KIL temp[9]; 20: src0.xyz = temp[1], src1.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[2], src1.xyz = const[3], src2.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src2.xyz 22: src0.xyz = const[4], src1.xyz = temp[3] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 23: src0.xyz = input[2], src1.xyz = temp[7], src2.xyz = temp[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 24: MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TXP temp[1].xyz, input[4].xy_w, 2D[0]; 2: MAD color[0].w, src0.1, src0.1, src0.0 3: src0.w = input[0] RCP temp[5].w, src0.w 4: src0.xyz = input[0], src0.w = temp[5] MAD temp[5].xy, src0.xy_, src0.ww_, src0.000 5: src0.xyz = temp[5], src1.xyz = const[7], src2.xyz = const[8] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 6: src0.xyz = const[5], src1.xyz = temp[5] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 7: src0.xyz = temp[5] MAD temp[0].x, src0.x__, src0.111, src0.000 8: src0.xyz = temp[0], src1.xyz = const[6] MAD temp[2].xy, src0.xy_, src1.xx_, src0.000 9: BEGIN_TEX; 10: TEX temp[2].w, temp[2].xy__, 2D[1]; 11: src0.w = input[6], src1.w = temp[2] MAD temp[6].w, src0.w, src0.1, -src1.w 12: src0.w = temp[6] CMP temp[2].w, src0.0, src0.1, src0.w 13: src0.w = temp[2] MAD temp[8].xyz, -src0.www, src0.111, src0.000 MAD temp[8].w, -src0.w, src0.1, src0.0 14: BEGIN_TEX; 15: KIL temp[8]; 16: TEX temp[2].xyz, input[3].xy__, 2D[2]; 17: src0.xyz = temp[1], src1.xyz = temp[2] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 18: BEGIN_TEX; 19: TEX temp[2], input[5].xy__, 2D[3]; 20: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = input[1], src1.w = const[2] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[4].w, src0.w, src0.1, -src1.w 21: src0.w = temp[4] MAD temp[9].xyz, src0.www, src0.111, src0.000 MAD temp[9].w, src0.w, src0.1, src0.0 22: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 23: src0.xyz = temp[1], src1.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 24: src0.xyz = temp[2], src1.xyz = const[3], src2.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src2.xyz 25: src0.xyz = const[4], src1.xyz = temp[3] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 26: src0.xyz = input[2], src1.xyz = temp[7], src2.xyz = temp[3] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 27: BEGIN_TEX; 28: KIL temp[9]; Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TXP temp[7].xyz, temp[3].xy_w, 2D[0]; 2: MAD color[0].w, src0.1, src0.1, src0.0 3: src0.w = temp[6] RCP temp[8].w, src0.w 4: src0.xyz = temp[6], src0.w = temp[8] MAD temp[8].xy, src0.xy_, src0.ww_, src0.000 5: src0.xyz = temp[8], src1.xyz = const[7], src2.xyz = const[8] MAD temp[8].xy, src0.xy_, src1.xy_, src2.xy_ 6: src0.xyz = const[5], src1.xyz = temp[8] MAD temp[3].y, src0._y_, src0.111, -src1._y_ 7: src0.xyz = temp[8] MAD temp[3].x, src0.x__, src0.111, src0.000 8: src0.xyz = temp[3], src1.xyz = const[6] MAD temp[3].xy, src0.xy_, src1.xx_, src0.000 9: BEGIN_TEX; 10: TEX temp[3].w, temp[3].xy__, 2D[1]; 11: src0.w = temp[5], src1.w = temp[3] MAD temp[5].w, src0.w, src0.1, -src1.w 12: src0.w = temp[5] CMP temp[3].w, src0.0, src0.1, src0.w 13: src0.w = temp[3] MAD temp[5].xyz, -src0.www, src0.111, src0.000 MAD temp[5].w, -src0.w, src0.1, src0.0 14: BEGIN_TEX; 15: KIL temp[5]; 16: TEX temp[3].xyz, temp[2].xy__, 2D[2]; 17: src0.xyz = temp[7], src1.xyz = temp[3] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 18: BEGIN_TEX; 19: TEX temp[3], temp[4].xy__, 2D[3]; 20: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[0], src1.w = const[2] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[0].w, src0.w, src0.1, -src1.w 21: src0.w = temp[0] MAD temp[4].xyz, src0.www, src0.111, src0.000 MAD temp[4].w, src0.w, src0.1, src0.0 22: src0.xyz = temp[3], src1.xyz = const[1] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 23: src0.xyz = temp[7], src1.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 24: src0.xyz = temp[3], src1.xyz = const[3], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src2.xyz 25: src0.xyz = const[4], src1.xyz = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 26: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = temp[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 27: BEGIN_TEX; 28: KIL temp[4]; r300compiler error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections pc=24************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000000) TEX: TXP t7, t3, texture[0] (000181c3) 0: xyz: t0 t0 t0 -> (00000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: 1.0 1.0 0.0 op: 00040891 r300 FP: Compiler Error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections Using a dummy shader instead. If there's an 'unknown opcode' message, please file a bug report and attach this log. r300: Initial fragment program FRAG DCL OUT[0], COLOR IMM FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: MOV OUT[0], IMM[0].xxxy 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after pair translate # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 pc=25************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: 1.0 1.0 0.0 op: 00040891 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR, LINEAR DCL IN[2], COLOR[1], LINEAR DCL IN[3], GENERIC[0], PERSPECTIVE DCL IN[4], GENERIC[2], PERSPECTIVE DCL IN[5], GENERIC[3], PERSPECTIVE DCL IN[6], GENERIC[4], PERSPECTIVE DCL IN[7], GENERIC[6], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[5..6] DCL CONST[1] DCL CONST[3..4] DCL TEMP[0..7] IMM FLT32 { 0.0625, 0.3000, 0.5900, 0.1100} IMM FLT32 { 0.3000, 0.5900, 0.1100, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[6], IN[0] 2: TEX TEMP[1], IN[6], SAMP[0], 2D 3: MUL TEMP[2].xy, TEMP[0], IMM[0].xxxx 4: TEX TEMP[2], TEMP[2], SAMP[1], 2D 5: SLT TEMP[2].w, IN[7].wwww, TEMP[2].wwww 6: KIL -TEMP[2].wwww 7: MOV TEMP[3], TEMP[2] 8: SUB TEMP[2].w, TEMP[1].wwww, CONST[1] 9: KIL TEMP[2].wwww 10: TXP TEMP[2], IN[5], SAMP[2], 2D 11: MUL TEMP[4], IN[3].zzzz, TEMP[2] 12: MAX TEMP[4], TEMP[4], IMM[1].wwww 13: TEX TEMP[2].x, IN[4], SAMP[3], 2D 14: MUL TEMP[4], TEMP[4], TEMP[2].xxxx 15: MUL TEMP[5], TEMP[1], IN[1] 16: MUL TEMP[6], TEMP[5], CONST[3] 17: MUL TEMP[7], TEMP[4], TEMP[6] 18: MAD TEMP[7], TEMP[5], CONST[4], TEMP[7] 19: MOV OUT[0].w, IMM[1].wwww 20: LRP OUT[0].xyz, IN[2].xxxx, CONST[5], TEMP[7] 21: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[8].w, input[0].wwww; 1: MUL temp[8].xyz, input[0], temp[8].wwww; 2: MAD temp[8].xyz, temp[8].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[8]; 4: SUB temp[0].y, const[6], temp[8]; 5: TEX temp[1], input[6], 2D[0]; 6: MUL temp[2].xy, temp[0], const[7].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: SLT temp[2].w, input[7].wwww, temp[2].wwww; 9: KIL -temp[2].wwww; 10: MOV temp[3], temp[2]; 11: SUB temp[2].w, temp[1].wwww, const[1]; 12: KIL temp[2].wwww; 13: TXP temp[2], input[5], 2D[2]; 14: MUL temp[4], input[3].zzzz, temp[2]; 15: MAX temp[4], temp[4], const[8].wwww; 16: TEX temp[2].x, input[4], 2D[3]; 17: MUL temp[4], temp[4], temp[2].xxxx; 18: MUL temp[5], temp[1], input[1]; 19: MUL temp[6], temp[5], const[3]; 20: MUL temp[7], temp[4], temp[6]; 21: MAD temp[7], temp[5], const[4], temp[7]; 22: MOV output[0].w, const[8].wwww; 23: LRP output[0].xyz, input[2].xxxx, const[5], temp[7]; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[8].w, input[0].wwww; 1: MUL temp[8].xyz, input[0], temp[8].wwww; 2: MAD temp[8].xyz, temp[8].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[8]; 4: SUB temp[0].y, const[6], temp[8]; 5: TEX temp[1], input[6], 2D[0]; 6: MUL temp[2].xy, temp[0], const[7].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: SLT temp[2].w, input[7].wwww, temp[2].wwww; 9: KIL -temp[2].wwww; 10: MOV temp[3], temp[2]; 11: SUB temp[2].w, temp[1].wwww, const[1]; 12: KIL temp[2].wwww; 13: TXP temp[2], input[5], 2D[2]; 14: MUL temp[4], input[3].zzzz, temp[2]; 15: MAX temp[4], temp[4], const[8].wwww; 16: TEX temp[2].x, input[4], 2D[3]; 17: MUL temp[4], temp[4], temp[2].xxxx; 18: MUL temp[5], temp[1], input[1]; 19: MUL temp[6], temp[5], const[3]; 20: MUL temp[7], temp[4], temp[6]; 21: MAD temp[7], temp[5], const[4], temp[7]; 22: MOV output[0].w, const[8].wwww; 23: LRP output[0].xyz, input[2].xxxx, const[5], temp[7]; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[8].w, input[0].wwww; 1: MUL temp[8].xyz, input[0], temp[8].wwww; 2: MAD temp[8].xyz, temp[8].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[8]; 4: SUB temp[0].y, const[6], temp[8]; 5: TEX temp[1], input[6], 2D[0]; 6: MUL temp[2].xy, temp[0], const[7].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: SLT temp[2].w, input[7].wwww, temp[2].wwww; 9: KIL -temp[2].wwww; 10: MOV temp[3], temp[2]; 11: SUB temp[2].w, temp[1].wwww, const[1]; 12: KIL temp[2].wwww; 13: TXP temp[2], input[5], 2D[2]; 14: MUL temp[4], input[3].zzzz, temp[2]; 15: MAX temp[4], temp[4], const[8].wwww; 16: TEX temp[2].x, input[4], 2D[3]; 17: MUL temp[4], temp[4], temp[2].xxxx; 18: MUL temp[5], temp[1], input[1]; 19: MUL temp[6], temp[5], const[3]; 20: MUL temp[7], temp[4], temp[6]; 21: MAD temp[7], temp[5], const[4], temp[7]; 22: MOV output[0].w, const[8].wwww; 23: LRP output[0].xyz, input[2].xxxx, const[5], temp[7]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[8].w, input[0].wwww; 1: MUL temp[8].xyz, input[0], temp[8].wwww; 2: MAD temp[8].xyz, temp[8].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[8]; 4: ADD temp[0].y, const[6], -temp[8]; 5: TEX temp[1], input[6], 2D[0]; 6: MUL temp[2].xy, temp[0], const[7].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: ADD temp[9], input[7].wwww, -temp[2].wwww; 9: CMP temp[2].w, temp[9], none.1111, none.0000; 10: KIL -temp[2].wwww; 11: MOV temp[3], temp[2]; 12: ADD temp[2].w, temp[1].wwww, -const[1]; 13: KIL temp[2].wwww; 14: TXP temp[2], input[5], 2D[2]; 15: MUL temp[4], input[3].zzzz, temp[2]; 16: MAX temp[4], temp[4], const[8].wwww; 17: TEX temp[2].x, input[4], 2D[3]; 18: MUL temp[4], temp[4], temp[2].xxxx; 19: MUL temp[5], temp[1], input[1]; 20: MUL temp[6], temp[5], const[3]; 21: MUL temp[7], temp[4], temp[6]; 22: MAD temp[7], temp[5], const[4], temp[7]; 23: MOV output[0].w, const[8].wwww; 24: ADD temp[10], const[5], -temp[7]; 25: MAD output[0].xyz, input[2].xxxx, temp[10], temp[7]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[8].w, input[0].wwww; 1: MUL temp[8].xyz, input[0], temp[8].wwww; 2: MAD temp[8].xyz, temp[8].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[8]; 4: ADD temp[0].y, const[6], -temp[8]; 5: TEX temp[1], input[6], 2D[0]; 6: MUL temp[2].xy, temp[0], const[7].xxxx; 7: TEX temp[2], temp[2], 2D[1]; 8: ADD temp[9], input[7].wwww, -temp[2].wwww; 9: CMP temp[2].w, temp[9], none.1111, none.0000; 10: KIL -temp[2].wwww; 11: MOV temp[3], temp[2]; 12: ADD temp[2].w, temp[1].wwww, -const[1]; 13: KIL temp[2].wwww; 14: TXP temp[2], input[5], 2D[2]; 15: MUL temp[4], input[3].zzzz, temp[2]; 16: MAX temp[4], temp[4], const[8].wwww; 17: TEX temp[11], input[4], 2D[3]; 18: MOV temp[2].x, temp[11]; 19: MUL temp[4], temp[4], temp[2].xxxx; 20: MUL temp[5], temp[1], input[1]; 21: MUL temp[6], temp[5], const[3]; 22: MUL temp[7], temp[4], temp[6]; 23: MAD temp[7], temp[5], const[4], temp[7]; 24: MOV output[0].w, const[8].wwww; 25: ADD temp[10], const[5], -temp[7]; 26: MAD output[0].xyz, input[2].xxxx, temp[10], temp[7]; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[8].w, input[0].w___; 1: MUL temp[8].xy, input[0].xy__, temp[8].ww__; 2: MAD temp[8].xy, temp[8].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[8].x___; 4: ADD temp[0].y, const[6]._y__, -temp[8]._y__; 5: TEX temp[1], input[6].xy__, 2D[0]; 6: MUL temp[2].xy, temp[0].xy__, const[7].xx__; 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: ADD temp[9].w, input[7].___w, -temp[2].___w; 9: CMP temp[2].w, temp[9].___w, none.___1, none.___0; 10: KIL -temp[2].wwww; 11: ADD temp[2].w, temp[1].___w, -const[1].___w; 12: KIL temp[2].wwww; 13: TXP temp[2].xyz, input[5].xy_w, 2D[2]; 14: MUL temp[4].xyz, input[3].zzz_, temp[2].xyz_; 15: MAX temp[4].xyz, temp[4].xyz_, const[8].www_; 16: TEX temp[11].x, input[4].xy__, 2D[3]; 17: MOV temp[2].x, temp[11].x___; 18: MUL temp[4].xyz, temp[4].xyz_, temp[2].xxx_; 19: MUL temp[5].xyz, temp[1].xyz_, input[1].xyz_; 20: MUL temp[6].xyz, temp[5].xyz_, const[3].xyz_; 21: MUL temp[7].xyz, temp[4].xyz_, temp[6].xyz_; 22: MAD temp[7].xyz, temp[5].xyz_, const[4].xyz_, temp[7].xyz_; 23: MOV output[0].w, const[8].___w; 24: ADD temp[10].xyz, const[5].xyz_, -temp[7].xyz_; 25: MAD output[0].xyz, input[2].xxx_, temp[10].xyz_, temp[7].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[8].w, input[0].w___; 1: MUL temp[8].xy, input[0].xy__, temp[8].ww__; 2: MAD temp[8].xy, temp[8].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[8].x___; 4: ADD temp[0].y, const[6]._y__, -temp[8]._y__; 5: TEX temp[1], input[6].xy__, 2D[0]; 6: MUL temp[2].xy, temp[0].xy__, const[7].xx__; 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: ADD temp[9].w, input[7].___w, -temp[2].___w; 9: CMP temp[2].w, temp[9].___w, none.___1, none.___0; 10: KIL -temp[2].wwww; 11: ADD temp[2].w, temp[1].___w, -const[1].___w; 12: KIL temp[2].wwww; 13: TXP temp[2].xyz, input[5].xy_w, 2D[2]; 14: MUL temp[4].xyz, input[3].zzz_, temp[2].xyz_; 15: MAX temp[4].xyz, temp[4].xyz_, none.000_; 16: TEX temp[11].x, input[4].xy__, 2D[3]; 17: MUL temp[4].xyz, temp[4].xyz_, temp[11].xxx_; 18: MUL temp[5].xyz, temp[1].xyz_, input[1].xyz_; 19: MUL temp[6].xyz, temp[5].xyz_, const[3].xyz_; 20: MUL temp[7].xyz, temp[4].xyz_, temp[6].xyz_; 21: MAD temp[7].xyz, temp[5].xyz_, const[4].xyz_, temp[7].xyz_; 22: MOV output[0].w, none.___0; 23: ADD temp[10].xyz, const[5].xyz_, -temp[7].xyz_; 24: MAD output[0].xyz, input[2].xxx_, temp[10].xyz_, temp[7].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[8].w, input[0].w___; 1: MUL temp[8].xy, input[0].xy__, temp[8].ww__; 2: MAD temp[8].xy, temp[8].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[8].x___; 4: ADD temp[0].y, const[6]._y__, -temp[8]._y__; 5: TEX temp[1], input[6].xy__, 2D[0]; 6: MUL temp[2].xy, temp[0].xy__, const[7].xx__; 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: ADD temp[9].w, input[7].___w, -temp[2].___w; 9: CMP temp[2].w, temp[9].___w, none.___1, none.___0; 10: MOV temp[3], -temp[2].wwww; 11: KIL temp[3]; 12: ADD temp[2].w, temp[1].___w, -const[1].___w; 13: MOV temp[12], temp[2].wwww; 14: KIL temp[12]; 15: TXP temp[2].xyz, input[5].xy_w, 2D[2]; 16: MUL temp[4].xyz, input[3].zzz_, temp[2].xyz_; 17: MAX temp[4].xyz, temp[4].xyz_, none.000_; 18: TEX temp[11].x, input[4].xy__, 2D[3]; 19: MUL temp[4].xyz, temp[4].xyz_, temp[11].xxx_; 20: MUL temp[5].xyz, temp[1].xyz_, input[1].xyz_; 21: MUL temp[6].xyz, temp[5].xyz_, const[3].xyz_; 22: MUL temp[7].xyz, temp[4].xyz_, temp[6].xyz_; 23: MAD temp[7].xyz, temp[5].xyz_, const[4].xyz_, temp[7].xyz_; 24: MOV output[0].w, none.___0; 25: ADD temp[10].xyz, const[5].xyz_, -temp[7].xyz_; 26: MAD output[0].xyz, input[2].xxx_, temp[10].xyz_, temp[7].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[8].w, src0.w 1: src0.xyz = input[0], src0.w = temp[8] MAD temp[8].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[8], src1.xyz = const[9], src2.xyz = const[10] MAD temp[8].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[8] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[6], src1.xyz = temp[8] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1], input[6].xy__, 2D[0]; 6: src0.xyz = temp[0], src1.xyz = const[7] MAD temp[2].xy, src0.xy_, src1.xx_, src0.000 7: TEX temp[2].w, temp[2].xy__, 2D[1]; 8: src0.w = input[7], src1.w = temp[2] MAD temp[9].w, src0.w, src0.1, -src1.w 9: src0.w = temp[9] CMP temp[2].w, src0.0, src0.1, src0.w 10: src0.w = temp[2] MAD temp[3].xyz, -src0.www, src0.111, src0.000 MAD temp[3].w, -src0.w, src0.1, src0.0 11: KIL temp[3]; 12: src0.w = temp[1], src1.w = const[1] MAD temp[2].w, src0.w, src0.1, -src1.w 13: src0.w = temp[2] MAD temp[12].xyz, src0.www, src0.111, src0.000 MAD temp[12].w, src0.w, src0.1, src0.0 14: KIL temp[12]; 15: TXP temp[2].xyz, input[5].xy_w, 2D[2]; 16: src0.xyz = input[3], src1.xyz = temp[2] MAD temp[4].xyz, src0.zzz, src1.xyz, src0.000 17: src0.xyz = temp[4] MAX temp[4].xyz, src0.xyz, src0.000 18: TEX temp[11].x, input[4].xy__, 2D[3]; 19: src0.xyz = temp[4], src1.xyz = temp[11] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 20: src0.xyz = temp[1], src1.xyz = input[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[5], src1.xyz = const[3] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 22: src0.xyz = temp[4], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 23: src0.xyz = temp[5], src1.xyz = const[4], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 24: MAD color[0].w, src0.0, src0.1, src0.0 25: src0.xyz = const[5], src1.xyz = temp[7] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz 26: src0.xyz = input[2], src1.xyz = temp[10], src2.xyz = temp[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[11].x, input[4].xy__, 2D[3]; 2: TEX temp[1], input[6].xy__, 2D[0]; 3: src0.xyz = temp[1], src1.xyz = input[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 4: src0.xyz = temp[5], src0.w = input[0], src1.xyz = const[3] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 RCP temp[8].w, src0.w 5: src0.xyz = input[0], src0.w = temp[8] MAD temp[8].xy, src0.xy_, src0.ww_, src0.000 6: src0.xyz = temp[8], src1.xyz = const[9], src2.xyz = const[10] MAD temp[8].xy, src0.xy_, src1.xy_, src2.xy_ 7: src0.xyz = const[6], src1.xyz = temp[8] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 8: src0.xyz = temp[8] MAD temp[0].x, src0.x__, src0.111, src0.000 9: src0.xyz = temp[0], src1.xyz = const[7] MAD temp[2].xy, src0.xy_, src1.xx_, src0.000 10: BEGIN_TEX; 11: TEX temp[2].w, temp[2].xy__, 2D[1]; 12: src0.w = input[7], src1.w = temp[2] MAD temp[9].w, src0.w, src0.1, -src1.w 13: src0.w = temp[9] CMP temp[2].w, src0.0, src0.1, src0.w 14: src0.w = temp[2] MAD temp[3].xyz, -src0.www, src0.111, src0.000 MAD temp[3].w, -src0.w, src0.1, src0.0 15: src0.w = temp[1], src1.w = const[1] MAD temp[2].w, src0.w, src0.1, -src1.w 16: src0.w = temp[2] MAD temp[12].xyz, src0.www, src0.111, src0.000 MAD temp[12].w, src0.w, src0.1, src0.0 17: BEGIN_TEX; 18: KIL temp[12]; 19: KIL temp[3]; 20: TXP temp[2].xyz, input[5].xy_w, 2D[2]; 21: src0.xyz = input[3], src1.xyz = temp[2] MAD temp[4].xyz, src0.zzz, src1.xyz, src0.000 22: src0.xyz = temp[4] MAX temp[4].xyz, src0.xyz, src0.000 23: src0.xyz = temp[4], src1.xyz = temp[11] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 24: src0.xyz = temp[4], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = temp[5], src1.xyz = const[4], src2.xyz = temp[7] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 26: src0.xyz = const[5], src1.xyz = temp[7] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz 27: src0.xyz = input[2], src1.xyz = temp[10], src2.xyz = temp[7] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[10].x, temp[3].xy__, 2D[3]; 2: TEX temp[3], temp[5].xy__, 2D[0]; 3: src0.xyz = temp[3], src1.xyz = temp[0] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 4: src0.xyz = temp[8], src0.w = temp[7], src1.xyz = const[3] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 RCP temp[5].w, src0.w 5: src0.xyz = temp[7], src0.w = temp[5] MAD temp[5].xy, src0.xy_, src0.ww_, src0.000 6: src0.xyz = temp[5], src1.xyz = const[9], src2.xyz = const[10] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 7: src0.xyz = const[6], src1.xyz = temp[5] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 8: src0.xyz = temp[5] MAD temp[0].x, src0.x__, src0.111, src0.000 9: src0.xyz = temp[0], src1.xyz = const[7] MAD temp[0].xy, src0.xy_, src1.xx_, src0.000 10: BEGIN_TEX; 11: TEX temp[0].w, temp[0].xy__, 2D[1]; 12: src0.w = temp[6], src1.w = temp[0] MAD temp[5].w, src0.w, src0.1, -src1.w 13: src0.w = temp[5] CMP temp[0].w, src0.0, src0.1, src0.w 14: src0.w = temp[0] MAD temp[5].xyz, -src0.www, src0.111, src0.000 MAD temp[5].w, -src0.w, src0.1, src0.0 15: src0.w = temp[3], src1.w = const[1] MAD temp[0].w, src0.w, src0.1, -src1.w 16: src0.w = temp[0] MAD temp[3].xyz, src0.www, src0.111, src0.000 MAD temp[3].w, src0.w, src0.1, src0.0 17: BEGIN_TEX; 18: KIL temp[3]; 19: KIL temp[5]; 20: TXP temp[0].xyz, temp[4].xy_w, 2D[2]; 21: src0.xyz = temp[2], src1.xyz = temp[0] MAD temp[0].xyz, src0.zzz, src1.xyz, src0.000 22: src0.xyz = temp[0] MAX temp[0].xyz, src0.xyz, src0.000 23: src0.xyz = temp[0], src1.xyz = temp[10] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 24: src0.xyz = temp[0], src1.xyz = temp[9] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = temp[8], src1.xyz = const[4], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src2.xyz 26: src0.xyz = const[5], src1.xyz = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 27: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = temp[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=26************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 6, tex_end: 1 (code_addr: 00420180) TEX: TEX t10, t3, texture[3] (00009a83) TEX t3, t5, texture[0] (000080c5) 0: xyz: t3 t0 t0 -> t8.xyz (03a00003) w: t0 t0 t0 -> o0.w (01000000) xyz: t3.xyz t0.xyz 0.0 op: 00050200 w: 0.0 1.0 0.0 op: 00040890 1: xyz: t8 c3 t0 -> t9.xyz (03a408c8) w: t7 t0 t0 -> t5.w (00940007) xyz: t8.xyz c3.xyz 0.0 op: 00050200 w: t7.w t8.x t8.x op: 05000009 2: xyz: t7 t0 t0 -> t5.xy (01940007) w: t5 t0 t0 -> (00000005) xyz: t7.xyz t5.www 0.0 op: 00050600 w: t7.x t7.x t7.x op: 00000000 3: xyz: t5 c9 c10 -> t5.xy (0196aa45) w: t0 t0 t0 -> (00000000) xyz: t5.xyz c9.xyz c10.xyz op: 00020200 w: t5.x t5.x t5.x op: 00000000 4: xyz: c6 t5 t0 -> t0.y (01000166) w: t0 t0 t0 -> (00000000) xyz: c6.xyz 1.0 -t5.xyz op: 00090a80 w: c6.x c6.x c6.x op: 00000000 5: xyz: t5 t0 t0 -> t0.x (00800005) w: t0 t0 t0 -> (00000000) xyz: t5.xyz 1.0 0.0 op: 00050a80 w: t5.x t5.x t5.x op: 00000000 6: xyz: t0 c7 t0 -> t0.xy (018009c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c7.xxx 0.0 op: 00050280 w: t0.x t0.x t0.x op: 00000000 NODE 1: alu_offset: 7, tex_offset: 2, alu_end: 4, tex_end: 0 (code_addr: 00002107) TEX: TEX t0, t0, texture[1] (00008800) 7: xyz: t0 t0 t0 -> (00000000) w: t6 t0 t0 -> t5.w (00940006) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: t6.w 1.0 -t0.w op: 000a8889 8: xyz: t0 t0 t0 -> (00000000) w: t5 t0 t0 -> t0.w (00800005) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: 0.0 1.0 t5.w op: 03024890 9: xyz: t0 t0 t0 -> t5.xyz (03940000) w: t0 t0 t0 -> t5.w (00940000) xyz: -t0.www 1.0 0.0 op: 00050aac w: -t0.w 1.0 0.0 op: 000408a9 10: xyz: t0 t0 t0 -> (00000000) w: t3 c1 t0 -> t0.w (00800843) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: t3.w 1.0 -c1.w op: 000a8889 11: xyz: t0 t0 t0 -> t3.xyz (038c0000) w: t0 t0 t0 -> t3.w (008c0000) xyz: t0.www 1.0 0.0 op: 00050a8c w: t0.w 1.0 0.0 op: 00040889 NODE 2: alu_offset: 12, tex_offset: 3, alu_end: 6, tex_end: 2 (code_addr: 0044318c) TEX: KIL t0, t3, texture[0] (00010003) KIL t0, t5, texture[0] (00010005) TXP t0, t4, texture[2] (00019004) 12: xyz: t2 t0 t0 -> t0.xyz (03800002) w: t0 t0 t0 -> (00000000) xyz: t2.zzz t0.xyz 0.0 op: 00050203 w: t2.x t2.x t2.x op: 00000000 13: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz 0.0 t0.xxx op: 02804a00 w: t0.x t0.x t0.x op: 00000000 14: xyz: t0 t10 t0 -> t0.xyz (03800280) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t10.xxx 0.0 op: 00050280 w: t0.x t0.x t0.x op: 00000000 15: xyz: t0 t9 t0 -> t0.xyz (03800240) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t9.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 16: xyz: t8 c4 t0 -> t0.xyz (03800908) w: t0 t0 t0 -> (00000000) xyz: t8.xyz c4.xyz t0.xyz op: 00020200 w: t8.x t8.x t8.x op: 00000000 17: xyz: c5 t0 t0 -> t2.xyz (03880025) w: t0 t0 t0 -> (00000000) xyz: c5.xyz 1.0 -t0.xyz op: 00090a80 w: c5.x c5.x c5.x op: 00000000 18: xyz: t1 t2 t0 -> o0.xyz (1c000081) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t2.xyz t0.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR[1], LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL IN[3], GENERIC[7], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL CONST[2] DCL CONST[5..6] DCL TEMP[0..10] IMM FLT32 { 0.0000, 0.5000, 1.0000, 2.0000} IMM FLT32 { -32.0000, 16.0000, 0.0000, 2.0000} IMM FLT32 {100000.0000, 0.3500, 2.0000, 4.0000} IMM FLT32 { 2.0000, 4.0000, 8.0000, 16.0000} 0: SUB TEMP[0], IMM[0].yyyy, IN[1] 1: SUB TEMP[1], IMM[0].yyyy, IN[2] 2: ABS TEMP[0], TEMP[0] 3: ABS TEMP[1], TEMP[1] 4: MAX TEMP[0].xy, TEMP[0].xzwy, TEMP[0].ywxz 5: MAX TEMP[0].zw, TEMP[1].zwxz, TEMP[1].xyyw 6: MAD_SAT TEMP[2].yw, TEMP[0].zxwy, IMM[1].xxxx, IMM[1].yyyy 7: MUL TEMP[2], TEMP[2], CONST[2] 8: SUB TEMP[3], IMM[0].zzzz, TEMP[2] 9: MOV TEMP[4], IMM[0].xxxx 10: MOV TEMP[5], IN[3] 11: MUL_SAT TEMP[6], TEMP[2], IMM[2].xxxx 12: MUL TEMP[7], IMM[3], TEMP[6] 13: MUL_SAT TEMP[6].y, TEMP[3].yyyy, IMM[2].xxxx 14: MUL TEMP[0].xy, TEMP[6].yyyy, TEMP[5] 15: MUL TEMP[8].xy, TEMP[5], TEMP[7].yyyy 16: MUL TEMP[9].xy, TEMP[5], TEMP[7].wwww 17: TEX TEMP[0], TEMP[0], SAMP[0], 2D 18: TEX TEMP[8], TEMP[8], SAMP[1], 2D 19: TEX TEMP[9], TEMP[9], SAMP[2], 2D 20: MOV TEMP[4], TEMP[0] 21: MUL TEMP[4], TEMP[4], TEMP[3].yyyy 22: MAD TEMP[4], TEMP[8], TEMP[2].yyyy, TEMP[4] 23: MUL TEMP[4], TEMP[4], TEMP[3].wwww 24: MAD TEMP[4], TEMP[9], TEMP[2].wwww, TEMP[4] 25: LRP TEMP[10], IMM[2].yyyy, CONST[5], IMM[0].zzzz 26: MUL TEMP[4].xyz, TEMP[4], TEMP[10] 27: LRP OUT[0].xyz, IN[0].xxxx, CONST[6], TEMP[4] 28: MOV OUT[0].w, IMM[0].xxxx 29: END Fragment Program: before compilation # Radeon Compiler Program 0: SUB temp[0], const[7].yyyy, input[1]; 1: SUB temp[1], const[7].yyyy, input[2]; 2: ABS temp[0], temp[0]; 3: ABS temp[1], temp[1]; 4: MAX temp[0].xy, temp[0].xzwy, temp[0].ywxz; 5: MAX temp[0].zw, temp[1].zwxz, temp[1].xyyw; 6: MAD_SAT temp[2].yw, temp[0].zxwy, const[8].xxxx, const[8].yyyy; 7: MUL temp[2], temp[2], const[2]; 8: SUB temp[3], const[7].zzzz, temp[2]; 9: MOV temp[4], const[7].xxxx; 10: MOV temp[5], input[3]; 11: MUL_SAT temp[6], temp[2], const[9].xxxx; 12: MUL temp[7], const[10], temp[6]; 13: MUL_SAT temp[6].y, temp[3].yyyy, const[9].xxxx; 14: MUL temp[0].xy, temp[6].yyyy, temp[5]; 15: MUL temp[8].xy, temp[5], temp[7].yyyy; 16: MUL temp[9].xy, temp[5], temp[7].wwww; 17: TEX temp[0], temp[0], 2D[0]; 18: TEX temp[8], temp[8], 2D[1]; 19: TEX temp[9], temp[9], 2D[2]; 20: MOV temp[4], temp[0]; 21: MUL temp[4], temp[4], temp[3].yyyy; 22: MAD temp[4], temp[8], temp[2].yyyy, temp[4]; 23: MUL temp[4], temp[4], temp[3].wwww; 24: MAD temp[4], temp[9], temp[2].wwww, temp[4]; 25: LRP temp[10], const[9].yyyy, const[5], const[7].zzzz; 26: MUL temp[4].xyz, temp[4], temp[10]; 27: LRP output[0].xyz, input[0].xxxx, const[6], temp[4]; 28: MOV output[0].w, const[7].xxxx; Fragment Program: after emulate loops # Radeon Compiler Program 0: SUB temp[0], const[7].yyyy, input[1]; 1: SUB temp[1], const[7].yyyy, input[2]; 2: ABS temp[0], temp[0]; 3: ABS temp[1], temp[1]; 4: MAX temp[0].xy, temp[0].xzwy, temp[0].ywxz; 5: MAX temp[0].zw, temp[1].zwxz, temp[1].xyyw; 6: MAD_SAT temp[2].yw, temp[0].zxwy, const[8].xxxx, const[8].yyyy; 7: MUL temp[2], temp[2], const[2]; 8: SUB temp[3], const[7].zzzz, temp[2]; 9: MOV temp[4], const[7].xxxx; 10: MOV temp[5], input[3]; 11: MUL_SAT temp[6], temp[2], const[9].xxxx; 12: MUL temp[7], const[10], temp[6]; 13: MUL_SAT temp[6].y, temp[3].yyyy, const[9].xxxx; 14: MUL temp[0].xy, temp[6].yyyy, temp[5]; 15: MUL temp[8].xy, temp[5], temp[7].yyyy; 16: MUL temp[9].xy, temp[5], temp[7].wwww; 17: TEX temp[0], temp[0], 2D[0]; 18: TEX temp[8], temp[8], 2D[1]; 19: TEX temp[9], temp[9], 2D[2]; 20: MOV temp[4], temp[0]; 21: MUL temp[4], temp[4], temp[3].yyyy; 22: MAD temp[4], temp[8], temp[2].yyyy, temp[4]; 23: MUL temp[4], temp[4], temp[3].wwww; 24: MAD temp[4], temp[9], temp[2].wwww, temp[4]; 25: LRP temp[10], const[9].yyyy, const[5], const[7].zzzz; 26: MUL temp[4].xyz, temp[4], temp[10]; 27: LRP output[0].xyz, input[0].xxxx, const[6], temp[4]; 28: MOV output[0].w, const[7].xxxx; Fragment Program: after emulate branches # Radeon Compiler Program 0: SUB temp[0], const[7].yyyy, input[1]; 1: SUB temp[1], const[7].yyyy, input[2]; 2: ABS temp[0], temp[0]; 3: ABS temp[1], temp[1]; 4: MAX temp[0].xy, temp[0].xzwy, temp[0].ywxz; 5: MAX temp[0].zw, temp[1].zwxz, temp[1].xyyw; 6: MAD_SAT temp[2].yw, temp[0].zxwy, const[8].xxxx, const[8].yyyy; 7: MUL temp[2], temp[2], const[2]; 8: SUB temp[3], const[7].zzzz, temp[2]; 9: MOV temp[4], const[7].xxxx; 10: MOV temp[5], input[3]; 11: MUL_SAT temp[6], temp[2], const[9].xxxx; 12: MUL temp[7], const[10], temp[6]; 13: MUL_SAT temp[6].y, temp[3].yyyy, const[9].xxxx; 14: MUL temp[0].xy, temp[6].yyyy, temp[5]; 15: MUL temp[8].xy, temp[5], temp[7].yyyy; 16: MUL temp[9].xy, temp[5], temp[7].wwww; 17: TEX temp[0], temp[0], 2D[0]; 18: TEX temp[8], temp[8], 2D[1]; 19: TEX temp[9], temp[9], 2D[2]; 20: MOV temp[4], temp[0]; 21: MUL temp[4], temp[4], temp[3].yyyy; 22: MAD temp[4], temp[8], temp[2].yyyy, temp[4]; 23: MUL temp[4], temp[4], temp[3].wwww; 24: MAD temp[4], temp[9], temp[2].wwww, temp[4]; 25: LRP temp[10], const[9].yyyy, const[5], const[7].zzzz; 26: MUL temp[4].xyz, temp[4], temp[10]; 27: LRP output[0].xyz, input[0].xxxx, const[6], temp[4]; 28: MOV output[0].w, const[7].xxxx; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: ADD temp[0], const[7].yyyy, -input[1]; 1: ADD temp[1], const[7].yyyy, -input[2]; 2: MOV temp[0], |temp[0]|; 3: MOV temp[1], |temp[1]|; 4: MAX temp[0].xy, temp[0].xzwy, temp[0].ywxz; 5: MAX temp[0].zw, temp[1].zwxz, temp[1].xyyw; 6: MAD_SAT temp[2].yw, temp[0].zxwy, const[8].xxxx, const[8].yyyy; 7: MUL temp[2], temp[2], const[2]; 8: ADD temp[3], const[7].zzzz, -temp[2]; 9: MOV temp[4], const[7].xxxx; 10: MOV temp[5], input[3]; 11: MUL_SAT temp[6], temp[2], const[9].xxxx; 12: MUL temp[7], const[10], temp[6]; 13: MUL_SAT temp[6].y, temp[3].yyyy, const[9].xxxx; 14: MUL temp[0].xy, temp[6].yyyy, temp[5]; 15: MUL temp[8].xy, temp[5], temp[7].yyyy; 16: MUL temp[9].xy, temp[5], temp[7].wwww; 17: TEX temp[0], temp[0], 2D[0]; 18: TEX temp[8], temp[8], 2D[1]; 19: TEX temp[9], temp[9], 2D[2]; 20: MOV temp[4], temp[0]; 21: MUL temp[4], temp[4], temp[3].yyyy; 22: MAD temp[4], temp[8], temp[2].yyyy, temp[4]; 23: MUL temp[4], temp[4], temp[3].wwww; 24: MAD temp[4], temp[9], temp[2].wwww, temp[4]; 25: ADD temp[11], const[5], -const[7].zzzz; 26: MAD temp[10], const[9].yyyy, temp[11], const[7].zzzz; 27: MUL temp[4].xyz, temp[4], temp[10]; 28: ADD temp[12], const[6], -temp[4]; 29: MAD output[0].xyz, input[0].xxxx, temp[12], temp[4]; 30: MOV output[0].w, const[7].xxxx; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: ADD temp[0], const[7].yyyy, -input[1]; 1: ADD temp[1], const[7].yyyy, -input[2]; 2: MOV temp[0], |temp[0]|; 3: MOV temp[1], |temp[1]|; 4: MAX temp[0].xy, temp[0].xzwy, temp[0].ywxz; 5: MAX temp[0].zw, temp[1].zwxz, temp[1].xyyw; 6: MAD_SAT temp[2].yw, temp[0].zxwy, const[8].xxxx, const[8].yyyy; 7: MUL temp[2], temp[2], const[2]; 8: ADD temp[3], const[7].zzzz, -temp[2]; 9: MOV temp[4], const[7].xxxx; 10: MOV temp[5], input[3]; 11: MUL_SAT temp[6], temp[2], const[9].xxxx; 12: MUL temp[7], const[10], temp[6]; 13: MUL_SAT temp[6].y, temp[3].yyyy, const[9].xxxx; 14: MUL temp[0].xy, temp[6].yyyy, temp[5]; 15: MUL temp[8].xy, temp[5], temp[7].yyyy; 16: MUL temp[9].xy, temp[5], temp[7].wwww; 17: TEX temp[0], temp[0], 2D[0]; 18: TEX temp[8], temp[8], 2D[1]; 19: TEX temp[9], temp[9], 2D[2]; 20: MOV temp[4], temp[0]; 21: MUL temp[4], temp[4], temp[3].yyyy; 22: MAD temp[4], temp[8], temp[2].yyyy, temp[4]; 23: MUL temp[4], temp[4], temp[3].wwww; 24: MAD temp[4], temp[9], temp[2].wwww, temp[4]; 25: ADD temp[11], const[5], -const[7].zzzz; 26: MAD temp[10], const[9].yyyy, temp[11], const[7].zzzz; 27: MUL temp[4].xyz, temp[4], temp[10]; 28: ADD temp[12], const[6], -temp[4]; 29: MAD output[0].xyz, input[0].xxxx, temp[12], temp[4]; 30: MOV output[0].w, const[7].xxxx; Fragment Program: after deadcode # Radeon Compiler Program 0: ADD temp[0], const[7].yyyy, -input[1]; 1: MOV temp[0], |temp[0]|; 2: MAX temp[0].xy, temp[0].xz__, temp[0].yw__; 3: MAD_SAT temp[2].yw, temp[0]._x_y, const[8]._x_x, const[8]._y_y; 4: MUL temp[2].yw, temp[2]._y_w, const[2]._y_w; 5: ADD temp[3].yw, const[7]._z_z, -temp[2]._y_w; 6: MOV temp[5].xy, input[3].xy__; 7: MUL_SAT temp[6].yw, temp[2]._y_w, const[9]._x_x; 8: MUL temp[7].yw, const[10]._y_w, temp[6]._y_w; 9: MUL_SAT temp[6].y, temp[3]._y__, const[9]._x__; 10: MUL temp[0].xy, temp[6].yy__, temp[5].xy__; 11: MUL temp[8].xy, temp[5].xy__, temp[7].yy__; 12: MUL temp[9].xy, temp[5].xy__, temp[7].ww__; 13: TEX temp[0].xyz, temp[0].xy__, 2D[0]; 14: TEX temp[8].xyz, temp[8].xy__, 2D[1]; 15: TEX temp[9].xyz, temp[9].xy__, 2D[2]; 16: MOV temp[4].xyz, temp[0].xyz_; 17: MUL temp[4].xyz, temp[4].xyz_, temp[3].yyy_; 18: MAD temp[4].xyz, temp[8].xyz_, temp[2].yyy_, temp[4].xyz_; 19: MUL temp[4].xyz, temp[4].xyz_, temp[3].www_; 20: MAD temp[4].xyz, temp[9].xyz_, temp[2].www_, temp[4].xyz_; 21: ADD temp[11].xyz, const[5].xyz_, -const[7].zzz_; 22: MAD temp[10].xyz, const[9].yyy_, temp[11].xyz_, const[7].zzz_; 23: MUL temp[4].xyz, temp[4].xyz_, temp[10].xyz_; 24: ADD temp[12].xyz, const[6].xyz_, -temp[4].xyz_; 25: MAD output[0].xyz, input[0].xxx_, temp[12].xyz_, temp[4].xyz_; 26: MOV output[0].w, const[7].___x; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: ADD temp[0], none.HHHH, -input[1]; 1: MAX temp[0].xy, |temp[0].xz__|, |temp[0].yw__|; 2: MAD_SAT temp[2].yw, temp[0]._x_y, const[8]._x_x, const[8]._y_y; 3: MUL temp[2].yw, temp[2]._y_w, const[2]._y_w; 4: ADD temp[3].yw, none._1_1, -temp[2]._y_w; 5: MUL_SAT temp[6].yw, temp[2]._y_w, const[9]._x_x; 6: MUL temp[7].yw, const[10]._y_w, temp[6]._y_w; 7: MUL_SAT temp[6].y, temp[3]._y__, const[9]._x__; 8: MUL temp[0].xy, temp[6].yy__, input[3].xy__; 9: MUL temp[8].xy, input[3].xy__, temp[7].yy__; 10: MUL temp[9].xy, input[3].xy__, temp[7].ww__; 11: TEX temp[0].xyz, temp[0].xy__, 2D[0]; 12: TEX temp[8].xyz, temp[8].xy__, 2D[1]; 13: TEX temp[9].xyz, temp[9].xy__, 2D[2]; 14: MUL temp[4].xyz, temp[0].xyz_, temp[3].yyy_; 15: MAD temp[4].xyz, temp[8].xyz_, temp[2].yyy_, temp[4].xyz_; 16: MUL temp[4].xyz, temp[4].xyz_, temp[3].www_; 17: MAD temp[4].xyz, temp[9].xyz_, temp[2].www_, temp[4].xyz_; 18: ADD temp[11].xyz, const[5].xyz_, -none.111_; 19: MAD temp[10].xyz, const[9].yyy_, temp[11].xyz_, none.111_; 20: MUL temp[4].xyz, temp[4].xyz_, temp[10].xyz_; 21: ADD temp[12].xyz, const[6].xyz_, -temp[4].xyz_; 22: MAD output[0].xyz, input[0].xxx_, temp[12].xyz_, temp[4].xyz_; 23: MOV output[0].w, none.___0; Fragment Program: after dataflow passes # Radeon Compiler Program 0: ADD temp[0], none.HHHH, -input[1]; 1: MOV temp[1].x, |temp[0].x___|; 2: MOV temp[1].y, |temp[0]._z__|; 3: MOV temp[5].x, |temp[0].y___|; 4: MOV temp[5].y, |temp[0]._w__|; 5: MAX temp[0].xy, temp[1].xy__, temp[5].xy__; 6: MAD_SAT temp[2].yw, temp[0]._x_y, const[8]._x_x, const[8]._y_y; 7: MUL temp[2].yw, temp[2]._y_w, const[2]._y_w; 8: ADD temp[3].yw, none._1_1, -temp[2]._y_w; 9: MUL_SAT temp[6].yw, temp[2]._y_w, const[9]._x_x; 10: MUL temp[7].yw, const[10]._y_w, temp[6]._y_w; 11: MUL_SAT temp[6].y, temp[3]._y__, const[9]._x__; 12: MUL temp[0].xy, temp[6].yy__, input[3].xy__; 13: MUL temp[8].xy, input[3].xy__, temp[7].yy__; 14: MUL temp[9].xy, input[3].xy__, temp[7].ww__; 15: TEX temp[0].xyz, temp[0].xy__, 2D[0]; 16: TEX temp[8].xyz, temp[8].xy__, 2D[1]; 17: TEX temp[9].xyz, temp[9].xy__, 2D[2]; 18: MUL temp[4].xyz, temp[0].xyz_, temp[3].yyy_; 19: MAD temp[4].xyz, temp[8].xyz_, temp[2].yyy_, temp[4].xyz_; 20: MUL temp[4].xyz, temp[4].xyz_, temp[3].www_; 21: MAD temp[4].xyz, temp[9].xyz_, temp[2].www_, temp[4].xyz_; 22: ADD temp[11].xyz, const[5].xyz_, -none.111_; 23: MAD temp[10].xyz, const[9].yyy_, temp[11].xyz_, none.111_; 24: MUL temp[4].xyz, temp[4].xyz_, temp[10].xyz_; 25: ADD temp[12].xyz, const[6].xyz_, -temp[4].xyz_; 26: MAD output[0].xyz, input[0].xxx_, temp[12].xyz_, temp[4].xyz_; 27: MOV output[0].w, none.___0; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src0.w = input[1] MAD temp[0].xyz, src0.HHH, src0.111, -src0.xyz MAD temp[0].w, src0.H, src0.1, -src0.w 1: src0.xyz = temp[0] MAD temp[1].x, |src0.x__|, src0.111, src0.000 2: src0.xyz = temp[0] MAD temp[1].y, |src0._z_|, src0.111, src0.000 3: src0.xyz = temp[0] MAD temp[5].x, |src0.y__|, src0.111, src0.000 4: src0.w = temp[0] MAD temp[5].y, |src0._w_|, src0.111, src0.000 5: src0.xyz = temp[1], src1.xyz = temp[5] MAX temp[0].xy, src0.xy_, src1.xy_ 6: src0.xyz = temp[0], src1.xyz = const[8] MAD_SAT temp[2].y, src0._x_, src1._x_, src1._y_ MAD_SAT temp[2].w, src0.y, src1.x, src1.y 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[2].y, src0._y_, src1._y_, src0.000 MAD temp[2].w, src0.w, src1.w, src0.0 8: src0.xyz = temp[2], src0.w = temp[2] MAD temp[3].y, src0._1_, src0.111, -src0._y_ MAD temp[3].w, src0.1, src0.1, -src0.w 9: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD_SAT temp[6].y, src0._y_, src1._x_, src0.000 MAD_SAT temp[6].w, src0.w, src1.x, src0.0 10: src0.xyz = const[10], src0.w = const[10], src1.xyz = temp[6], src1.w = temp[6] MAD temp[7].y, src0._y_, src1._y_, src0.000 MAD temp[7].w, src0.w, src1.w, src0.0 11: src0.xyz = temp[3], src1.xyz = const[9] MAD_SAT temp[6].y, src0._y_, src1._x_, src0.000 12: src0.xyz = temp[6], src1.xyz = input[3] MAD temp[0].xy, src0.yy_, src1.xy_, src0.000 13: src0.xyz = input[3], src1.xyz = temp[7] MAD temp[8].xy, src0.xy_, src1.yy_, src0.000 14: src0.xyz = input[3], src0.w = temp[7] MAD temp[9].xy, src0.xy_, src0.ww_, src0.000 15: TEX temp[0].xyz, temp[0].xy__, 2D[0]; 16: TEX temp[8].xyz, temp[8].xy__, 2D[1]; 17: TEX temp[9].xyz, temp[9].xy__, 2D[2]; 18: src0.xyz = temp[0], src1.xyz = temp[3] MAD temp[4].xyz, src0.xyz, src1.yyy, src0.000 19: src0.xyz = temp[8], src1.xyz = temp[2], src2.xyz = temp[4] MAD temp[4].xyz, src0.xyz, src1.yyy, src2.xyz 20: src0.xyz = temp[4], src0.w = temp[3] MAD temp[4].xyz, src0.xyz, src0.www, src0.000 21: src0.xyz = temp[9], src0.w = temp[2], src1.xyz = temp[4] MAD temp[4].xyz, src0.xyz, src0.www, src1.xyz 22: src0.xyz = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src0.111 23: src0.xyz = const[9], src1.xyz = temp[11] MAD temp[10].xyz, src0.yyy, src1.xyz, src0.111 24: src0.xyz = temp[4], src1.xyz = temp[10] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 25: src0.xyz = const[6], src1.xyz = temp[4] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz 26: src0.xyz = input[0], src1.xyz = temp[12], src2.xyz = temp[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 27: MAD color[0].w, src0.0, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: src0.xyz = input[1], src0.w = input[1] MAD temp[0].xyz, src0.HHH, src0.111, -src0.xyz MAD temp[0].w, src0.H, src0.1, -src0.w 1: src0.w = temp[0] MAD temp[5].y, |src0._w_|, src0.111, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 2: src0.xyz = temp[0] MAD temp[1].y, |src0._z_|, src0.111, src0.000 3: src0.xyz = temp[0] MAD temp[5].x, |src0.y__|, src0.111, src0.000 4: src0.xyz = temp[0] MAD temp[1].x, |src0.x__|, src0.111, src0.000 5: src0.xyz = temp[1], src1.xyz = temp[5] MAX temp[0].xy, src0.xy_, src1.xy_ 6: src0.xyz = temp[0], src1.xyz = const[8] MAD_SAT temp[2].y, src0._x_, src1._x_, src1._y_ MAD_SAT temp[2].w, src0.y, src1.x, src1.y 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[2].y, src0._y_, src1._y_, src0.000 MAD temp[2].w, src0.w, src1.w, src0.0 8: src0.xyz = temp[2], src0.w = temp[2] MAD temp[3].y, src0._1_, src0.111, -src0._y_ MAD temp[3].w, src0.1, src0.1, -src0.w 9: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD_SAT temp[6].y, src0._y_, src1._x_, src0.000 MAD_SAT temp[6].w, src0.w, src1.x, src0.0 10: src0.xyz = const[10], src0.w = const[10], src1.xyz = temp[6], src1.w = temp[6] MAD temp[7].y, src0._y_, src1._y_, src0.000 MAD temp[7].w, src0.w, src1.w, src0.0 11: src0.xyz = input[3], src0.w = temp[7] MAD temp[9].xy, src0.xy_, src0.ww_, src0.000 12: src0.xyz = input[3], src1.xyz = temp[7] MAD temp[8].xy, src0.xy_, src1.yy_, src0.000 13: src0.xyz = temp[3], src1.xyz = const[9] MAD_SAT temp[6].y, src0._y_, src1._x_, src0.000 14: src0.xyz = temp[6], src1.xyz = input[3] MAD temp[0].xy, src0.yy_, src1.xy_, src0.000 15: src0.xyz = const[5] MAD temp[11].xyz, src0.xyz, src0.111, -src0.111 16: src0.xyz = const[9], src1.xyz = temp[11] MAD temp[10].xyz, src0.yyy, src1.xyz, src0.111 17: BEGIN_TEX; 18: TEX temp[0].xyz, temp[0].xy__, 2D[0]; 19: TEX temp[8].xyz, temp[8].xy__, 2D[1]; 20: TEX temp[9].xyz, temp[9].xy__, 2D[2]; 21: src0.xyz = temp[0], src1.xyz = temp[3] MAD temp[4].xyz, src0.xyz, src1.yyy, src0.000 22: src0.xyz = temp[8], src1.xyz = temp[2], src2.xyz = temp[4] MAD temp[4].xyz, src0.xyz, src1.yyy, src2.xyz 23: src0.xyz = temp[4], src0.w = temp[3] MAD temp[4].xyz, src0.xyz, src0.www, src0.000 24: src0.xyz = temp[9], src0.w = temp[2], src1.xyz = temp[4] MAD temp[4].xyz, src0.xyz, src0.www, src1.xyz 25: src0.xyz = temp[4], src1.xyz = temp[10] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = const[6], src1.xyz = temp[4] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz 27: src0.xyz = input[0], src1.xyz = temp[12], src2.xyz = temp[4] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = temp[1], src0.w = temp[1] MAD temp[1].xyz, src0.HHH, src0.111, -src0.xyz MAD temp[1].w, src0.H, src0.1, -src0.w 1: src0.w = temp[1] MAD temp[4].y, |src0._w_|, src0.111, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 2: src0.xyz = temp[1] MAD temp[2].y, |src0._z_|, src0.111, src0.000 3: src0.xyz = temp[1] MAD temp[4].x, |src0.y__|, src0.111, src0.000 4: src0.xyz = temp[1] MAD temp[2].x, |src0.x__|, src0.111, src0.000 5: src0.xyz = temp[2], src1.xyz = temp[4] MAX temp[1].xy, src0.xy_, src1.xy_ 6: src0.xyz = temp[1], src1.xyz = const[8] MAD_SAT temp[2].y, src0._x_, src1._x_, src1._y_ MAD_SAT temp[2].w, src0.y, src1.x, src1.y 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[2], src1.w = const[2] MAD temp[2].y, src0._y_, src1._y_, src0.000 MAD temp[2].w, src0.w, src1.w, src0.0 8: src0.xyz = temp[2], src0.w = temp[2] MAD temp[4].y, src0._1_, src0.111, -src0._y_ MAD temp[4].w, src0.1, src0.1, -src0.w 9: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = const[9] MAD_SAT temp[5].y, src0._y_, src1._x_, src0.000 MAD_SAT temp[5].w, src0.w, src1.x, src0.0 10: src0.xyz = const[10], src0.w = const[10], src1.xyz = temp[5], src1.w = temp[5] MAD temp[6].y, src0._y_, src1._y_, src0.000 MAD temp[6].w, src0.w, src1.w, src0.0 11: src0.xyz = temp[3], src0.w = temp[6] MAD temp[7].xy, src0.xy_, src0.ww_, src0.000 12: src0.xyz = temp[3], src1.xyz = temp[6] MAD temp[6].xy, src0.xy_, src1.yy_, src0.000 13: src0.xyz = temp[4], src1.xyz = const[9] MAD_SAT temp[5].y, src0._y_, src1._x_, src0.000 14: src0.xyz = temp[5], src1.xyz = temp[3] MAD temp[1].xy, src0.yy_, src1.xy_, src0.000 15: src0.xyz = const[5] MAD temp[3].xyz, src0.xyz, src0.111, -src0.111 16: src0.xyz = const[9], src1.xyz = temp[3] MAD temp[3].xyz, src0.yyy, src1.xyz, src0.111 17: BEGIN_TEX; 18: TEX temp[1].xyz, temp[1].xy__, 2D[0]; 19: TEX temp[6].xyz, temp[6].xy__, 2D[1]; 20: TEX temp[7].xyz, temp[7].xy__, 2D[2]; 21: src0.xyz = temp[1], src1.xyz = temp[4] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 22: src0.xyz = temp[6], src1.xyz = temp[2], src2.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src1.yyy, src2.xyz 23: src0.xyz = temp[1], src0.w = temp[4] MAD temp[1].xyz, src0.xyz, src0.www, src0.000 24: src0.xyz = temp[7], src0.w = temp[2], src1.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.www, src1.xyz 25: src0.xyz = temp[1], src1.xyz = temp[3] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 26: src0.xyz = const[6], src1.xyz = temp[1] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 27: src0.xyz = temp[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=27************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 16, tex_end: 0 (code_addr: 00400400) 0: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t1 t0 t0 -> t1.w (00840001) xyz: 0.5 1.0 -t1.xyz op: 00080a96 w: 0.5 1.0 -t1.w op: 000a4892 1: xyz: t0 t0 t0 -> t4.y (01100000) w: t1 t0 t0 -> o0.w (01000001) xyz: |t1.www| 1.0 0.0 op: 00050acc w: 0.0 1.0 0.0 op: 00040890 2: xyz: t1 t0 t0 -> t2.y (01080001) w: t0 t0 t0 -> (00000000) xyz: |t1.zzz| 1.0 0.0 op: 00050ac3 w: t1.x t1.x t1.x op: 00000000 3: xyz: t1 t0 t0 -> t4.x (00900001) w: t0 t0 t0 -> (00000000) xyz: |t1.yyy| 1.0 0.0 op: 00050ac2 w: t1.x t1.x t1.x op: 00000000 4: xyz: t1 t0 t0 -> t2.x (00880001) w: t0 t0 t0 -> (00000000) xyz: |t1.xyz| 1.0 0.0 op: 00050ac0 w: t1.x t1.x t1.x op: 00000000 5: xyz: t2 t4 t0 -> t1.xy (01840102) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t4.xyz t2.xxx op: 02804200 w: t2.x t2.x t2.x op: 00000000 6: xyz: t1 c8 t0 -> t2.y (01080a01) w: t0 t0 t0 -> t2.w (00880000) xyz: t1.xxx c8.xxx c8.xyz op: 40010281 w: t1.y c8.x c8.y op: 40010181 7: xyz: t2 c2 t0 -> t2.y (01080882) w: t2 c2 t0 -> t2.w (00880882) xyz: t2.xyz c2.xyz 0.0 op: 00050200 w: t2.w c2.w 0.0 op: 00040509 8: xyz: t2 t0 t0 -> t4.y (01100002) w: t2 t0 t0 -> t4.w (00900002) xyz: 1.0 1.0 -t2.xyz op: 00080a95 w: 1.0 1.0 -t2.w op: 000a4891 9: xyz: t2 c9 t0 -> t5.y (01140a42) w: t2 t0 t0 -> t5.w (00940002) xyz: t2.xyz c9.xxx 0.0 op: 40050280 w: t2.w c9.x 0.0 op: 40040189 10: xyz: c10 t5 t0 -> t6.y (0118016a) w: c10 t5 t0 -> t6.w (0098016a) xyz: c10.xyz t5.xyz 0.0 op: 00050200 w: c10.w t5.w 0.0 op: 00040509 11: xyz: t3 t0 t0 -> t7.xy (019c0003) w: t6 t0 t0 -> (00000006) xyz: t3.xyz t6.www 0.0 op: 00050600 w: t3.x t3.x t3.x op: 00000000 12: xyz: t3 t6 t0 -> t6.xy (01980183) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t6.yyy 0.0 op: 00050300 w: t3.x t3.x t3.x op: 00000000 13: xyz: t4 c9 t0 -> t5.y (01140a44) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c9.xxx 0.0 op: 40050280 w: t4.x t4.x t4.x op: 00000000 14: xyz: t5 t3 t0 -> t1.xy (018400c5) w: t0 t0 t0 -> (00000000) xyz: t5.yyy t3.xyz 0.0 op: 00050202 w: t5.x t5.x t5.x op: 00000000 15: xyz: c5 t0 t0 -> t3.xyz (038c0025) w: t0 t0 t0 -> (00000000) xyz: c5.xyz 1.0 -1.0 op: 000d4a80 w: c5.x c5.x c5.x op: 00000000 16: xyz: c9 t3 t0 -> t3.xyz (038c00e9) w: t0 t0 t0 -> (00000000) xyz: c9.yyy t3.xyz 1.0 op: 00054202 w: c9.x c9.x c9.x op: 00000000 NODE 1: alu_offset: 17, tex_offset: 0, alu_end: 6, tex_end: 2 (code_addr: 00440191) TEX: TEX t1, t1, texture[0] (00008041) TEX t6, t6, texture[1] (00008986) TEX t7, t7, texture[2] (000091c7) 17: xyz: t1 t4 t0 -> t1.xyz (03840101) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t4.yyy 0.0 op: 00050300 w: t1.x t1.x t1.x op: 00000000 18: xyz: t6 t2 t1 -> t1.xyz (03841086) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t2.yyy t1.xyz op: 00020300 w: t6.x t6.x t6.x op: 00000000 19: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t4 t0 t0 -> (00000004) xyz: t1.xyz t4.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 20: xyz: t7 t1 t0 -> t1.xyz (03840047) w: t2 t0 t0 -> (00000002) xyz: t7.xyz t2.www t1.xyz op: 00010600 w: t7.x t7.x t7.x op: 00000000 21: xyz: t1 t3 t0 -> t1.xyz (038400c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 22: xyz: c6 t1 t0 -> t2.xyz (03880066) w: t0 t0 t0 -> (00000000) xyz: c6.xyz 1.0 -t1.xyz op: 00090a80 w: c6.x c6.x c6.x op: 00000000 23: xyz: t0 t2 t1 -> o0.xyz (1c001080) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t2.xyz t1.xyz op: 00020201 w: t0.x t0.x t0.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[0], 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 CONST[1..3] DCL TEMP[0..6] IMM FLT32 { 0.3000, 0.5900, 0.1100, 0.0000} 0: TEX TEMP[0], IN[5], SAMP[0], 2D 1: MOV TEMP[1], TEMP[2] 2: TXP TEMP[2], IN[4], SAMP[1], 2D 3: MUL TEMP[3], IN[2].zzzz, TEMP[2] 4: MAX TEMP[3], TEMP[3], IMM[0].wwww 5: TEX TEMP[2].x, IN[3], SAMP[2], 2D 6: MUL TEMP[3], TEMP[3], TEMP[2].xxxx 7: MUL TEMP[4], TEMP[0], IN[0] 8: MUL TEMP[5], TEMP[4], CONST[1] 9: MUL TEMP[6], TEMP[3], TEMP[5] 10: MAD TEMP[6], TEMP[4], CONST[2], TEMP[6] 11: MOV OUT[0].w, IMM[0].wwww 12: LRP OUT[0].xyz, IN[1].xxxx, CONST[3], TEMP[6] 13: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: MOV output[0].w, const[4].wwww; 12: LRP output[0].xyz, input[1].xxxx, const[3], temp[6]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: MOV output[0].w, const[4].wwww; 12: LRP output[0].xyz, input[1].xxxx, const[3], temp[6]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: MOV output[0].w, const[4].wwww; 12: LRP output[0].xyz, input[1].xxxx, const[3], temp[6]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: MOV output[0].w, const[4].wwww; 12: ADD temp[7], const[3], -temp[6]; 13: MAD output[0].xyz, input[1].xxxx, temp[7], temp[6]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[8], input[3], 2D[2]; 6: MOV temp[2].x, temp[8]; 7: MUL temp[3], temp[3], temp[2].xxxx; 8: MUL temp[4], temp[0], input[0]; 9: MUL temp[5], temp[4], const[1]; 10: MUL temp[6], temp[3], temp[5]; 11: MAD temp[6], temp[4], const[2], temp[6]; 12: MOV output[0].w, const[4].wwww; 13: ADD temp[7], const[3], -temp[6]; 14: MAD output[0].xyz, input[1].xxxx, temp[7], temp[6]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 3: MAX temp[3].xyz, temp[3].xyz_, const[4].www_; 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: MOV temp[2].x, temp[8].x___; 6: MUL temp[3].xyz, temp[3].xyz_, temp[2].xxx_; 7: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 8: MUL temp[5].xyz, temp[4].xyz_, const[1].xyz_; 9: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 10: MAD temp[6].xyz, temp[4].xyz_, const[2].xyz_, temp[6].xyz_; 11: MOV output[0].w, const[4].___w; 12: ADD temp[7].xyz, const[3].xyz_, -temp[6].xyz_; 13: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 3: MAX temp[3].xyz, temp[3].xyz_, none.000_; 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: MUL temp[3].xyz, temp[3].xyz_, temp[8].xxx_; 6: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 7: MUL temp[5].xyz, temp[4].xyz_, const[1].xyz_; 8: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 9: MAD temp[6].xyz, temp[4].xyz_, const[2].xyz_, temp[6].xyz_; 10: MOV output[0].w, none.___0; 11: ADD temp[7].xyz, const[3].xyz_, -temp[6].xyz_; 12: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 3: MAX temp[3].xyz, temp[3].xyz_, none.000_; 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: MUL temp[3].xyz, temp[3].xyz_, temp[8].xxx_; 6: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 7: MUL temp[5].xyz, temp[4].xyz_, const[1].xyz_; 8: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 9: MAD temp[6].xyz, temp[4].xyz_, const[2].xyz_, temp[6].xyz_; 10: MOV output[0].w, none.___0; 11: ADD temp[7].xyz, const[3].xyz_, -temp[6].xyz_; 12: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[3].xyz, src0.zzz, src1.xyz, src0.000 3: src0.xyz = temp[3] MAX temp[3].xyz, src0.xyz, src0.000 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: src0.xyz = temp[3], src1.xyz = temp[8] MAD temp[3].xyz, src0.xyz, src1.xxx, src0.000 6: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 7: src0.xyz = temp[4], src1.xyz = const[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 8: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 9: src0.xyz = temp[4], src1.xyz = const[2], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 10: MAD color[0].w, src0.0, src0.1, src0.0 11: src0.xyz = const[3], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 12: src0.xyz = input[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8].x, input[3].xy__, 2D[2]; 2: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 3: TEX temp[0].xyz, input[5].xy__, 2D[0]; 4: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 5: src0.xyz = temp[4], src1.xyz = const[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 6: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[3].xyz, src0.zzz, src1.xyz, src0.000 7: src0.xyz = temp[3] MAX temp[3].xyz, src0.xyz, src0.000 8: src0.xyz = temp[3], src1.xyz = temp[8] MAD temp[3].xyz, src0.xyz, src1.xxx, src0.000 9: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 10: src0.xyz = temp[4], src1.xyz = const[2], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 11: src0.xyz = const[3], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 12: src0.xyz = input[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[6].x, temp[3].xy__, 2D[2]; 2: TXP temp[4].xyz, temp[4].xy_w, 2D[1]; 3: TEX temp[3].xyz, temp[5].xy__, 2D[0]; 4: src0.xyz = temp[3], src1.xyz = temp[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 5: src0.xyz = temp[3], src1.xyz = const[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 6: src0.xyz = temp[2], src1.xyz = temp[4] MAD temp[0].xyz, src0.zzz, src1.xyz, src0.000 7: src0.xyz = temp[0] MAX temp[0].xyz, src0.xyz, src0.000 8: src0.xyz = temp[0], src1.xyz = temp[6] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 9: src0.xyz = temp[0], src1.xyz = temp[5] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 10: src0.xyz = temp[3], src1.xyz = const[2], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src2.xyz 11: src0.xyz = const[3], src1.xyz = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 12: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = temp[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=28************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 8, tex_end: 2 (code_addr: 00440200) TEX: TEX t6, t3, texture[2] (00009183) TXP t4, t4, texture[1] (00018904) TEX t3, t5, texture[0] (000080c5) 0: xyz: t3 t0 t0 -> t3.xyz (038c0003) w: t0 t0 t0 -> o0.w (01000000) xyz: t3.xyz t0.xyz 0.0 op: 00050200 w: 0.0 1.0 0.0 op: 00040890 1: xyz: t3 c1 t0 -> t5.xyz (03940843) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c1.xyz 0.0 op: 00050200 w: t3.x t3.x t3.x op: 00000000 2: xyz: t2 t4 t0 -> t0.xyz (03800102) w: t0 t0 t0 -> (00000000) xyz: t2.zzz t4.xyz 0.0 op: 00050203 w: t2.x t2.x t2.x op: 00000000 3: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz 0.0 t0.xxx op: 02804a00 w: t0.x t0.x t0.x op: 00000000 4: xyz: t0 t6 t0 -> t0.xyz (03800180) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t6.xxx 0.0 op: 00050280 w: t0.x t0.x t0.x op: 00000000 5: xyz: t0 t5 t0 -> t0.xyz (03800140) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t5.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 6: xyz: t3 c2 t0 -> t0.xyz (03800883) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c2.xyz t0.xyz op: 00020200 w: t3.x t3.x t3.x op: 00000000 7: xyz: c3 t0 t0 -> t2.xyz (03880023) w: t0 t0 t0 -> (00000000) xyz: c3.xyz 1.0 -t0.xyz op: 00090a80 w: c3.x c3.x c3.x op: 00000000 8: xyz: t1 t2 t0 -> o0.xyz (1c000081) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t2.xyz t0.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[0], 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 CONST[0] DCL CONST[2..4] DCL TEMP[0..6] IMM FLT32 { 0.3000, 0.5900, 0.1100, 0.0000} 0: TEX TEMP[0], IN[5], SAMP[0], 2D 1: MOV TEMP[1], TEMP[2] 2: SUB TEMP[2].w, TEMP[0].wwww, CONST[0] 3: KIL TEMP[2].wwww 4: TXP TEMP[2], IN[4], SAMP[1], 2D 5: MUL TEMP[3], IN[2].zzzz, TEMP[2] 6: MAX TEMP[3], TEMP[3], IMM[0].wwww 7: TEX TEMP[2].x, IN[3], SAMP[2], 2D 8: MUL TEMP[3], TEMP[3], TEMP[2].xxxx 9: MUL TEMP[4], TEMP[0], IN[0] 10: MUL TEMP[5], TEMP[4], CONST[2] 11: MUL TEMP[6], TEMP[3], TEMP[5] 12: MAD TEMP[6], TEMP[4], CONST[3], TEMP[6] 13: MOV OUT[0].w, IMM[0].wwww 14: LRP OUT[0].xyz, IN[1].xxxx, CONST[4], TEMP[6] 15: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: SUB temp[2].w, temp[0].wwww, const[0]; 3: KIL temp[2].wwww; 4: TXP temp[2], input[4], 2D[1]; 5: MUL temp[3], input[2].zzzz, temp[2]; 6: MAX temp[3], temp[3], const[5].wwww; 7: TEX temp[2].x, input[3], 2D[2]; 8: MUL temp[3], temp[3], temp[2].xxxx; 9: MUL temp[4], temp[0], input[0]; 10: MUL temp[5], temp[4], const[2]; 11: MUL temp[6], temp[3], temp[5]; 12: MAD temp[6], temp[4], const[3], temp[6]; 13: MOV output[0].w, const[5].wwww; 14: LRP output[0].xyz, input[1].xxxx, const[4], temp[6]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: SUB temp[2].w, temp[0].wwww, const[0]; 3: KIL temp[2].wwww; 4: TXP temp[2], input[4], 2D[1]; 5: MUL temp[3], input[2].zzzz, temp[2]; 6: MAX temp[3], temp[3], const[5].wwww; 7: TEX temp[2].x, input[3], 2D[2]; 8: MUL temp[3], temp[3], temp[2].xxxx; 9: MUL temp[4], temp[0], input[0]; 10: MUL temp[5], temp[4], const[2]; 11: MUL temp[6], temp[3], temp[5]; 12: MAD temp[6], temp[4], const[3], temp[6]; 13: MOV output[0].w, const[5].wwww; 14: LRP output[0].xyz, input[1].xxxx, const[4], temp[6]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: SUB temp[2].w, temp[0].wwww, const[0]; 3: KIL temp[2].wwww; 4: TXP temp[2], input[4], 2D[1]; 5: MUL temp[3], input[2].zzzz, temp[2]; 6: MAX temp[3], temp[3], const[5].wwww; 7: TEX temp[2].x, input[3], 2D[2]; 8: MUL temp[3], temp[3], temp[2].xxxx; 9: MUL temp[4], temp[0], input[0]; 10: MUL temp[5], temp[4], const[2]; 11: MUL temp[6], temp[3], temp[5]; 12: MAD temp[6], temp[4], const[3], temp[6]; 13: MOV output[0].w, const[5].wwww; 14: LRP output[0].xyz, input[1].xxxx, const[4], temp[6]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: ADD temp[2].w, temp[0].wwww, -const[0]; 3: KIL temp[2].wwww; 4: TXP temp[2], input[4], 2D[1]; 5: MUL temp[3], input[2].zzzz, temp[2]; 6: MAX temp[3], temp[3], const[5].wwww; 7: TEX temp[2].x, input[3], 2D[2]; 8: MUL temp[3], temp[3], temp[2].xxxx; 9: MUL temp[4], temp[0], input[0]; 10: MUL temp[5], temp[4], const[2]; 11: MUL temp[6], temp[3], temp[5]; 12: MAD temp[6], temp[4], const[3], temp[6]; 13: MOV output[0].w, const[5].wwww; 14: ADD temp[7], const[4], -temp[6]; 15: MAD output[0].xyz, input[1].xxxx, temp[7], temp[6]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: ADD temp[2].w, temp[0].wwww, -const[0]; 3: KIL temp[2].wwww; 4: TXP temp[2], input[4], 2D[1]; 5: MUL temp[3], input[2].zzzz, temp[2]; 6: MAX temp[3], temp[3], const[5].wwww; 7: TEX temp[8], input[3], 2D[2]; 8: MOV temp[2].x, temp[8]; 9: MUL temp[3], temp[3], temp[2].xxxx; 10: MUL temp[4], temp[0], input[0]; 11: MUL temp[5], temp[4], const[2]; 12: MUL temp[6], temp[3], temp[5]; 13: MAD temp[6], temp[4], const[3], temp[6]; 14: MOV output[0].w, const[5].wwww; 15: ADD temp[7], const[4], -temp[6]; 16: MAD output[0].xyz, input[1].xxxx, temp[7], temp[6]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[5].xy__, 2D[0]; 1: ADD temp[2].w, temp[0].___w, -const[0].___w; 2: KIL temp[2].wwww; 3: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 4: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 5: MAX temp[3].xyz, temp[3].xyz_, const[5].www_; 6: TEX temp[8].x, input[3].xy__, 2D[2]; 7: MOV temp[2].x, temp[8].x___; 8: MUL temp[3].xyz, temp[3].xyz_, temp[2].xxx_; 9: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 10: MUL temp[5].xyz, temp[4].xyz_, const[2].xyz_; 11: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 12: MAD temp[6].xyz, temp[4].xyz_, const[3].xyz_, temp[6].xyz_; 13: MOV output[0].w, const[5].___w; 14: ADD temp[7].xyz, const[4].xyz_, -temp[6].xyz_; 15: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[5].xy__, 2D[0]; 1: ADD temp[2].w, temp[0].___w, -const[0].___w; 2: KIL temp[2].wwww; 3: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 4: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 5: MAX temp[3].xyz, temp[3].xyz_, none.000_; 6: TEX temp[8].x, input[3].xy__, 2D[2]; 7: MUL temp[3].xyz, temp[3].xyz_, temp[8].xxx_; 8: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 9: MUL temp[5].xyz, temp[4].xyz_, const[2].xyz_; 10: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 11: MAD temp[6].xyz, temp[4].xyz_, const[3].xyz_, temp[6].xyz_; 12: MOV output[0].w, none.___0; 13: ADD temp[7].xyz, const[4].xyz_, -temp[6].xyz_; 14: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[5].xy__, 2D[0]; 1: ADD temp[2].w, temp[0].___w, -const[0].___w; 2: MOV temp[1], temp[2].wwww; 3: KIL temp[1]; 4: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 5: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 6: MAX temp[3].xyz, temp[3].xyz_, none.000_; 7: TEX temp[8].x, input[3].xy__, 2D[2]; 8: MUL temp[3].xyz, temp[3].xyz_, temp[8].xxx_; 9: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 10: MUL temp[5].xyz, temp[4].xyz_, const[2].xyz_; 11: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 12: MAD temp[6].xyz, temp[4].xyz_, const[3].xyz_, temp[6].xyz_; 13: MOV output[0].w, none.___0; 14: ADD temp[7].xyz, const[4].xyz_, -temp[6].xyz_; 15: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[5].xy__, 2D[0]; 1: src0.w = temp[0], src1.w = const[0] MAD temp[2].w, src0.w, src0.1, -src1.w 2: src0.w = temp[2] MAD temp[1].xyz, src0.www, src0.111, src0.000 MAD temp[1].w, src0.w, src0.1, src0.0 3: KIL temp[1]; 4: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 5: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[3].xyz, src0.zzz, src1.xyz, src0.000 6: src0.xyz = temp[3] MAX temp[3].xyz, src0.xyz, src0.000 7: TEX temp[8].x, input[3].xy__, 2D[2]; 8: src0.xyz = temp[3], src1.xyz = temp[8] MAD temp[3].xyz, src0.xyz, src1.xxx, src0.000 9: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 10: src0.xyz = temp[4], src1.xyz = const[2] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 11: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 12: src0.xyz = temp[4], src1.xyz = const[3], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 13: MAD color[0].w, src0.0, src0.1, src0.0 14: src0.xyz = const[4], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 15: src0.xyz = input[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8].x, input[3].xy__, 2D[2]; 2: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 3: TEX temp[0], input[5].xy__, 2D[0]; 4: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = const[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[2].w, src0.w, src0.1, -src1.w 5: src0.w = temp[2] MAD temp[1].xyz, src0.www, src0.111, src0.000 MAD temp[1].w, src0.w, src0.1, src0.0 6: src0.xyz = temp[4], src1.xyz = const[2] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 7: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[3].xyz, src0.zzz, src1.xyz, src0.000 8: src0.xyz = temp[3] MAX temp[3].xyz, src0.xyz, src0.000 9: src0.xyz = temp[3], src1.xyz = temp[8] MAD temp[3].xyz, src0.xyz, src1.xxx, src0.000 10: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 11: src0.xyz = temp[4], src1.xyz = const[3], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 12: src0.xyz = const[4], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 13: src0.xyz = input[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 14: BEGIN_TEX; 15: KIL temp[1]; Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[6].x, temp[3].xy__, 2D[2]; 2: TXP temp[4].xyz, temp[4].xy_w, 2D[1]; 3: TEX temp[3], temp[5].xy__, 2D[0]; 4: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[0], src1.w = const[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[4].w, src0.w, src0.1, -src1.w 5: src0.w = temp[4] MAD temp[0].xyz, src0.www, src0.111, src0.000 MAD temp[0].w, src0.w, src0.1, src0.0 6: src0.xyz = temp[3], src1.xyz = const[2] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 7: src0.xyz = temp[2], src1.xyz = temp[4] MAD temp[2].xyz, src0.zzz, src1.xyz, src0.000 8: src0.xyz = temp[2] MAX temp[2].xyz, src0.xyz, src0.000 9: src0.xyz = temp[2], src1.xyz = temp[6] MAD temp[2].xyz, src0.xyz, src1.xxx, src0.000 10: src0.xyz = temp[2], src1.xyz = temp[5] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 11: src0.xyz = temp[3], src1.xyz = const[3], src2.xyz = temp[2] MAD temp[2].xyz, src0.xyz, src1.xyz, src2.xyz 12: src0.xyz = const[4], src1.xyz = temp[2] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz 13: src0.xyz = temp[1], src1.xyz = temp[3], src2.xyz = temp[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 14: BEGIN_TEX; 15: KIL temp[0]; pc=29************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 9, tex_end: 2 (code_addr: 00440240) TEX: TEX t6, t3, texture[2] (00009183) TXP t4, t4, texture[1] (00018904) TEX t3, t5, texture[0] (000080c5) 0: xyz: t3 t0 t0 -> t3.xyz (038c0003) w: t3 c0 t0 -> t4.w (00900803) xyz: t3.xyz t0.xyz 0.0 op: 00050200 w: t3.w 1.0 -c0.w op: 000a8889 1: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t4 t0 t0 -> t0.w (00800004) xyz: t4.www 1.0 0.0 op: 00050a8c w: t4.w 1.0 0.0 op: 00040889 2: xyz: t3 c2 t0 -> t5.xyz (03940883) w: t0 t0 t0 -> o0.w (01000000) xyz: t3.xyz c2.xyz 0.0 op: 00050200 w: 0.0 1.0 0.0 op: 00040890 3: xyz: t2 t4 t0 -> t2.xyz (03880102) w: t0 t0 t0 -> (00000000) xyz: t2.zzz t4.xyz 0.0 op: 00050203 w: t2.x t2.x t2.x op: 00000000 4: xyz: t2 t0 t0 -> t2.xyz (03880002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz 0.0 t2.xxx op: 02804a00 w: t2.x t2.x t2.x op: 00000000 5: xyz: t2 t6 t0 -> t2.xyz (03880182) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t6.xxx 0.0 op: 00050280 w: t2.x t2.x t2.x op: 00000000 6: xyz: t2 t5 t0 -> t2.xyz (03880142) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t5.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 7: xyz: t3 c3 t2 -> t2.xyz (038828c3) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c3.xyz t2.xyz op: 00020200 w: t3.x t3.x t3.x op: 00000000 8: xyz: c4 t2 t0 -> t3.xyz (038c00a4) w: t0 t0 t0 -> (00000000) xyz: c4.xyz 1.0 -t2.xyz op: 00090a80 w: c4.x c4.x c4.x op: 00000000 9: xyz: t1 t3 t2 -> o0.xyz (1c0020c1) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t3.xyz t2.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 10, tex_offset: 3, alu_end: 0, tex_end: 0 (code_addr: 0000300a) TEX: KIL t0, t0, texture[0] (00010000) 10: xyz: t0 t0 t0 -> (00000000) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: t0.x t0.x t0.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[0], 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 CONST[1..3] DCL TEMP[0..6] IMM FLT32 { 0.3000, 0.5900, 0.1100, 0.0000} 0: TEX TEMP[0], IN[5], SAMP[0], 2D 1: MOV TEMP[1], TEMP[2] 2: TXP TEMP[2], IN[4], SAMP[1], 2D 3: MUL TEMP[3], IN[2].zzzz, TEMP[2] 4: MAX TEMP[3], TEMP[3], IMM[0].wwww 5: TEX TEMP[2].x, IN[3], SAMP[2], 2D 6: MUL TEMP[3], TEMP[3], TEMP[2].xxxx 7: MUL TEMP[4], TEMP[0], IN[0] 8: MUL TEMP[5], TEMP[4], CONST[1] 9: MUL TEMP[6], TEMP[3], TEMP[5] 10: MAD TEMP[6], TEMP[4], CONST[2], TEMP[6] 11: TEX TEMP[2], IN[5], SAMP[3], 2D 12: ADD TEMP[6], TEMP[2], TEMP[6] 13: MOV OUT[0].w, IMM[0].wwww 14: LRP OUT[0].xyz, IN[1].xxxx, CONST[3], TEMP[6] 15: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: TEX temp[2], input[5], 2D[3]; 12: ADD temp[6], temp[2], temp[6]; 13: MOV output[0].w, const[4].wwww; 14: LRP output[0].xyz, input[1].xxxx, const[3], temp[6]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: TEX temp[2], input[5], 2D[3]; 12: ADD temp[6], temp[2], temp[6]; 13: MOV output[0].w, const[4].wwww; 14: LRP output[0].xyz, input[1].xxxx, const[3], temp[6]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: TEX temp[2], input[5], 2D[3]; 12: ADD temp[6], temp[2], temp[6]; 13: MOV output[0].w, const[4].wwww; 14: LRP output[0].xyz, input[1].xxxx, const[3], temp[6]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[2].x, input[3], 2D[2]; 6: MUL temp[3], temp[3], temp[2].xxxx; 7: MUL temp[4], temp[0], input[0]; 8: MUL temp[5], temp[4], const[1]; 9: MUL temp[6], temp[3], temp[5]; 10: MAD temp[6], temp[4], const[2], temp[6]; 11: TEX temp[2], input[5], 2D[3]; 12: ADD temp[6], temp[2], temp[6]; 13: MOV output[0].w, const[4].wwww; 14: ADD temp[7], const[3], -temp[6]; 15: MAD output[0].xyz, input[1].xxxx, temp[7], temp[6]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[5], 2D[0]; 1: MOV temp[1], temp[2]; 2: TXP temp[2], input[4], 2D[1]; 3: MUL temp[3], input[2].zzzz, temp[2]; 4: MAX temp[3], temp[3], const[4].wwww; 5: TEX temp[8], input[3], 2D[2]; 6: MOV temp[2].x, temp[8]; 7: MUL temp[3], temp[3], temp[2].xxxx; 8: MUL temp[4], temp[0], input[0]; 9: MUL temp[5], temp[4], const[1]; 10: MUL temp[6], temp[3], temp[5]; 11: MAD temp[6], temp[4], const[2], temp[6]; 12: TEX temp[2], input[5], 2D[3]; 13: ADD temp[6], temp[2], temp[6]; 14: MOV output[0].w, const[4].wwww; 15: ADD temp[7], const[3], -temp[6]; 16: MAD output[0].xyz, input[1].xxxx, temp[7], temp[6]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 3: MAX temp[3].xyz, temp[3].xyz_, const[4].www_; 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: MOV temp[2].x, temp[8].x___; 6: MUL temp[3].xyz, temp[3].xyz_, temp[2].xxx_; 7: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 8: MUL temp[5].xyz, temp[4].xyz_, const[1].xyz_; 9: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 10: MAD temp[6].xyz, temp[4].xyz_, const[2].xyz_, temp[6].xyz_; 11: TEX temp[2].xyz, input[5].xy__, 2D[3]; 12: ADD temp[6].xyz, temp[2].xyz_, temp[6].xyz_; 13: MOV output[0].w, const[4].___w; 14: ADD temp[7].xyz, const[3].xyz_, -temp[6].xyz_; 15: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 3: MAX temp[3].xyz, temp[3].xyz_, none.000_; 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: MUL temp[3].xyz, temp[3].xyz_, temp[8].xxx_; 6: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 7: MUL temp[5].xyz, temp[4].xyz_, const[1].xyz_; 8: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 9: MAD temp[6].xyz, temp[4].xyz_, const[2].xyz_, temp[6].xyz_; 10: TEX temp[2].xyz, input[5].xy__, 2D[3]; 11: ADD temp[6].xyz, temp[2].xyz_, temp[6].xyz_; 12: MOV output[0].w, none.___0; 13: ADD temp[7].xyz, const[3].xyz_, -temp[6].xyz_; 14: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: MUL temp[3].xyz, input[2].zzz_, temp[2].xyz_; 3: MAX temp[3].xyz, temp[3].xyz_, none.000_; 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: MUL temp[3].xyz, temp[3].xyz_, temp[8].xxx_; 6: MUL temp[4].xyz, temp[0].xyz_, input[0].xyz_; 7: MUL temp[5].xyz, temp[4].xyz_, const[1].xyz_; 8: MUL temp[6].xyz, temp[3].xyz_, temp[5].xyz_; 9: MAD temp[6].xyz, temp[4].xyz_, const[2].xyz_, temp[6].xyz_; 10: TEX temp[2].xyz, input[5].xy__, 2D[3]; 11: ADD temp[6].xyz, temp[2].xyz_, temp[6].xyz_; 12: MOV output[0].w, none.___0; 13: ADD temp[7].xyz, const[3].xyz_, -temp[6].xyz_; 14: MAD output[0].xyz, input[1].xxx_, temp[7].xyz_, temp[6].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].xyz, input[5].xy__, 2D[0]; 1: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 2: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[3].xyz, src0.zzz, src1.xyz, src0.000 3: src0.xyz = temp[3] MAX temp[3].xyz, src0.xyz, src0.000 4: TEX temp[8].x, input[3].xy__, 2D[2]; 5: src0.xyz = temp[3], src1.xyz = temp[8] MAD temp[3].xyz, src0.xyz, src1.xxx, src0.000 6: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 7: src0.xyz = temp[4], src1.xyz = const[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 8: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 9: src0.xyz = temp[4], src1.xyz = const[2], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 10: TEX temp[2].xyz, input[5].xy__, 2D[3]; 11: src0.xyz = temp[2], src1.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src0.111, src1.xyz 12: MAD color[0].w, src0.0, src0.1, src0.0 13: src0.xyz = const[3], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 14: src0.xyz = input[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8].x, input[3].xy__, 2D[2]; 2: TXP temp[2].xyz, input[4].xy_w, 2D[1]; 3: TEX temp[0].xyz, input[5].xy__, 2D[0]; 4: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 5: src0.xyz = temp[4], src1.xyz = const[1] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 6: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[3].xyz, src0.zzz, src1.xyz, src0.000 7: src0.xyz = temp[3] MAX temp[3].xyz, src0.xyz, src0.000 8: src0.xyz = temp[3], src1.xyz = temp[8] MAD temp[3].xyz, src0.xyz, src1.xxx, src0.000 9: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 10: src0.xyz = temp[4], src1.xyz = const[2], src2.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src1.xyz, src2.xyz 11: BEGIN_TEX; 12: TEX temp[2].xyz, input[5].xy__, 2D[3]; 13: src0.xyz = temp[2], src1.xyz = temp[6] MAD temp[6].xyz, src0.xyz, src0.111, src1.xyz 14: src0.xyz = const[3], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 15: src0.xyz = input[1], src1.xyz = temp[7], src2.xyz = temp[6] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[7].x, temp[3].xy__, 2D[2]; 2: TXP temp[4].xyz, temp[4].xy_w, 2D[1]; 3: TEX temp[3].xyz, temp[5].xy__, 2D[0]; 4: src0.xyz = temp[3], src1.xyz = temp[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.0, src0.1, src0.0 5: src0.xyz = temp[3], src1.xyz = const[1] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 6: src0.xyz = temp[2], src1.xyz = temp[4] MAD temp[0].xyz, src0.zzz, src1.xyz, src0.000 7: src0.xyz = temp[0] MAX temp[0].xyz, src0.xyz, src0.000 8: src0.xyz = temp[0], src1.xyz = temp[7] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 9: src0.xyz = temp[0], src1.xyz = temp[6] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 10: src0.xyz = temp[3], src1.xyz = const[2], src2.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src2.xyz 11: BEGIN_TEX; 12: TEX temp[4].xyz, temp[5].xy__, 2D[3]; 13: src0.xyz = temp[4], src1.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, src1.xyz 14: src0.xyz = const[3], src1.xyz = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 15: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = temp[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=30************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 6, tex_end: 2 (code_addr: 00440180) TEX: TEX t7, t3, texture[2] (000091c3) TXP t4, t4, texture[1] (00018904) TEX t3, t5, texture[0] (000080c5) 0: xyz: t3 t0 t0 -> t3.xyz (038c0003) w: t0 t0 t0 -> o0.w (01000000) xyz: t3.xyz t0.xyz 0.0 op: 00050200 w: 0.0 1.0 0.0 op: 00040890 1: xyz: t3 c1 t0 -> t6.xyz (03980843) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c1.xyz 0.0 op: 00050200 w: t3.x t3.x t3.x op: 00000000 2: xyz: t2 t4 t0 -> t0.xyz (03800102) w: t0 t0 t0 -> (00000000) xyz: t2.zzz t4.xyz 0.0 op: 00050203 w: t2.x t2.x t2.x op: 00000000 3: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz 0.0 t0.xxx op: 02804a00 w: t0.x t0.x t0.x op: 00000000 4: xyz: t0 t7 t0 -> t0.xyz (038001c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t7.xxx 0.0 op: 00050280 w: t0.x t0.x t0.x op: 00000000 5: xyz: t0 t6 t0 -> t0.xyz (03800180) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t6.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 6: xyz: t3 c2 t0 -> t0.xyz (03800883) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c2.xyz t0.xyz op: 00020200 w: t3.x t3.x t3.x op: 00000000 NODE 1: alu_offset: 7, tex_offset: 3, alu_end: 2, tex_end: 0 (code_addr: 00403087) TEX: TEX t4, t5, texture[3] (00009905) 7: xyz: t4 t0 t0 -> t0.xyz (03800004) w: t0 t0 t0 -> (00000000) xyz: t4.xyz 1.0 t0.xyz op: 00010a80 w: t4.x t4.x t4.x op: 00000000 8: xyz: c3 t0 t0 -> t2.xyz (03880023) w: t0 t0 t0 -> (00000000) xyz: c3.xyz 1.0 -t0.xyz op: 00090a80 w: c3.x c3.x c3.x op: 00000000 9: xyz: t1 t2 t0 -> o0.xyz (1c000081) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t2.xyz t0.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow passes # 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 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 pc=31************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[4], PERSPECTIVE DCL IN[3], GENERIC[5], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[0..3] DCL TEMP[0..3] 0: TEX TEMP[0], IN[2], SAMP[0], 2D 1: MOV TEMP[1], IN[3] 2: TEX TEMP[2], TEMP[1], SAMP[1], CUBE 3: MUL TEMP[2], TEMP[2], CONST[0] 4: MUL TEMP[3], TEMP[0], CONST[1] 5: MUL TEMP[3], TEMP[2], TEMP[3] 6: MUL TEMP[3], CONST[2].xxxx, TEMP[3] 7: LRP TEMP[3].xyz, IN[1].xxxx, CONST[3], TEMP[3] 8: MUL OUT[0], TEMP[3], IN[0] 9: MOV OUT[0].w, CONST[2].yyyy 10: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MOV temp[1], input[3]; 2: TEX temp[2], temp[1], CUBE[1]; 3: MUL temp[2], temp[2], const[0]; 4: MUL temp[3], temp[0], const[1]; 5: MUL temp[3], temp[2], temp[3]; 6: MUL temp[3], const[2].xxxx, temp[3]; 7: LRP temp[3].xyz, input[1].xxxx, const[3], temp[3]; 8: MUL output[0], temp[3], input[0]; 9: MOV output[0].w, const[2].yyyy; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MOV temp[1], input[3]; 2: TEX temp[2], temp[1], CUBE[1]; 3: MUL temp[2], temp[2], const[0]; 4: MUL temp[3], temp[0], const[1]; 5: MUL temp[3], temp[2], temp[3]; 6: MUL temp[3], const[2].xxxx, temp[3]; 7: LRP temp[3].xyz, input[1].xxxx, const[3], temp[3]; 8: MUL output[0], temp[3], input[0]; 9: MOV output[0].w, const[2].yyyy; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MOV temp[1], input[3]; 2: TEX temp[2], temp[1], CUBE[1]; 3: MUL temp[2], temp[2], const[0]; 4: MUL temp[3], temp[0], const[1]; 5: MUL temp[3], temp[2], temp[3]; 6: MUL temp[3], const[2].xxxx, temp[3]; 7: LRP temp[3].xyz, input[1].xxxx, const[3], temp[3]; 8: MUL output[0], temp[3], input[0]; 9: MOV output[0].w, const[2].yyyy; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MOV temp[1], input[3]; 2: TEX temp[2], temp[1], CUBE[1]; 3: MUL temp[2], temp[2], const[0]; 4: MUL temp[3], temp[0], const[1]; 5: MUL temp[3], temp[2], temp[3]; 6: MUL temp[3], const[2].xxxx, temp[3]; 7: ADD temp[4], const[3], -temp[3]; 8: MAD temp[3].xyz, input[1].xxxx, temp[4], temp[3]; 9: MUL output[0], temp[3], input[0]; 10: MOV output[0].w, const[2].yyyy; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[0]; 1: MOV temp[1], input[3]; 2: TEX temp[2], temp[1], CUBE[1]; 3: MUL temp[2], temp[2], const[0]; 4: MUL temp[3], temp[0], const[1]; 5: MUL temp[3], temp[2], temp[3]; 6: MUL temp[3], const[2].xxxx, temp[3]; 7: ADD temp[4], const[3], -temp[3]; 8: MAD temp[3].xyz, input[1].xxxx, temp[4], temp[3]; 9: MUL output[0], temp[3], input[0]; 10: MOV output[0].w, const[2].yyyy; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].xyz, input[2].xy__, 2D[0]; 1: MOV temp[1].xyz, input[3].xyz_; 2: TEX temp[2].xyz, temp[1].xyz_, CUBE[1]; 3: MUL temp[2].xyz, temp[2].xyz_, const[0].xyz_; 4: MUL temp[3].xyz, temp[0].xyz_, const[1].xyz_; 5: MUL temp[3].xyz, temp[2].xyz_, temp[3].xyz_; 6: MUL temp[3].xyz, const[2].xxx_, temp[3].xyz_; 7: ADD temp[4].xyz, const[3].xyz_, -temp[3].xyz_; 8: MAD temp[3].xyz, input[1].xxx_, temp[4].xyz_, temp[3].xyz_; 9: MUL output[0].xyz, temp[3].xyz_, input[0].xyz_; 10: MOV output[0].w, const[2].___y; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].xyz, input[2].xy__, 2D[0]; 1: TEX temp[2].xyz, input[3].xyz_, CUBE[1]; 2: MUL temp[2].xyz, temp[2].xyz_, const[0].xyz_; 3: MUL temp[3].xyz, temp[0].xyz_, const[1].xyz_; 4: MUL temp[3].xyz, temp[2].xyz_, temp[3].xyz_; 5: MUL temp[3].xyz, const[2].xxx_, temp[3].xyz_; 6: ADD temp[4].xyz, const[3].xyz_, -temp[3].xyz_; 7: MAD temp[3].xyz, input[1].xxx_, temp[4].xyz_, temp[3].xyz_; 8: MUL output[0].xyz, temp[3].xyz_, input[0].xyz_; 9: MOV output[0].w, const[2].___y; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].xyz, input[2].xy__, 2D[0]; 1: TEX temp[2].xyz, input[3].xyz_, CUBE[1]; 2: MUL temp[2].xyz, temp[2].xyz_, const[0].xyz_; 3: MUL temp[3].xyz, temp[0].xyz_, const[1].xyz_; 4: MUL temp[3].xyz, temp[2].xyz_, temp[3].xyz_; 5: MUL temp[3].xyz, const[2].xxx_, temp[3].xyz_; 6: ADD temp[4].xyz, const[3].xyz_, -temp[3].xyz_; 7: MAD temp[3].xyz, input[1].xxx_, temp[4].xyz_, temp[3].xyz_; 8: MUL output[0].xyz, temp[3].xyz_, input[0].xyz_; 9: MOV output[0].w, const[2].___y; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].xyz, input[2].xy__, 2D[0]; 1: TEX temp[2].xyz, input[3].xyz_, CUBE[1]; 2: src0.xyz = temp[2], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 3: src0.xyz = temp[0], src1.xyz = const[1] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 4: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 5: src0.xyz = const[2], src1.xyz = temp[3] MAD temp[3].xyz, src0.xxx, src1.xyz, src0.000 6: src0.xyz = const[3], src1.xyz = temp[3] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz 7: src0.xyz = input[1], src1.xyz = temp[4], src2.xyz = temp[3] MAD temp[3].xyz, src0.xxx, src1.xyz, src2.xyz 8: src0.xyz = temp[3], src1.xyz = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 9: src0.xyz = const[2] MAD color[0].w, src0.y, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2].xyz, input[3].xyz_, CUBE[1]; 2: TEX temp[0].xyz, input[2].xy__, 2D[0]; 3: src0.xyz = temp[0], src1.xyz = const[1], src2.xyz = const[2] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src2.y, src0.1, src0.0 4: src0.xyz = temp[2], src1.xyz = const[0] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 5: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 6: src0.xyz = const[2], src1.xyz = temp[3] MAD temp[3].xyz, src0.xxx, src1.xyz, src0.000 7: src0.xyz = const[3], src1.xyz = temp[3] MAD temp[4].xyz, src0.xyz, src0.111, -src1.xyz 8: src0.xyz = input[1], src1.xyz = temp[4], src2.xyz = temp[3] MAD temp[3].xyz, src0.xxx, src1.xyz, src2.xyz 9: src0.xyz = temp[3], src1.xyz = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 2: TEX temp[2].xyz, temp[2].xy__, 2D[0]; 3: src0.xyz = temp[2], src1.xyz = const[1], src2.xyz = const[2] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src2.y, src0.1, src0.0 4: src0.xyz = temp[3], src1.xyz = const[0] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 5: src0.xyz = temp[3], src1.xyz = temp[2] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 6: src0.xyz = const[2], src1.xyz = temp[2] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 7: src0.xyz = const[3], src1.xyz = temp[2] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz 8: src0.xyz = temp[1], src1.xyz = temp[3], src2.xyz = temp[2] MAD temp[2].xyz, src0.xxx, src1.xyz, src2.xyz 9: src0.xyz = temp[2], src1.xyz = temp[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 pc=32************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 6, tex_end: 1 (code_addr: 00420180) TEX: TEX t3, t3, texture[1] (000088c3) TEX t2, t2, texture[0] (00008082) 0: xyz: t2 c1 c2 -> t2.xyz (038a2842) w: t0 t0 t0 -> o0.w (01000000) xyz: t2.xyz c1.xyz 0.0 op: 00050200 w: c2.y 1.0 0.0 op: 00040887 1: xyz: t3 c0 t0 -> t3.xyz (038c0803) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c0.xyz 0.0 op: 00050200 w: t3.x t3.x t3.x op: 00000000 2: xyz: t3 t2 t0 -> t2.xyz (03880083) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t2.xyz 0.0 op: 00050200 w: t3.x t3.x t3.x op: 00000000 3: xyz: c2 t2 t0 -> t2.xyz (038800a2) w: t0 t0 t0 -> (00000000) xyz: c2.xxx t2.xyz 0.0 op: 00050201 w: c2.x c2.x c2.x op: 00000000 4: xyz: c3 t2 t0 -> t3.xyz (038c00a3) w: t0 t0 t0 -> (00000000) xyz: c3.xyz 1.0 -t2.xyz op: 00090a80 w: c3.x c3.x c3.x op: 00000000 5: xyz: t1 t3 t2 -> t2.xyz (038820c1) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t3.xyz t2.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 6: xyz: t2 t0 t0 -> o0.xyz (1c000002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t0.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 r300: Initial fragment program 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 emulate loops # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], input[0]; Fragment Program: after dataflow passes # 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 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 pc=33************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz 1.0 0.0 op: 00050a80 w: t0.w 1.0 0.0 op: 00040889 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL TEMP[0..1] 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: TEX TEMP[1], IN[2], SAMP[1], 2D 2: MUL TEMP[0], IN[0], TEMP[0] 3: MUL OUT[0], TEMP[1], TEMP[0] 4: 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], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: TEX temp[1], input[2], 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: MUL temp[0], input[0], temp[0]; 3: MUL output[0], temp[1], temp[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: TEX temp[1], input[2].xy__, 2D[1]; 2: src0.xyz = input[0], src0.w = input[0], src1.xyz = temp[0], src1.w = temp[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[1], src0.w = temp[1], 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[1], input[2].xy__, 2D[1]; 2: TEX temp[0], input[1].xy__, 2D[0]; 3: src0.xyz = input[0], src0.w = input[0], src1.xyz = temp[0], src1.w = temp[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[1], src0.w = temp[1], 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 register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], temp[2].xy__, 2D[1]; 2: TEX temp[1], temp[1].xy__, 2D[0]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 pc=34************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 1 (code_addr: 00420040) TEX: TEX t2, t2, texture[1] (00008882) TEX t1, t1, texture[0] (00008041) 0: xyz: t0 t1 t0 -> t1.xyz (03840040) w: t0 t1 t0 -> t1.w (00840040) xyz: t0.xyz t1.xyz 0.0 op: 00050200 w: t0.w t1.w 0.0 op: 00040509 1: xyz: t2 t1 t0 -> o0.xyz (1c000042) w: t2 t1 t0 -> o0.w (01000042) xyz: t2.xyz t1.xyz 0.0 op: 00050200 w: t2.w t1.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL CONST[1] DCL TEMP[0..1] IMM FLT32 { 0.7500, 1.0000, 0.0000, 0.0000} 0: ADD TEMP[0].xy, IN[1], IMM[0].xyzy 1: TEX TEMP[1], IN[1], SAMP[1], 2D 2: TEX TEMP[0], TEMP[0], SAMP[0], 2D 3: ADD TEMP[0], TEMP[0], -TEMP[1] 4: MAD TEMP[0], IN[0].xxxx, TEMP[0], TEMP[1] 5: MUL OUT[0], TEMP[0], CONST[1] 6: END Fragment Program: before compilation # Radeon Compiler Program 0: ADD temp[0].xy, input[1], const[2].xyzy; 1: TEX temp[1], input[1], 2D[1]; 2: TEX temp[0], temp[0], 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after emulate loops # Radeon Compiler Program 0: ADD temp[0].xy, input[1], const[2].xyzy; 1: TEX temp[1], input[1], 2D[1]; 2: TEX temp[0], temp[0], 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after emulate branches # Radeon Compiler Program 0: ADD temp[0].xy, input[1], const[2].xyzy; 1: TEX temp[1], input[1], 2D[1]; 2: TEX temp[0], temp[0], 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: ADD temp[0].xy, input[1], const[2].xyzy; 1: TEX temp[1], input[1], 2D[1]; 2: TEX temp[0], temp[0], 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: ADD temp[0].xy, input[1], const[2].xyzy; 1: TEX temp[1], input[1], 2D[1]; 2: TEX temp[0], temp[0], 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after deadcode # Radeon Compiler Program 0: ADD temp[0].xy, input[1].xy__, const[2].xy__; 1: TEX temp[1], input[1].xy__, 2D[1]; 2: TEX temp[0], temp[0].xy__, 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: ADD temp[0].xy, input[1].xy__, const[2].xy__; 1: TEX temp[1], input[1].xy__, 2D[1]; 2: TEX temp[0], temp[0].xy__, 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: ADD temp[0].xy, input[1].xy__, const[2].xy__; 1: TEX temp[1], input[1].xy__, 2D[1]; 2: TEX temp[0], temp[0].xy__, 2D[0]; 3: ADD temp[0], temp[0], -temp[1]; 4: MAD temp[0], input[0].xxxx, temp[0], temp[1]; 5: MUL output[0], temp[0], const[1]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[1], src1.xyz = const[2] MAD temp[0].xy, src0.xy_, src0.111, src1.xy_ 1: TEX temp[1], input[1].xy__, 2D[1]; 2: TEX temp[0], temp[0].xy__, 2D[0]; 3: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[0].w, src0.w, src0.1, -src1.w 4: src0.xyz = input[0], src0.w = temp[0], src1.xyz = temp[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD temp[0].w, src0.x, src0.w, src1.w 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] 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[1], input[1].xy__, 2D[1]; 2: src0.xyz = input[1], src1.xyz = const[2] MAD temp[0].xy, src0.xy_, src0.111, src1.xy_ 3: BEGIN_TEX; 4: TEX temp[0], temp[0].xy__, 2D[0]; 5: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1], src1.w = temp[1] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[0].w, src0.w, src0.1, -src1.w 6: src0.xyz = input[0], src0.w = temp[0], src1.xyz = temp[0], src1.w = temp[1], src2.xyz = temp[1] MAD temp[0].xyz, src0.xxx, src1.xyz, src2.xyz MAD temp[0].w, src0.x, src0.w, src1.w 7: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[1], src1.w = const[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2], temp[1].xy__, 2D[1]; 2: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src0.111, src1.xy_ 3: BEGIN_TEX; 4: TEX temp[1], temp[1].xy__, 2D[0]; 5: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[2], src1.w = temp[2] MAD temp[1].xyz, src0.xyz, src0.111, -src1.xyz MAD temp[1].w, src0.w, src0.1, -src1.w 6: src0.xyz = temp[0], src0.w = temp[1], src1.xyz = temp[1], src1.w = temp[2], src2.xyz = temp[2] MAD temp[1].xyz, src0.xxx, src1.xyz, src2.xyz MAD temp[1].w, src0.x, src0.w, src1.w 7: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = const[1], src1.w = const[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 pc=35************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000000) TEX: TEX t2, t1, texture[1] (00008881) 0: xyz: t1 c2 t0 -> t1.xy (01840881) w: t0 t0 t0 -> (00000000) xyz: t1.xyz 1.0 c2.xyz op: 00010a80 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 1, tex_offset: 1, alu_end: 2, tex_end: 0 (code_addr: 00401081) TEX: TEX t1, t1, texture[0] (00008041) 1: xyz: t1 t2 t0 -> t1.xyz (03840081) w: t1 t2 t0 -> t1.w (00840081) xyz: t1.xyz 1.0 -t2.xyz op: 00090a80 w: t1.w 1.0 -t2.w op: 000a8889 2: xyz: t0 t1 t2 -> t1.xyz (03842040) w: t1 t2 t0 -> t1.w (00840081) xyz: t0.xxx t1.xyz t2.xyz op: 00020201 w: t0.x t1.w t2.w op: 00028480 3: xyz: t1 c1 t0 -> o0.xyz (1c000841) w: t1 c1 t0 -> o0.w (01000841) xyz: t1.xyz c1.xyz 0.0 op: 00050200 w: t1.w c1.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR DCL OUT[0], COLOR DCL CONST[0] 0: MOV OUT[0], IN[0] 1: LRP OUT[0].xyz, IN[1].xxxx, CONST[0], IN[0] 2: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], input[0]; 1: LRP output[0].xyz, input[1].xxxx, const[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], input[0]; 1: LRP output[0].xyz, input[1].xxxx, const[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], input[0]; 1: LRP output[0].xyz, input[1].xxxx, const[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], input[0]; 1: ADD temp[0], const[0], -input[0]; 2: MAD output[0].xyz, input[1].xxxx, temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], input[0]; 1: ADD temp[0], const[0], -input[0]; 2: MAD output[0].xyz, input[1].xxxx, temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0].w, input[0].___w; 1: ADD temp[0].xyz, const[0].xyz_, -input[0].xyz_; 2: MAD output[0].xyz, input[1].xxx_, temp[0].xyz_, input[0].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0].w, input[0].___w; 1: ADD temp[0].xyz, const[0].xyz_, -input[0].xyz_; 2: MAD output[0].xyz, input[1].xxx_, temp[0].xyz_, input[0].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0].w, input[0].___w; 1: ADD temp[0].xyz, const[0].xyz_, -input[0].xyz_; 2: MAD output[0].xyz, input[1].xxx_, temp[0].xyz_, input[0].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] MAD color[0].w, src0.w, src0.1, src0.0 1: src0.xyz = const[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xyz 2: src0.xyz = input[1], src1.xyz = temp[0], src2.xyz = input[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: src0.xyz = const[0], src0.w = input[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src0.111, -src1.xyz MAD color[0].w, src0.w, src0.1, src0.0 1: src0.xyz = input[1], src1.xyz = temp[0], src2.xyz = input[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = const[0], src0.w = temp[0], src1.xyz = temp[0] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz MAD color[0].w, src0.w, src0.1, src0.0 1: src0.xyz = temp[1], src1.xyz = temp[2], src2.xyz = temp[0] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=36************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 0 (code_addr: 00400040) 0: xyz: c0 t0 t0 -> t2.xyz (03880020) w: t0 t0 t0 -> o0.w (01000000) xyz: c0.xyz 1.0 -t0.xyz op: 00090a80 w: t0.w 1.0 0.0 op: 00040889 1: xyz: t1 t2 t0 -> o0.xyz (1c000081) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t2.xyz t0.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[1] DCL TEMP[0] IMM FLT32 { 1.0000, 0.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[1], SAMP[0], 2D 1: SUB TEMP[0], TEMP[0], IMM[0].xxxx 2: MUL TEMP[0], TEMP[0], IN[0] 3: MAD OUT[0].xyz, TEMP[0], CONST[1], IMM[0].xxxx 4: MOV OUT[0].w, IMM[0].xxxx 5: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: SUB temp[0], temp[0], temp[0].1111; 2: MUL temp[0], temp[0], input[0]; 3: MAD output[0].xyz, temp[0], const[1], temp[0].1111; 4: MOV output[0].w, temp[0].1111; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: SUB temp[0], temp[0], temp[0].1111; 2: MUL temp[0], temp[0], input[0]; 3: MAD output[0].xyz, temp[0], const[1], temp[0].1111; 4: MOV output[0].w, temp[0].1111; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: SUB temp[0], temp[0], temp[0].1111; 2: MUL temp[0], temp[0], input[0]; 3: MAD output[0].xyz, temp[0], const[1], temp[0].1111; 4: MOV output[0].w, temp[0].1111; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: ADD temp[0], temp[0], -temp[0].1111; 2: MUL temp[0], temp[0], input[0]; 3: MAD output[0].xyz, temp[0], const[1], temp[0].1111; 4: MOV output[0].w, temp[0].1111; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: ADD temp[0], temp[0], -temp[0].1111; 2: MUL temp[0], temp[0], input[0]; 3: MAD output[0].xyz, temp[0], const[1], temp[0].1111; 4: MOV output[0].w, temp[0].1111; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: ADD temp[0].xyz, temp[0].xyz_, -temp[0].111_; 2: MUL temp[0].xyz, temp[0].xyz_, input[0].xyz_; 3: MAD output[0].xyz, temp[0].xyz_, const[1].xyz_, temp[0].111_; 4: MOV output[0].w, temp[0].___1; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: ADD temp[0].xyz, temp[0].xyz_, -temp[0].111_; 2: MUL temp[0].xyz, temp[0].xyz_, input[0].xyz_; 3: MAD output[0].xyz, temp[0].xyz_, const[1].xyz_, temp[0].111_; 4: MOV output[0].w, temp[0].___1; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: ADD temp[0].xyz, temp[0].xyz_, -temp[0].111_; 2: MUL temp[0].xyz, temp[0].xyz_, input[0].xyz_; 3: MAD output[0].xyz, temp[0].xyz_, const[1].xyz_, temp[0].111_; 4: MOV output[0].w, temp[0].___1; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].xyz, input[1].xy__, 2D[0]; 1: src0.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.111 2: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 3: src0.xyz = temp[0], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.111 4: MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0].xyz, input[1].xy__, 2D[0]; 2: src0.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.111 MAD color[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 4: src0.xyz = temp[0], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.111 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1].xyz, temp[1].xy__, 2D[0]; 2: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, -src0.111 MAD color[0].w, src0.1, src0.1, src0.0 3: src0.xyz = temp[1], src1.xyz = temp[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 4: src0.xyz = temp[1], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src1.xyz, src0.111 pc=37************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 2, tex_end: 0 (code_addr: 00400080) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t0 t0 t0 -> o0.w (01000000) xyz: t1.xyz 1.0 -1.0 op: 000d4a80 w: 1.0 1.0 0.0 op: 00040891 1: xyz: t1 t0 t0 -> t1.xyz (03840001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 2: xyz: t1 c1 t0 -> o0.xyz (1c000841) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c1.xyz 1.0 op: 00054200 w: t1.x t1.x t1.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR, LINEAR DCL IN[2], COLOR[1], LINEAR DCL IN[3], GENERIC[0], PERSPECTIVE DCL IN[4], GENERIC[1], PERSPECTIVE DCL IN[5], GENERIC[4], PERSPECTIVE DCL IN[6], GENERIC[5], PERSPECTIVE DCL IN[7], GENERIC[6], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL CONST[4..5] DCL CONST[1..3] DCL TEMP[0..2] IMM FLT32 { 2.0000, 1.0000, 0.5000, 0.0625} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[5], IN[0] 2: TEX TEMP[1], IN[4], SAMP[1], 2D 3: MUL TEMP[1].xyz, TEMP[1], IMM[0].xxxx 4: ADD TEMP[1].xyz, TEMP[1], -IMM[0].yyyy 5: MUL TEMP[2].xyz, IN[6], TEMP[1].yyyy 6: MAD TEMP[2].xyz, IN[5], -TEMP[1].xxxx, TEMP[2] 7: MAD TEMP[1].xyz, IN[7], TEMP[1].zzzz, TEMP[2] 8: DP3 TEMP[2].x, TEMP[1], TEMP[1] 9: RSQ TEMP[2].x, TEMP[2].xxxx 10: MUL TEMP[2].xyz, TEMP[2].xxxx, TEMP[1] 11: TEX TEMP[1].xyz, TEMP[2], SAMP[2], CUBE 12: DP3 TEMP[2].x, TEMP[2], CONST[1] 13: MAX TEMP[1].w, TEMP[2].xxxx, TEMP[1] 14: MUL TEMP[1].xyz, TEMP[1], CONST[2].xxxx 15: MAD TEMP[2].xyz, TEMP[1].wwww, CONST[3], TEMP[1] 16: TEX TEMP[1], IN[3], SAMP[1], 2D 17: MUL TEMP[1].xyz, TEMP[1], TEMP[2] 18: ADD TEMP[2].xyz, -TEMP[1], CONST[4] 19: MUL TEMP[2].xyz, IN[2].xxxx, TEMP[2] 20: ADD OUT[0].xyz, TEMP[1], TEMP[2] 21: MAD TEMP[1].xy, TEMP[0], IMM[0].wwww, IMM[0].wwww 22: TEX TEMP[2].w, TEMP[1], SAMP[0], 2D 23: SLT TEMP[1].x, TEMP[1].wwww, IMM[0].zzzz 24: SLT TEMP[1].y, IN[1].wwww, TEMP[2].wwww 25: MOV OUT[0].w, TEMP[1] 26: KIL -TEMP[1].xxxx 27: KIL -TEMP[1].yyyy 28: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[3].w, input[0].wwww; 1: MUL temp[3].xyz, input[0], temp[3].wwww; 2: MAD temp[3].xyz, temp[3].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[3]; 4: SUB temp[0].y, const[5], temp[3]; 5: TEX temp[1], input[4], 2D[1]; 6: MUL temp[1].xyz, temp[1], const[6].xxxx; 7: ADD temp[1].xyz, temp[1], -const[6].yyyy; 8: MUL temp[2].xyz, input[6], temp[1].yyyy; 9: MAD temp[2].xyz, input[5], -temp[1].xxxx, temp[2]; 10: MAD temp[1].xyz, input[7], temp[1].zzzz, temp[2]; 11: DP3 temp[2].x, temp[1], temp[1]; 12: RSQ temp[2].x, temp[2].xxxx; 13: MUL temp[2].xyz, temp[2].xxxx, temp[1]; 14: TEX temp[1].xyz, temp[2], CUBE[2]; 15: DP3 temp[2].x, temp[2], const[1]; 16: MAX temp[1].w, temp[2].xxxx, temp[1]; 17: MUL temp[1].xyz, temp[1], const[2].xxxx; 18: MAD temp[2].xyz, temp[1].wwww, const[3], temp[1]; 19: TEX temp[1], input[3], 2D[1]; 20: MUL temp[1].xyz, temp[1], temp[2]; 21: ADD temp[2].xyz, -temp[1], const[4]; 22: MUL temp[2].xyz, input[2].xxxx, temp[2]; 23: ADD output[0].xyz, temp[1], temp[2]; 24: MAD temp[1].xy, temp[0], const[6].wwww, const[6].wwww; 25: TEX temp[2].w, temp[1], 2D[0]; 26: SLT temp[1].x, temp[1].wwww, const[6].zzzz; 27: SLT temp[1].y, input[1].wwww, temp[2].wwww; 28: MOV output[0].w, temp[1]; 29: KIL -temp[1].xxxx; 30: KIL -temp[1].yyyy; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[3].w, input[0].wwww; 1: MUL temp[3].xyz, input[0], temp[3].wwww; 2: MAD temp[3].xyz, temp[3].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[3]; 4: SUB temp[0].y, const[5], temp[3]; 5: TEX temp[1], input[4], 2D[1]; 6: MUL temp[1].xyz, temp[1], const[6].xxxx; 7: ADD temp[1].xyz, temp[1], -const[6].yyyy; 8: MUL temp[2].xyz, input[6], temp[1].yyyy; 9: MAD temp[2].xyz, input[5], -temp[1].xxxx, temp[2]; 10: MAD temp[1].xyz, input[7], temp[1].zzzz, temp[2]; 11: DP3 temp[2].x, temp[1], temp[1]; 12: RSQ temp[2].x, temp[2].xxxx; 13: MUL temp[2].xyz, temp[2].xxxx, temp[1]; 14: TEX temp[1].xyz, temp[2], CUBE[2]; 15: DP3 temp[2].x, temp[2], const[1]; 16: MAX temp[1].w, temp[2].xxxx, temp[1]; 17: MUL temp[1].xyz, temp[1], const[2].xxxx; 18: MAD temp[2].xyz, temp[1].wwww, const[3], temp[1]; 19: TEX temp[1], input[3], 2D[1]; 20: MUL temp[1].xyz, temp[1], temp[2]; 21: ADD temp[2].xyz, -temp[1], const[4]; 22: MUL temp[2].xyz, input[2].xxxx, temp[2]; 23: ADD output[0].xyz, temp[1], temp[2]; 24: MAD temp[1].xy, temp[0], const[6].wwww, const[6].wwww; 25: TEX temp[2].w, temp[1], 2D[0]; 26: SLT temp[1].x, temp[1].wwww, const[6].zzzz; 27: SLT temp[1].y, input[1].wwww, temp[2].wwww; 28: MOV output[0].w, temp[1]; 29: KIL -temp[1].xxxx; 30: KIL -temp[1].yyyy; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[3].w, input[0].wwww; 1: MUL temp[3].xyz, input[0], temp[3].wwww; 2: MAD temp[3].xyz, temp[3].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[3]; 4: SUB temp[0].y, const[5], temp[3]; 5: TEX temp[1], input[4], 2D[1]; 6: MUL temp[1].xyz, temp[1], const[6].xxxx; 7: ADD temp[1].xyz, temp[1], -const[6].yyyy; 8: MUL temp[2].xyz, input[6], temp[1].yyyy; 9: MAD temp[2].xyz, input[5], -temp[1].xxxx, temp[2]; 10: MAD temp[1].xyz, input[7], temp[1].zzzz, temp[2]; 11: DP3 temp[2].x, temp[1], temp[1]; 12: RSQ temp[2].x, temp[2].xxxx; 13: MUL temp[2].xyz, temp[2].xxxx, temp[1]; 14: TEX temp[1].xyz, temp[2], CUBE[2]; 15: DP3 temp[2].x, temp[2], const[1]; 16: MAX temp[1].w, temp[2].xxxx, temp[1]; 17: MUL temp[1].xyz, temp[1], const[2].xxxx; 18: MAD temp[2].xyz, temp[1].wwww, const[3], temp[1]; 19: TEX temp[1], input[3], 2D[1]; 20: MUL temp[1].xyz, temp[1], temp[2]; 21: ADD temp[2].xyz, -temp[1], const[4]; 22: MUL temp[2].xyz, input[2].xxxx, temp[2]; 23: ADD output[0].xyz, temp[1], temp[2]; 24: MAD temp[1].xy, temp[0], const[6].wwww, const[6].wwww; 25: TEX temp[2].w, temp[1], 2D[0]; 26: SLT temp[1].x, temp[1].wwww, const[6].zzzz; 27: SLT temp[1].y, input[1].wwww, temp[2].wwww; 28: MOV output[0].w, temp[1]; 29: KIL -temp[1].xxxx; 30: KIL -temp[1].yyyy; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[3].w, input[0].wwww; 1: MUL temp[3].xyz, input[0], temp[3].wwww; 2: MAD temp[3].xyz, temp[3].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[3]; 4: ADD temp[0].y, const[5], -temp[3]; 5: TEX temp[1], input[4], 2D[1]; 6: MUL temp[1].xyz, temp[1], const[6].xxxx; 7: ADD temp[1].xyz, temp[1], -const[6].yyyy; 8: MUL temp[2].xyz, input[6], temp[1].yyyy; 9: MAD temp[2].xyz, input[5], -temp[1].xxxx, temp[2]; 10: MAD temp[1].xyz, input[7], temp[1].zzzz, temp[2]; 11: DP3 temp[2].x, temp[1], temp[1]; 12: RSQ temp[2].x, |temp[2].xxxx|; 13: MUL temp[2].xyz, temp[2].xxxx, temp[1]; 14: TEX temp[1].xyz, temp[2], CUBE[2]; 15: DP3 temp[2].x, temp[2], const[1]; 16: MAX temp[1].w, temp[2].xxxx, temp[1]; 17: MUL temp[1].xyz, temp[1], const[2].xxxx; 18: MAD temp[2].xyz, temp[1].wwww, const[3], temp[1]; 19: TEX temp[1], input[3], 2D[1]; 20: MUL temp[1].xyz, temp[1], temp[2]; 21: ADD temp[2].xyz, -temp[1], const[4]; 22: MUL temp[2].xyz, input[2].xxxx, temp[2]; 23: ADD output[0].xyz, temp[1], temp[2]; 24: MAD temp[1].xy, temp[0], const[6].wwww, const[6].wwww; 25: TEX temp[2].w, temp[1], 2D[0]; 26: ADD temp[4], temp[1].wwww, -const[6].zzzz; 27: CMP temp[1].x, temp[4], none.1111, none.0000; 28: ADD temp[5], input[1].wwww, -temp[2].wwww; 29: CMP temp[1].y, temp[5], none.1111, none.0000; 30: MOV output[0].w, temp[1]; 31: KIL -temp[1].xxxx; 32: KIL -temp[1].yyyy; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[3].w, input[0].wwww; 1: MUL temp[3].xyz, input[0], temp[3].wwww; 2: MAD temp[3].xyz, temp[3].xyz0, const[7].xyz0, const[8].xyz0; 3: MOV temp[0], temp[3]; 4: ADD temp[0].y, const[5], -temp[3]; 5: TEX temp[1], input[4], 2D[1]; 6: MUL temp[1].xyz, temp[1], const[6].xxxx; 7: ADD temp[1].xyz, temp[1], -const[6].yyyy; 8: MUL temp[2].xyz, input[6], temp[1].yyyy; 9: MAD temp[2].xyz, input[5], -temp[1].xxxx, temp[2]; 10: MAD temp[1].xyz, input[7], temp[1].zzzz, temp[2]; 11: DP3 temp[2].x, temp[1], temp[1]; 12: RSQ temp[2].x, |temp[2].xxxx|; 13: MUL temp[2].xyz, temp[2].xxxx, temp[1]; 14: TEX temp[6], temp[2], CUBE[2]; 15: MOV temp[1].xyz, temp[6]; 16: DP3 temp[2].x, temp[2], const[1]; 17: MAX temp[1].w, temp[2].xxxx, temp[1]; 18: MUL temp[1].xyz, temp[1], const[2].xxxx; 19: MAD temp[2].xyz, temp[1].wwww, const[3], temp[1]; 20: TEX temp[1], input[3], 2D[1]; 21: MUL temp[1].xyz, temp[1], temp[2]; 22: ADD temp[2].xyz, -temp[1], const[4]; 23: MUL temp[2].xyz, input[2].xxxx, temp[2]; 24: ADD output[0].xyz, temp[1], temp[2]; 25: MAD temp[1].xy, temp[0], const[6].wwww, const[6].wwww; 26: TEX temp[7], temp[1], 2D[0]; 27: MOV temp[2].w, temp[7]; 28: ADD temp[4], temp[1].wwww, -const[6].zzzz; 29: CMP temp[1].x, temp[4], none.1111, none.0000; 30: ADD temp[5], input[1].wwww, -temp[2].wwww; 31: CMP temp[1].y, temp[5], none.1111, none.0000; 32: MOV output[0].w, temp[1]; 33: KIL -temp[1].xxxx; 34: KIL -temp[1].yyyy; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[3].w, input[0].w___; 1: MUL temp[3].xy, input[0].xy__, temp[3].ww__; 2: MAD temp[3].xy, temp[3].xy__, const[7].xy__, const[8].xy__; 3: MOV temp[0].x, temp[3].x___; 4: ADD temp[0].y, const[5]._y__, -temp[3]._y__; 5: TEX temp[1], input[4].xy__, 2D[1]; 6: MUL temp[1].xyz, temp[1].xyz_, const[6].xxx_; 7: ADD temp[1].xyz, temp[1].xyz_, -const[6].yyy_; 8: MUL temp[2].xyz, input[6].xyz_, temp[1].yyy_; 9: MAD temp[2].xyz, input[5].xyz_, -temp[1].xxx_, temp[2].xyz_; 10: MAD temp[1].xyz, input[7].xyz_, temp[1].zzz_, temp[2].xyz_; 11: DP3 temp[2].x, temp[1].xyz_, temp[1].xyz_; 12: RSQ temp[2].x, |temp[2].x___|; 13: MUL temp[2].xyz, temp[2].xxx_, temp[1].xyz_; 14: TEX temp[6].xyz, temp[2].xyz_, CUBE[2]; 15: MOV temp[1].xyz, temp[6].xyz_; 16: DP3 temp[2].x, temp[2].xyz_, const[1].xyz_; 17: MAX temp[1].w, temp[2].___x, temp[1].___w; 18: MUL temp[1].xyz, temp[1].xyz_, const[2].xxx_; 19: MAD temp[2].xyz, temp[1].www_, const[3].xyz_, temp[1].xyz_; 20: TEX temp[1], input[3].xy__, 2D[1]; 21: MUL temp[1].xyz, temp[1].xyz_, temp[2].xyz_; 22: ADD temp[2].xyz, -temp[1].xyz_, const[4].xyz_; 23: MUL temp[2].xyz, input[2].xxx_, temp[2].xyz_; 24: ADD output[0].xyz, temp[1].xyz_, temp[2].xyz_; 25: MAD temp[1].xy, temp[0].xy__, const[6].ww__, const[6].ww__; 26: TEX temp[7].w, temp[1].xy__, 2D[0]; 27: MOV temp[2].w, temp[7].___w; 28: ADD temp[4].x, temp[1].w___, -const[6].z___; 29: CMP temp[1].x, temp[4].x___, none.1___, none.0___; 30: ADD temp[5].y, input[1]._w__, -temp[2]._w__; 31: CMP temp[1].y, temp[5]._y__, none._1__, none._0__; 32: MOV output[0].w, temp[1].___w; 33: KIL -temp[1].xxxx; 34: KIL -temp[1].yyyy; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[3].w, input[0].w___; 1: MUL temp[3].xy, input[0].xy__, temp[3].ww__; 2: MAD temp[3].xy, temp[3].xy__, const[7].xy__, const[8].xy__; 3: MOV temp[0].x, temp[3].x___; 4: ADD temp[0].y, const[5]._y__, -temp[3]._y__; 5: TEX temp[1], input[4].xy__, 2D[1]; 6: MUL temp[1].xyz, temp[1].xyz_, const[6].xxx_; 7: ADD temp[1].xyz, temp[1].xyz_, -none.111_; 8: MUL temp[2].xyz, input[6].xyz_, temp[1].yyy_; 9: MAD temp[2].xyz, input[5].xyz_, -temp[1].xxx_, temp[2].xyz_; 10: MAD temp[1].xyz, input[7].xyz_, temp[1].zzz_, temp[2].xyz_; 11: DP3 temp[2].x, temp[1].xyz_, temp[1].xyz_; 12: RSQ temp[2].x, |temp[2].x___|; 13: MUL temp[2].xyz, temp[2].xxx_, temp[1].xyz_; 14: TEX temp[6].xyz, temp[2].xyz_, CUBE[2]; 15: DP3 temp[2].x, temp[2].xyz_, const[1].xyz_; 16: MAX temp[1].w, temp[2].___x, temp[1].___w; 17: MUL temp[1].xyz, temp[6].xyz_, const[2].xxx_; 18: MAD temp[2].xyz, temp[1].www_, const[3].xyz_, temp[1].xyz_; 19: TEX temp[1], input[3].xy__, 2D[1]; 20: MUL temp[1].xyz, temp[1].xyz_, temp[2].xyz_; 21: ADD temp[2].xyz, -temp[1].xyz_, const[4].xyz_; 22: MUL temp[2].xyz, input[2].xxx_, temp[2].xyz_; 23: ADD output[0].xyz, temp[1].xyz_, temp[2].xyz_; 24: MAD temp[1].xy, temp[0].xy__, const[6].ww__, const[6].ww__; 25: TEX temp[7].w, temp[1].xy__, 2D[0]; 26: ADD temp[4].x, temp[1].w___, -none.H___; 27: CMP temp[1].x, temp[4].x___, none.1___, none.0___; 28: ADD temp[5].y, input[1]._w__, -temp[7]._w__; 29: CMP temp[1].y, temp[5]._y__, none._1__, none._0__; 30: MOV output[0].w, temp[1].___w; 31: KIL -temp[1].xxxx; 32: KIL -temp[1].yyyy; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[3].w, input[0].w___; 1: MUL temp[3].xy, input[0].xy__, temp[3].ww__; 2: MAD temp[3].xy, temp[3].xy__, const[7].xy__, const[8].xy__; 3: MOV temp[0].x, temp[3].x___; 4: ADD temp[0].y, const[5]._y__, -temp[3]._y__; 5: TEX temp[1], input[4].xy__, 2D[1]; 6: MUL temp[1].xyz, temp[1].xyz_, const[6].xxx_; 7: ADD temp[1].xyz, temp[1].xyz_, -none.111_; 8: MUL temp[2].xyz, input[6].xyz_, temp[1].yyy_; 9: MAD temp[2].xyz, input[5].xyz_, -temp[1].xxx_, temp[2].xyz_; 10: MAD temp[1].xyz, input[7].xyz_, temp[1].zzz_, temp[2].xyz_; 11: DP3 temp[2].x, temp[1].xyz_, temp[1].xyz_; 12: RSQ temp[2].x, |temp[2].x___|; 13: MUL temp[2].xyz, temp[2].xxx_, temp[1].xyz_; 14: TEX temp[6].xyz, temp[2].xyz_, CUBE[2]; 15: DP3 temp[2].x, temp[2].xyz_, const[1].xyz_; 16: MAX temp[1].w, temp[2].___x, temp[1].___w; 17: MUL temp[1].xyz, temp[6].xyz_, const[2].xxx_; 18: MAD temp[2].xyz, temp[1].www_, const[3].xyz_, temp[1].xyz_; 19: TEX temp[1], input[3].xy__, 2D[1]; 20: MUL temp[1].xyz, temp[1].xyz_, temp[2].xyz_; 21: ADD temp[2].xyz, -temp[1].xyz_, const[4].xyz_; 22: MUL temp[2].xyz, input[2].xxx_, temp[2].xyz_; 23: ADD output[0].xyz, temp[1].xyz_, temp[2].xyz_; 24: MAD temp[1].xy, temp[0].xy__, const[6].ww__, const[6].ww__; 25: TEX temp[7].w, temp[1].xy__, 2D[0]; 26: ADD temp[4].x, temp[1].w___, -none.H___; 27: CMP temp[1].x, temp[4].x___, none.1___, none.0___; 28: ADD temp[5].y, input[1]._w__, -temp[7]._w__; 29: CMP temp[1].y, temp[5]._y__, none._1__, none._0__; 30: MOV output[0].w, temp[1].___w; 31: MOV temp[8], -temp[1].xxxx; 32: KIL temp[8]; 33: MOV temp[9], -temp[1].yyyy; 34: KIL temp[9]; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[3].w, src0.w 1: src0.xyz = input[0], src0.w = temp[3] MAD temp[3].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[3], src1.xyz = const[7], src2.xyz = const[8] MAD temp[3].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[3] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[5], src1.xyz = temp[3] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1], input[4].xy__, 2D[1]; 6: src0.xyz = temp[1], src1.xyz = const[6] MAD temp[1].xyz, src0.xyz, src1.xxx, src0.000 7: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, -src0.111 8: src0.xyz = input[6], src1.xyz = temp[1] MAD temp[2].xyz, src0.xyz, src1.yyy, src0.000 9: src0.xyz = input[5], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[2].xyz, src0.xyz, -src1.xxx, src2.xyz 10: src0.xyz = input[7], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz 11: src0.xyz = temp[1] DP3 temp[2].x, src0.xyz, src0.xyz 12: src0.xyz = temp[2] REPL_ALPHA temp[2].x RSQ, |src0.x| 13: src0.xyz = temp[2], src1.xyz = temp[1] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 14: TEX temp[6].xyz, temp[2].xyz_, CUBE[2]; 15: src0.xyz = temp[2], src1.xyz = const[1] DP3 temp[2].x, src0.xyz, src1.xyz 16: src0.xyz = temp[2], src0.w = temp[1] MAX temp[1].w, src0.x, src0.w 17: src0.xyz = temp[6], src1.xyz = const[2] MAD temp[1].xyz, src0.xyz, src1.xxx, src0.000 18: src0.xyz = const[3], src0.w = temp[1], src1.xyz = temp[1] MAD temp[2].xyz, src0.www, src0.xyz, src1.xyz 19: TEX temp[1], input[3].xy__, 2D[1]; 20: src0.xyz = temp[1], src1.xyz = temp[2] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 21: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[2].xyz, -src0.xyz, src0.111, src1.xyz 22: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 23: src0.xyz = temp[1], src1.xyz = temp[2] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 24: src0.xyz = temp[0], src0.w = const[6] MAD temp[1].xy, src0.xy_, src0.ww_, src0.ww_ 25: TEX temp[7].w, temp[1].xy__, 2D[0]; 26: src0.w = temp[1] MAD temp[4].x, src0.w__, src0.111, -src0.H__ 27: src0.xyz = temp[4] CMP temp[1].x, src0.0__, src0.1__, src0.x__ 28: src0.w = input[1], src1.w = temp[7] MAD temp[5].y, src0._w_, src0.111, -src1._w_ 29: src0.xyz = temp[5] CMP temp[1].y, src0._0_, src0._1_, src0._y_ 30: src0.w = temp[1] MAD color[0].w, src0.w, src0.1, src0.0 31: src0.xyz = temp[1] MAD temp[8].xyz, -src0.xxx, src0.111, src0.000 MAD temp[8].w, -src0.x, src0.1, src0.0 32: KIL temp[8]; 33: src0.xyz = temp[1] MAD temp[9].xyz, -src0.yyy, src0.111, src0.000 MAD temp[9].w, -src0.y, src0.1, src0.0 34: KIL temp[9]; Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1], input[4].xy__, 2D[1]; 2: src0.xyz = temp[1], src0.w = input[0], src1.xyz = const[6] MAD temp[1].xyz, src0.xyz, src1.xxx, src0.000 RCP temp[3].w, src0.w 3: src0.xyz = input[0], src0.w = temp[3] MAD temp[3].xy, src0.xy_, src0.ww_, src0.000 4: src0.xyz = temp[3], src1.xyz = const[7], src2.xyz = const[8] MAD temp[3].xy, src0.xy_, src1.xy_, src2.xy_ 5: src0.xyz = const[5], src1.xyz = temp[3] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 6: src0.xyz = temp[3] MAD temp[0].x, src0.x__, src0.111, src0.000 7: src0.xyz = temp[1] MAD temp[1].xyz, src0.xyz, src0.111, -src0.111 8: src0.xyz = input[6], src1.xyz = temp[1] MAD temp[2].xyz, src0.xyz, src1.yyy, src0.000 9: src0.xyz = input[5], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[2].xyz, src0.xyz, -src1.xxx, src2.xyz 10: src0.xyz = input[7], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[1].xyz, src0.xyz, src1.zzz, src2.xyz 11: src0.xyz = temp[1] DP3 temp[2].x, src0.xyz, src0.xyz 12: src0.xyz = temp[2] REPL_ALPHA temp[2].x RSQ, |src0.x| 13: src0.xyz = temp[2], src1.xyz = temp[1] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 14: BEGIN_TEX; 15: TEX temp[6].xyz, temp[2].xyz_, CUBE[2]; 16: src0.xyz = temp[6], src1.xyz = const[2] MAD temp[1].xyz, src0.xyz, src1.xxx, src0.000 17: src0.xyz = temp[2], src1.xyz = const[1] DP3 temp[2].x, src0.xyz, src1.xyz 18: src0.xyz = temp[2], src0.w = temp[1] MAX temp[1].w, src0.x, src0.w 19: src0.xyz = const[3], src0.w = temp[1], src1.xyz = temp[1] MAD temp[2].xyz, src0.www, src0.xyz, src1.xyz 20: BEGIN_TEX; 21: TEX temp[1], input[3].xy__, 2D[1]; 22: src0.w = temp[1] MAD temp[4].x, src0.w__, src0.111, -src0.H__ MAD color[0].w, src0.w, src0.1, src0.0 23: src0.xyz = temp[1], src1.xyz = temp[2] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 24: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[2].xyz, -src0.xyz, src0.111, src1.xyz 25: src0.xyz = input[2], src1.xyz = temp[2] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 26: src0.xyz = temp[1], src1.xyz = temp[2] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 27: src0.xyz = temp[0], src0.w = const[6] MAD temp[1].xy, src0.xy_, src0.ww_, src0.ww_ 28: BEGIN_TEX; 29: TEX temp[7].w, temp[1].xy__, 2D[0]; 30: src0.w = input[1], src1.w = temp[7] MAD temp[5].y, src0._w_, src0.111, -src1._w_ 31: src0.xyz = temp[5] CMP temp[1].y, src0._0_, src0._1_, src0._y_ 32: src0.xyz = temp[1] MAD temp[9].xyz, -src0.yyy, src0.111, src0.000 MAD temp[9].w, -src0.y, src0.1, src0.0 33: src0.xyz = temp[4] CMP temp[1].x, src0.0__, src0.1__, src0.x__ 34: src0.xyz = temp[1] MAD temp[8].xyz, -src0.xxx, src0.111, src0.000 MAD temp[8].w, -src0.x, src0.1, src0.0 35: BEGIN_TEX; 36: KIL temp[8]; 37: KIL temp[9]; Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8], temp[3].xy__, 2D[1]; 2: src0.xyz = temp[8], src0.w = temp[7], src1.xyz = const[6] MAD temp[8].xyz, src0.xyz, src1.xxx, src0.000 RCP temp[9].w, src0.w 3: src0.xyz = temp[7], src0.w = temp[9] MAD temp[9].xy, src0.xy_, src0.ww_, src0.000 4: src0.xyz = temp[9], src1.xyz = const[7], src2.xyz = const[8] MAD temp[9].xy, src0.xy_, src1.xy_, src2.xy_ 5: src0.xyz = const[5], src1.xyz = temp[9] MAD temp[3].y, src0._y_, src0.111, -src1._y_ 6: src0.xyz = temp[9] MAD temp[3].x, src0.x__, src0.111, src0.000 7: src0.xyz = temp[8] MAD temp[8].xyz, src0.xyz, src0.111, -src0.111 8: src0.xyz = temp[5], src1.xyz = temp[8] MAD temp[5].xyz, src0.xyz, src1.yyy, src0.000 9: src0.xyz = temp[4], src1.xyz = temp[8], src2.xyz = temp[5] MAD temp[5].xyz, src0.xyz, -src1.xxx, src2.xyz 10: src0.xyz = temp[6], src1.xyz = temp[8], src2.xyz = temp[5] MAD temp[8].xyz, src0.xyz, src1.zzz, src2.xyz 11: src0.xyz = temp[8] DP3 temp[5].x, src0.xyz, src0.xyz 12: src0.xyz = temp[5] REPL_ALPHA temp[5].x RSQ, |src0.x| 13: src0.xyz = temp[5], src1.xyz = temp[8] MAD temp[5].xyz, src0.xxx, src1.xyz, src0.000 14: BEGIN_TEX; 15: TEX temp[4].xyz, temp[5].xyz_, CUBE[2]; 16: src0.xyz = temp[4], src1.xyz = const[2] MAD temp[8].xyz, src0.xyz, src1.xxx, src0.000 17: src0.xyz = temp[5], src1.xyz = const[1] DP3 temp[5].x, src0.xyz, src1.xyz 18: src0.xyz = temp[5], src0.w = temp[8] MAX temp[8].w, src0.x, src0.w 19: src0.xyz = const[3], src0.w = temp[8], src1.xyz = temp[8] MAD temp[5].xyz, src0.www, src0.xyz, src1.xyz 20: BEGIN_TEX; 21: TEX temp[8], temp[2].xy__, 2D[1]; 22: src0.w = temp[8] MAD temp[2].x, src0.w__, src0.111, -src0.H__ MAD color[0].w, src0.w, src0.1, src0.0 23: src0.xyz = temp[8], src1.xyz = temp[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 24: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[5].xyz, -src0.xyz, src0.111, src1.xyz 25: src0.xyz = temp[1], src1.xyz = temp[5] MAD temp[5].xyz, src0.xxx, src1.xyz, src0.000 26: src0.xyz = temp[8], src1.xyz = temp[5] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 27: src0.xyz = temp[3], src0.w = const[6] MAD temp[8].xy, src0.xy_, src0.ww_, src0.ww_ 28: BEGIN_TEX; 29: TEX temp[1].w, temp[8].xy__, 2D[0]; 30: src0.w = temp[0], src1.w = temp[1] MAD temp[0].y, src0._w_, src0.111, -src1._w_ 31: src0.xyz = temp[0] CMP temp[8].y, src0._0_, src0._1_, src0._y_ 32: src0.xyz = temp[8] MAD temp[1].xyz, -src0.yyy, src0.111, src0.000 MAD temp[1].w, -src0.y, src0.1, src0.0 33: src0.xyz = temp[2] CMP temp[8].x, src0.0__, src0.1__, src0.x__ 34: src0.xyz = temp[8] MAD temp[0].xyz, -src0.xxx, src0.111, src0.000 MAD temp[0].w, -src0.x, src0.1, src0.0 35: BEGIN_TEX; 36: KIL temp[0]; 37: KIL temp[1]; r300compiler error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections pc=38************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000000) TEX: TEX t8, t3, texture[1] (00008a03) 0: xyz: t8 c6 t0 -> t8.xyz (03a00988) w: t7 t0 t0 -> t9.w (00a40007) xyz: t8.xyz c6.xxx 0.0 op: 00050280 w: t7.w t8.x t8.x op: 05000009 r300 FP: Compiler Error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections Using a dummy shader instead. If there's an 'unknown opcode' message, please file a bug report and attach this log. r300: Initial fragment program FRAG DCL OUT[0], COLOR IMM FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: MOV OUT[0], IMM[0].xxxy 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after pair translate # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 pc=39************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: 1.0 1.0 0.0 op: 00040891 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[0], 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 CONST[5..6] DCL CONST[0] DCL CONST[2] DCL CONST[4] DCL TEMP[0..10] IMM FLT32 { 2.0000, 1.0000, 0.0001, 0.0000} IMM FLT32 { 0.1250, 0.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[6], IN[0] 2: TEX TEMP[1], IN[2], SAMP[0], 2D 3: TEX TEMP[2], IN[2], SAMP[1], 2D 4: LRP TEMP[3], CONST[0], TEMP[2], TEMP[1] 5: MOV TEMP[3].x, TEMP[3].wwww 6: MAD TEMP[3], TEMP[3], IMM[0].xxxx, -IMM[0].yyyy 7: MUL TEMP[3].xy, TEMP[3], CONST[2].zzzz 8: MUL_SAT TEMP[1].w, IN[3].wwww, IMM[0].zzzz 9: SUB TEMP[2], IMM[0].wwww, TEMP[3] 10: MAD TEMP[3], TEMP[3], TEMP[1].wwww, TEMP[2] 11: MOV TEMP[3].z, IMM[0].wwww 12: DP3 TEMP[4].x, TEMP[3], TEMP[3] 13: ADD TEMP[4].x, IMM[0].yyyy, -TEMP[4].xxxx 14: RSQ TEMP[4].x, TEMP[4].xxxx 15: RCP TEMP[3].z, TEMP[4].xxxx 16: DP3 TEMP[2].x, TEMP[3], IN[4] 17: DP3 TEMP[2].y, TEMP[3], IN[5] 18: DP3 TEMP[2].z, TEMP[3], IN[6] 19: MOV TEMP[5], TEMP[0] 20: MOV TEMP[6], IN[3] 21: DP3 TEMP[3], TEMP[6], TEMP[2] 22: MUL TEMP[3], TEMP[3], IMM[0].xxxx 23: MAD TEMP[7], -TEMP[2], TEMP[3].xxxx, TEMP[6] 24: MOV TEMP[8], IMM[1].xxxx 25: TEX TEMP[2], TEMP[5], SAMP[2], RECT 26: MUL TEMP[2], TEMP[2], CONST[4] 27: TEX TEMP[3], TEMP[7], SAMP[3], CUBE 28: SUB TEMP[5], TEMP[3], TEMP[2] 29: MAD TEMP[5], TEMP[5], TEMP[8], TEMP[2] 30: MOV TEMP[9], TEMP[5] 31: ADD OUT[0].w, TEMP[10].xxxx, TEMP[10].yyyy 32: LRP OUT[0].xyz, IN[1].xxxx, CONST[5], TEMP[9] 33: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: SUB temp[0].y, const[6], temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: LRP temp[3], const[0], temp[2], temp[1]; 8: MOV temp[3].x, temp[3].wwww; 9: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 10: MUL temp[3].xy, temp[3], const[2].zzzz; 11: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 12: SUB temp[2], const[7].wwww, temp[3]; 13: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 14: MOV temp[3].z, const[7].wwww; 15: DP3 temp[4].x, temp[3], temp[3]; 16: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 17: RSQ temp[4].x, temp[4].xxxx; 18: RCP temp[3].z, temp[4].xxxx; 19: DP3 temp[2].x, temp[3], input[4]; 20: DP3 temp[2].y, temp[3], input[5]; 21: DP3 temp[2].z, temp[3], input[6]; 22: MOV temp[5], temp[0]; 23: MOV temp[6], input[3]; 24: DP3 temp[3], temp[6], temp[2]; 25: MUL temp[3], temp[3], const[7].xxxx; 26: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 27: MOV temp[8], const[8].xxxx; 28: TEX temp[2], temp[5], RECT[2]; 29: MUL temp[2], temp[2], const[4]; 30: TEX temp[3], temp[7], CUBE[3]; 31: SUB temp[5], temp[3], temp[2]; 32: MAD temp[5], temp[5], temp[8], temp[2]; 33: MOV temp[9], temp[5]; 34: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 35: LRP output[0].xyz, input[1].xxxx, const[5], temp[9]; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: SUB temp[0].y, const[6], temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: LRP temp[3], const[0], temp[2], temp[1]; 8: MOV temp[3].x, temp[3].wwww; 9: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 10: MUL temp[3].xy, temp[3], const[2].zzzz; 11: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 12: SUB temp[2], const[7].wwww, temp[3]; 13: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 14: MOV temp[3].z, const[7].wwww; 15: DP3 temp[4].x, temp[3], temp[3]; 16: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 17: RSQ temp[4].x, temp[4].xxxx; 18: RCP temp[3].z, temp[4].xxxx; 19: DP3 temp[2].x, temp[3], input[4]; 20: DP3 temp[2].y, temp[3], input[5]; 21: DP3 temp[2].z, temp[3], input[6]; 22: MOV temp[5], temp[0]; 23: MOV temp[6], input[3]; 24: DP3 temp[3], temp[6], temp[2]; 25: MUL temp[3], temp[3], const[7].xxxx; 26: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 27: MOV temp[8], const[8].xxxx; 28: TEX temp[2], temp[5], RECT[2]; 29: MUL temp[2], temp[2], const[4]; 30: TEX temp[3], temp[7], CUBE[3]; 31: SUB temp[5], temp[3], temp[2]; 32: MAD temp[5], temp[5], temp[8], temp[2]; 33: MOV temp[9], temp[5]; 34: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 35: LRP output[0].xyz, input[1].xxxx, const[5], temp[9]; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: SUB temp[0].y, const[6], temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: LRP temp[3], const[0], temp[2], temp[1]; 8: MOV temp[3].x, temp[3].wwww; 9: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 10: MUL temp[3].xy, temp[3], const[2].zzzz; 11: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 12: SUB temp[2], const[7].wwww, temp[3]; 13: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 14: MOV temp[3].z, const[7].wwww; 15: DP3 temp[4].x, temp[3], temp[3]; 16: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 17: RSQ temp[4].x, temp[4].xxxx; 18: RCP temp[3].z, temp[4].xxxx; 19: DP3 temp[2].x, temp[3], input[4]; 20: DP3 temp[2].y, temp[3], input[5]; 21: DP3 temp[2].z, temp[3], input[6]; 22: MOV temp[5], temp[0]; 23: MOV temp[6], input[3]; 24: DP3 temp[3], temp[6], temp[2]; 25: MUL temp[3], temp[3], const[7].xxxx; 26: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 27: MOV temp[8], const[8].xxxx; 28: TEX temp[2], temp[5], RECT[2]; 29: MUL temp[2], temp[2], const[4]; 30: TEX temp[3], temp[7], CUBE[3]; 31: SUB temp[5], temp[3], temp[2]; 32: MAD temp[5], temp[5], temp[8], temp[2]; 33: MOV temp[9], temp[5]; 34: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 35: LRP output[0].xyz, input[1].xxxx, const[5], temp[9]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: ADD temp[0].y, const[6], -temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: ADD temp[12], temp[2], -temp[1]; 8: MAD temp[3], const[0], temp[12], temp[1]; 9: MOV temp[3].x, temp[3].wwww; 10: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 11: MUL temp[3].xy, temp[3], const[2].zzzz; 12: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 13: ADD temp[2], const[7].wwww, -temp[3]; 14: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 15: MOV temp[3].z, const[7].wwww; 16: DP3 temp[4].x, temp[3], temp[3]; 17: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 18: RSQ temp[4].x, |temp[4].xxxx|; 19: RCP temp[3].z, temp[4].xxxx; 20: DP3 temp[2].x, temp[3], input[4]; 21: DP3 temp[2].y, temp[3], input[5]; 22: DP3 temp[2].z, temp[3], input[6]; 23: MOV temp[5], temp[0]; 24: MOV temp[6], input[3]; 25: DP3 temp[3], temp[6], temp[2]; 26: MUL temp[3], temp[3], const[7].xxxx; 27: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 28: MOV temp[8], const[8].xxxx; 29: TEX temp[2], temp[5], RECT[2]; 30: MUL temp[2], temp[2], const[4]; 31: TEX temp[3], temp[7], CUBE[3]; 32: ADD temp[5], temp[3], -temp[2]; 33: MAD temp[5], temp[5], temp[8], temp[2]; 34: MOV temp[9], temp[5]; 35: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 36: ADD temp[13], const[5], -temp[9]; 37: MAD output[0].xyz, input[1].xxxx, temp[13], temp[9]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: ADD temp[0].y, const[6], -temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: ADD temp[12], temp[2], -temp[1]; 8: MAD temp[3], const[0], temp[12], temp[1]; 9: MOV temp[3].x, temp[3].wwww; 10: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 11: MUL temp[3].xy, temp[3], const[2].zzzz; 12: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 13: ADD temp[2], const[7].wwww, -temp[3]; 14: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 15: MOV temp[3].z, const[7].wwww; 16: DP3 temp[4].x, temp[3], temp[3]; 17: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 18: RSQ temp[4].x, |temp[4].xxxx|; 19: RCP temp[3].z, temp[4].xxxx; 20: DP3 temp[2].x, temp[3], input[4]; 21: DP3 temp[2].y, temp[3], input[5]; 22: DP3 temp[2].z, temp[3], input[6]; 23: MOV temp[5], temp[0]; 24: MOV temp[6], input[3]; 25: DP3 temp[3], temp[6], temp[2]; 26: MUL temp[3], temp[3], const[7].xxxx; 27: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 28: MOV temp[8], const[8].xxxx; 29: MUL temp[14], temp[5], const[11]; 30: TEX temp[2], temp[14], 2D[2]; 31: MUL temp[2], temp[2], const[4]; 32: TEX temp[3], temp[7], CUBE[3]; 33: ADD temp[5], temp[3], -temp[2]; 34: MAD temp[5], temp[5], temp[8], temp[2]; 35: MOV temp[9], temp[5]; 36: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 37: ADD temp[13], const[5], -temp[9]; 38: MAD output[0].xyz, input[1].xxxx, temp[13], temp[9]; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[11].w, input[0].w___; 1: MUL temp[11].xy, input[0].xy__, temp[11].ww__; 2: MAD temp[11].xy, temp[11].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[11].x___; 4: ADD temp[0].y, const[6]._y__, -temp[11]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: ADD temp[12].yw, temp[2]._y_w, -temp[1]._y_w; 8: MAD temp[3].yw, const[0]._y_w, temp[12]._y_w, temp[1]._y_w; 9: MOV temp[3].x, temp[3].w___; 10: MAD temp[3].xy, temp[3].xy__, const[7].xx__, -const[7].yy__; 11: MUL temp[3].xy, temp[3].xy__, const[2].zz__; 12: MUL_SAT temp[1].w, input[3].___w, const[7].___z; 13: ADD temp[2].xy, const[7].ww__, -temp[3].xy__; 14: MAD temp[3].xy, temp[3].xy__, temp[1].ww__, temp[2].xy__; 15: MOV temp[3].z, const[7].__w_; 16: DP3 temp[4].x, temp[3].xyz_, temp[3].xyz_; 17: ADD temp[4].x, const[7].y___, -temp[4].x___; 18: RSQ temp[4].x, |temp[4].x___|; 19: RCP temp[3].z, temp[4].x___; 20: DP3 temp[2].x, temp[3].xyz_, input[4].xyz_; 21: DP3 temp[2].y, temp[3].xyz_, input[5].xyz_; 22: DP3 temp[2].z, temp[3].xyz_, input[6].xyz_; 23: MOV temp[5].xy, temp[0].xy__; 24: MOV temp[6].xyz, input[3].xyz_; 25: DP3 temp[3].x, temp[6].xyz_, temp[2].xyz_; 26: MUL temp[3].x, temp[3].x___, const[7].x___; 27: MAD temp[7].xyz, -temp[2].xyz_, temp[3].xxx_, temp[6].xyz_; 28: MOV temp[8].xyz, const[8].xxx_; 29: MUL temp[14].xy, temp[5].xy__, const[11].xy__; 30: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 31: MUL temp[2].xyz, temp[2].xyz_, const[4].xyz_; 32: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 33: ADD temp[5].xyz, temp[3].xyz_, -temp[2].xyz_; 34: MAD temp[5].xyz, temp[5].xyz_, temp[8].xyz_, temp[2].xyz_; 35: MOV temp[9].xyz, temp[5].xyz_; 36: ADD output[0].w, temp[10].___x, temp[10].___y; 37: ADD temp[13].xyz, const[5].xyz_, -temp[9].xyz_; 38: MAD output[0].xyz, input[1].xxx_, temp[13].xyz_, temp[9].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[11].w, input[0].w___; 1: MUL temp[11].xy, input[0].xy__, temp[11].ww__; 2: MAD temp[11].xy, temp[11].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[11].x___; 4: ADD temp[0].y, const[6]._y__, -temp[11]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: ADD temp[12].yw, temp[2]._y_w, -temp[1]._y_w; 8: MAD temp[3].yw, const[0]._y_w, temp[12]._y_w, temp[1]._y_w; 9: MOV temp[3].x, temp[3].w___; 10: MAD temp[3].xy, temp[3].xy__, const[7].xx__, -none.11__; 11: MUL temp[3].xy, temp[3].xy__, const[2].zz__; 12: MUL_SAT temp[1].w, input[3].___w, const[7].___z; 13: MAD temp[3].xy, temp[3].xy__, temp[1].ww__, temp[3].-x-y__; 14: MOV temp[3].z, none.__0_; 15: DP3 temp[4].x, temp[3].xyz_, temp[3].xyz_; 16: ADD temp[4].x, none.1___, -temp[4].x___; 17: RSQ temp[4].x, |temp[4].x___|; 18: RCP temp[3].z, temp[4].x___; 19: DP3 temp[2].x, temp[3].xyz_, input[4].xyz_; 20: DP3 temp[2].y, temp[3].xyz_, input[5].xyz_; 21: DP3 temp[2].z, temp[3].xyz_, input[6].xyz_; 22: DP3 temp[3].x, input[3].xyz_, temp[2].xyz_; 23: MUL temp[3].x, temp[3].x___, const[7].x___; 24: MAD temp[7].xyz, -temp[2].xyz_, temp[3].xxx_, input[3].xyz_; 25: MUL temp[14].xy, temp[0].xy__, const[11].xy__; 26: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 27: MUL temp[2].xyz, temp[2].xyz_, const[4].xyz_; 28: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 29: ADD temp[5].xyz, temp[3].xyz_, -temp[2].xyz_; 30: MAD temp[5].xyz, temp[5].xyz_, const[8].xxx_, temp[2].xyz_; 31: ADD output[0].w, temp[10].___x, temp[10].___y; 32: ADD temp[13].xyz, const[5].xyz_, -temp[5].xyz_; 33: MAD output[0].xyz, input[1].xxx_, temp[13].xyz_, temp[5].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[11].w, input[0].w___; 1: MUL temp[11].xy, input[0].xy__, temp[11].ww__; 2: MAD temp[11].xy, temp[11].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[11].x___; 4: ADD temp[0].y, const[6]._y__, -temp[11]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: ADD temp[12].yw, temp[2]._y_w, -temp[1]._y_w; 8: MAD temp[3].yw, const[0]._y_w, temp[12]._y_w, temp[1]._y_w; 9: MOV temp[3].x, temp[3].w___; 10: MAD temp[3].xy, temp[3].xy__, const[7].xx__, -none.11__; 11: MUL temp[3].xy, temp[3].xy__, const[2].zz__; 12: MUL_SAT temp[1].w, input[3].___w, const[7].___z; 13: MAD temp[3].xy, temp[3].xy__, temp[1].ww__, temp[3].-x-y__; 14: MOV temp[3].z, none.__0_; 15: DP3 temp[4].x, temp[3].xyz_, temp[3].xyz_; 16: ADD temp[4].x, none.1___, -temp[4].x___; 17: RSQ temp[4].x, |temp[4].x___|; 18: RCP temp[3].z, temp[4].x___; 19: DP3 temp[2].x, temp[3].xyz_, input[4].xyz_; 20: DP3 temp[2].y, temp[3].xyz_, input[5].xyz_; 21: DP3 temp[2].z, temp[3].xyz_, input[6].xyz_; 22: DP3 temp[3].x, input[3].xyz_, temp[2].xyz_; 23: MUL temp[3].x, temp[3].x___, const[7].x___; 24: MAD temp[7].xyz, -temp[2].xyz_, temp[3].xxx_, input[3].xyz_; 25: MUL temp[14].xy, temp[0].xy__, const[11].xy__; 26: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 27: MUL temp[2].xyz, temp[2].xyz_, const[4].xyz_; 28: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 29: ADD temp[5].xyz, temp[3].xyz_, -temp[2].xyz_; 30: MAD temp[5].xyz, temp[5].xyz_, const[8].xxx_, temp[2].xyz_; 31: ADD output[0].w, temp[10].___x, temp[10].___y; 32: ADD temp[13].xyz, const[5].xyz_, -temp[5].xyz_; 33: MAD output[0].xyz, input[1].xxx_, temp[13].xyz_, temp[5].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[11].w, src0.w 1: src0.xyz = input[0], src0.w = temp[11] MAD temp[11].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[11], src1.xyz = const[9], src2.xyz = const[10] MAD temp[11].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[11] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[6], src1.xyz = temp[11] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[12].y, src0._y_, src0.111, -src1._y_ MAD temp[12].w, src0.w, src0.1, -src1.w 8: src0.xyz = const[0], src0.w = const[0], src1.xyz = temp[12], src1.w = temp[12], src2.xyz = temp[1], src2.w = temp[1] MAD temp[3].y, src0._y_, src1._y_, src2._y_ MAD temp[3].w, src0.w, src1.w, src2.w 9: src0.w = temp[3] MAD temp[3].x, src0.w__, src0.111, src0.000 10: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xy, src0.xy_, src1.xx_, -src0.11_ 11: src0.xyz = temp[3], src1.xyz = const[2] MAD temp[3].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[7], src0.w = input[3] MAD_SAT temp[1].w, src0.w, src0.z, src0.0 13: src0.xyz = temp[3], src0.w = temp[1] MAD temp[3].xy, src0.xy_, src0.ww_, -src0.xy_ 14: MAD temp[3].z, src0.__0, src0.111, src0.000 15: src0.xyz = temp[3] DP3 temp[4].x, src0.xyz, src0.xyz 16: src0.xyz = temp[4] MAD temp[4].x, src0.1__, src0.111, -src0.x__ 17: src0.xyz = temp[4] REPL_ALPHA temp[4].x RSQ, |src0.x| 18: src0.xyz = temp[4] REPL_ALPHA temp[3].z RCP, src0.x 19: src0.xyz = temp[3], src1.xyz = input[4] DP3 temp[2].x, src0.xyz, src1.xyz 20: src0.xyz = temp[3], src1.xyz = input[5] DP3 temp[2].y, src0.xyz, src1.xyz 21: src0.xyz = temp[3], src1.xyz = input[6] DP3 temp[2].z, src0.xyz, src1.xyz 22: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[3].x, src0.xyz, src1.xyz 23: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].x, src0.x__, src1.x__, src0.000 24: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = input[3] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 25: src0.xyz = temp[0], src1.xyz = const[11] MAD temp[14].xy, src0.xy_, src1.xy_, src0.000 26: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 27: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 28: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 29: src0.xyz = temp[3], src1.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 30: src0.xyz = temp[5], src1.xyz = const[8], src2.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = temp[10] MAD color[0].w, src0.x, src0.1, src0.y 32: src0.xyz = const[5], src1.xyz = temp[5] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz 33: src0.xyz = input[1], src1.xyz = temp[13], src2.xyz = temp[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2].yw, input[2].xy__, 2D[1]; 2: TEX temp[1].yw, input[2].xy__, 2D[0]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[12].y, src0._y_, src0.111, -src1._y_ MAD temp[12].w, src0.w, src0.1, -src1.w 4: src0.xyz = const[0], src0.w = const[0], src1.xyz = temp[12], src1.w = temp[12], src2.xyz = temp[1], src2.w = temp[1] MAD temp[3].y, src0._y_, src1._y_, src2._y_ MAD temp[3].w, src0.w, src1.w, src2.w 5: src0.xyz = const[7], src0.w = temp[3], src1.w = input[3] MAD temp[3].x, src0.w__, src0.111, src0.000 MAD_SAT temp[1].w, src1.w, src0.z, src0.0 6: src0.xyz = temp[3], src1.xyz = const[7], src2.xyz = temp[10] MAD temp[3].xy, src0.xy_, src1.xx_, -src0.11_ MAD color[0].w, src2.x, src0.1, src2.y 7: src0.xyz = temp[3], src0.w = input[0], src1.xyz = const[2] MAD temp[3].xy, src0.xy_, src1.zz_, src0.000 RCP temp[11].w, src0.w 8: src0.xyz = input[0], src0.w = temp[11] MAD temp[11].xy, src0.xy_, src0.ww_, src0.000 9: src0.xyz = temp[11], src1.xyz = const[9], src2.xyz = const[10] MAD temp[11].xy, src0.xy_, src1.xy_, src2.xy_ 10: src0.xyz = const[6], src1.xyz = temp[11] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 11: src0.xyz = temp[11] MAD temp[0].x, src0.x__, src0.111, src0.000 12: src0.xyz = temp[0], src1.xyz = const[11] MAD temp[14].xy, src0.xy_, src1.xy_, src0.000 13: src0.xyz = temp[3], src0.w = temp[1] MAD temp[3].xy, src0.xy_, src0.ww_, -src0.xy_ 14: MAD temp[3].z, src0.__0, src0.111, src0.000 15: src0.xyz = temp[3] DP3 temp[4].x, src0.xyz, src0.xyz 16: src0.xyz = temp[4] MAD temp[4].x, src0.1__, src0.111, -src0.x__ 17: src0.xyz = temp[4] REPL_ALPHA temp[4].x RSQ, |src0.x| 18: src0.xyz = temp[4] REPL_ALPHA temp[3].z RCP, src0.x 19: src0.xyz = temp[3], src1.xyz = input[4] DP3 temp[2].x, src0.xyz, src1.xyz 20: src0.xyz = temp[3], src1.xyz = input[5] DP3 temp[2].y, src0.xyz, src1.xyz 21: src0.xyz = temp[3], src1.xyz = input[6] DP3 temp[2].z, src0.xyz, src1.xyz 22: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[3].x, src0.xyz, src1.xyz 23: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].x, src0.x__, src1.x__, src0.000 24: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = input[3] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 25: BEGIN_TEX; 26: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 27: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 28: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[3], src1.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 30: src0.xyz = temp[5], src1.xyz = const[8], src2.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = const[5], src1.xyz = temp[5] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz 32: src0.xyz = input[1], src1.xyz = temp[13], src2.xyz = temp[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8].yw, temp[1].xy__, 2D[1]; 2: TEX temp[7].yw, temp[1].xy__, 2D[0]; 3: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] MAD temp[1].y, src0._y_, src0.111, -src1._y_ MAD temp[1].w, src0.w, src0.1, -src1.w 4: src0.xyz = const[0], src0.w = const[0], src1.xyz = temp[1], src1.w = temp[1], src2.xyz = temp[7], src2.w = temp[7] MAD temp[9].y, src0._y_, src1._y_, src2._y_ MAD temp[9].w, src0.w, src1.w, src2.w 5: src0.xyz = const[7], src0.w = temp[9], src1.w = temp[2] MAD temp[9].x, src0.w__, src0.111, src0.000 MAD_SAT temp[7].w, src1.w, src0.z, src0.0 6: src0.xyz = temp[9], src1.xyz = const[7], src2.xyz = temp[1] MAD temp[9].xy, src0.xy_, src1.xx_, -src0.11_ MAD color[0].w, src2.x, src0.1, src2.y 7: src0.xyz = temp[9], src0.w = temp[6], src1.xyz = const[2] MAD temp[9].xy, src0.xy_, src1.zz_, src0.000 RCP temp[10].w, src0.w 8: src0.xyz = temp[6], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 9: src0.xyz = temp[10], src1.xyz = const[9], src2.xyz = const[10] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 10: src0.xyz = const[6], src1.xyz = temp[10] MAD temp[1].y, src0._y_, src0.111, -src1._y_ 11: src0.xyz = temp[10] MAD temp[1].x, src0.x__, src0.111, src0.000 12: src0.xyz = temp[1], src1.xyz = const[11] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 13: src0.xyz = temp[9], src0.w = temp[7] MAD temp[9].xy, src0.xy_, src0.ww_, -src0.xy_ 14: MAD temp[9].z, src0.__0, src0.111, src0.000 15: src0.xyz = temp[9] DP3 temp[1].x, src0.xyz, src0.xyz 16: src0.xyz = temp[1] MAD temp[1].x, src0.1__, src0.111, -src0.x__ 17: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 18: src0.xyz = temp[1] REPL_ALPHA temp[9].z RCP, src0.x 19: src0.xyz = temp[9], src1.xyz = temp[3] DP3 temp[8].x, src0.xyz, src1.xyz 20: src0.xyz = temp[9], src1.xyz = temp[4] DP3 temp[8].y, src0.xyz, src1.xyz 21: src0.xyz = temp[9], src1.xyz = temp[5] DP3 temp[8].z, src0.xyz, src1.xyz 22: src0.xyz = temp[2], src1.xyz = temp[8] DP3 temp[9].x, src0.xyz, src1.xyz 23: src0.xyz = temp[9], src1.xyz = const[7] MAD temp[9].x, src0.x__, src1.x__, src0.000 24: src0.xyz = temp[8], src1.xyz = temp[9], src2.xyz = temp[2] MAD temp[1].xyz, -src0.xyz, src1.xxx, src2.xyz 25: BEGIN_TEX; 26: TEX temp[9].xyz, temp[1].xyz_, CUBE[3]; 27: TEX temp[8].xyz, temp[6].xy__, 2D[2]; 28: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[9], src1.xyz = temp[8] MAD temp[1].xyz, src0.xyz, src0.111, -src1.xyz 30: src0.xyz = temp[1], src1.xyz = const[8], src2.xyz = temp[8] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = const[5], src1.xyz = temp[1] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 32: src0.xyz = temp[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=40************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 21, tex_end: 1 (code_addr: 00420540) TEX: TEX t8, t1, texture[1] (00008a01) TEX t7, t1, texture[0] (000081c1) 0: xyz: t8 t7 t0 -> t1.y (010401c8) w: t8 t7 t0 -> t1.w (008401c8) xyz: t8.xyz 1.0 -t7.xyz op: 00090a80 w: t8.w 1.0 -t7.w op: 000a8889 1: xyz: c0 t1 t7 -> t9.y (01247060) w: c0 t1 t7 -> t9.w (00a47060) xyz: c0.xyz t1.xyz t7.xyz op: 00020200 w: c0.w t1.w t7.w op: 0002c509 2: xyz: c7 t0 t0 -> t9.x (00a40027) w: t9 t2 t0 -> t7.w (009c0089) xyz: t9.www 1.0 0.0 op: 00050a8c w: t2.w c7.z 0.0 op: 4004010a 3: xyz: t9 c7 t1 -> t9.xy (01a419c9) w: t0 t0 t0 -> o0.w (01000000) xyz: t9.xyz c7.xxx -1.0 op: 000d4280 w: t1.x 1.0 t1.y op: 0001c886 4: xyz: t9 c2 t0 -> t9.xy (01a40889) w: t6 t0 t0 -> t10.w (00a80006) xyz: t9.xyz c2.zzz 0.0 op: 00050380 w: t6.w t9.x t9.x op: 05000009 5: xyz: t6 t0 t0 -> t10.xy (01a80006) w: t10 t0 t0 -> (0000000a) xyz: t6.xyz t10.www 0.0 op: 00050600 w: t6.x t6.x t6.x op: 00000000 6: xyz: t10 c9 c10 -> t10.xy (01aaaa4a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz c9.xyz c10.xyz op: 00020200 w: t10.x t10.x t10.x op: 00000000 7: xyz: c6 t10 t0 -> t1.y (010402a6) w: t0 t0 t0 -> (00000000) xyz: c6.xyz 1.0 -t10.xyz op: 00090a80 w: c6.x c6.x c6.x op: 00000000 8: xyz: t10 t0 t0 -> t1.x (0084000a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz 1.0 0.0 op: 00050a80 w: t10.x t10.x t10.x op: 00000000 9: xyz: t1 c11 t0 -> t6.xy (01980ac1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c11.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 10: xyz: t9 t0 t0 -> t9.xy (01a40009) w: t7 t0 t0 -> (00000007) xyz: t9.xyz t7.www -t9.xyz op: 00080600 w: t9.x t9.x t9.x op: 00000000 11: xyz: t0 t0 t0 -> t9.z (02240000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 12: xyz: t9 t0 t0 -> t1.x (00840009) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t9.xyz t9.xxx op: 00804000 w: t9.x t9.x t9.x op: 00000000 13: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t1.xyz op: 00080a95 w: t1.x t1.x t1.x op: 00000000 14: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: |t1.x| t1.x t1.x op: 05800040 15: xyz: t1 t0 t0 -> t9.z (02240001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: t1.x t1.x t1.x op: 05000000 16: xyz: t9 t3 t0 -> t8.x (00a000c9) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t3.xyz t9.xxx op: 00804200 w: t9.x t9.x t9.x op: 00000000 17: xyz: t9 t4 t0 -> t8.y (01200109) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t4.xyz t9.xxx op: 00804200 w: t9.x t9.x t9.x op: 00000000 18: xyz: t9 t5 t0 -> t8.z (02200149) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t5.xyz t9.xxx op: 00804200 w: t9.x t9.x t9.x op: 00000000 19: xyz: t2 t8 t0 -> t9.x (00a40202) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t8.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 20: xyz: t9 c7 t0 -> t9.x (00a409c9) w: t0 t0 t0 -> (00000000) xyz: t9.xyz c7.xyz 0.0 op: 00050200 w: t9.x t9.x t9.x op: 00000000 21: xyz: t8 t9 t2 -> t1.xyz (03842248) w: t0 t0 t0 -> (00000000) xyz: -t8.xyz t9.xxx t2.xyz op: 000202a0 w: t8.x t8.x t8.x op: 00000000 NODE 1: alu_offset: 22, tex_offset: 2, alu_end: 4, tex_end: 1 (code_addr: 00422116) TEX: TEX t9, t1, texture[3] (00009a41) TEX t8, t6, texture[2] (00009206) 22: xyz: t8 c4 t0 -> t8.xyz (03a00908) w: t0 t0 t0 -> (00000000) xyz: t8.xyz c4.xyz 0.0 op: 00050200 w: t8.x t8.x t8.x op: 00000000 23: xyz: t9 t8 t0 -> t1.xyz (03840209) w: t0 t0 t0 -> (00000000) xyz: t9.xyz 1.0 -t8.xyz op: 00090a80 w: t9.x t9.x t9.x op: 00000000 24: xyz: t1 c8 t8 -> t1.xyz (03848a01) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c8.xxx t8.xyz op: 00020280 w: t1.x t1.x t1.x op: 00000000 25: xyz: c5 t1 t0 -> t2.xyz (03880065) w: t0 t0 t0 -> (00000000) xyz: c5.xyz 1.0 -t1.xyz op: 00090a80 w: c5.x c5.x c5.x op: 00000000 26: xyz: t0 t2 t1 -> o0.xyz (1c001080) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t2.xyz t1.xyz op: 00020201 w: t0.x t0.x t0.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[0], 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 CONST[5..6] DCL CONST[0] DCL CONST[2] DCL CONST[4] DCL TEMP[0..10] IMM FLT32 { 2.0000, 1.0000, 0.0001, 0.0000} IMM FLT32 { 0.1250, 0.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[6], IN[0] 2: TEX TEMP[1], IN[2], SAMP[0], 2D 3: TEX TEMP[2], IN[2], SAMP[1], 2D 4: LRP TEMP[3], CONST[0], TEMP[2], TEMP[1] 5: MOV TEMP[3].x, TEMP[3].wwww 6: MAD TEMP[3], TEMP[3], IMM[0].xxxx, -IMM[0].yyyy 7: MUL TEMP[3].xy, TEMP[3], CONST[2].zzzz 8: MUL_SAT TEMP[1].w, IN[3].wwww, IMM[0].zzzz 9: SUB TEMP[2], IMM[0].wwww, TEMP[3] 10: MAD TEMP[3], TEMP[3], TEMP[1].wwww, TEMP[2] 11: MOV TEMP[3].z, IMM[0].wwww 12: DP3 TEMP[4].x, TEMP[3], TEMP[3] 13: ADD TEMP[4].x, IMM[0].yyyy, -TEMP[4].xxxx 14: RSQ TEMP[4].x, TEMP[4].xxxx 15: RCP TEMP[3].z, TEMP[4].xxxx 16: DP3 TEMP[2].x, TEMP[3], IN[4] 17: DP3 TEMP[2].y, TEMP[3], IN[5] 18: DP3 TEMP[2].z, TEMP[3], IN[6] 19: MOV TEMP[5], TEMP[0] 20: MOV TEMP[6], IN[3] 21: DP3 TEMP[3], TEMP[6], TEMP[2] 22: MUL TEMP[3], TEMP[3], IMM[0].xxxx 23: MAD TEMP[7], -TEMP[2], TEMP[3].xxxx, TEMP[6] 24: MOV TEMP[8], IMM[1].xxxx 25: TEX TEMP[2], TEMP[5], SAMP[2], RECT 26: MUL TEMP[2], TEMP[2], CONST[4] 27: TEX TEMP[3], TEMP[7], SAMP[3], CUBE 28: SUB TEMP[5], TEMP[3], TEMP[2] 29: MAD TEMP[5], TEMP[5], TEMP[8], TEMP[2] 30: MOV TEMP[9], TEMP[5] 31: ADD OUT[0].w, TEMP[10].xxxx, TEMP[10].yyyy 32: LRP OUT[0].xyz, IN[1].xxxx, CONST[5], TEMP[9] 33: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: SUB temp[0].y, const[6], temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: LRP temp[3], const[0], temp[2], temp[1]; 8: MOV temp[3].x, temp[3].wwww; 9: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 10: MUL temp[3].xy, temp[3], const[2].zzzz; 11: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 12: SUB temp[2], const[7].wwww, temp[3]; 13: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 14: MOV temp[3].z, const[7].wwww; 15: DP3 temp[4].x, temp[3], temp[3]; 16: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 17: RSQ temp[4].x, temp[4].xxxx; 18: RCP temp[3].z, temp[4].xxxx; 19: DP3 temp[2].x, temp[3], input[4]; 20: DP3 temp[2].y, temp[3], input[5]; 21: DP3 temp[2].z, temp[3], input[6]; 22: MOV temp[5], temp[0]; 23: MOV temp[6], input[3]; 24: DP3 temp[3], temp[6], temp[2]; 25: MUL temp[3], temp[3], const[7].xxxx; 26: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 27: MOV temp[8], const[8].xxxx; 28: TEX temp[2], temp[5], RECT[2]; 29: MUL temp[2], temp[2], const[4]; 30: TEX temp[3], temp[7], CUBE[3]; 31: SUB temp[5], temp[3], temp[2]; 32: MAD temp[5], temp[5], temp[8], temp[2]; 33: MOV temp[9], temp[5]; 34: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 35: LRP output[0].xyz, input[1].xxxx, const[5], temp[9]; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: SUB temp[0].y, const[6], temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: LRP temp[3], const[0], temp[2], temp[1]; 8: MOV temp[3].x, temp[3].wwww; 9: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 10: MUL temp[3].xy, temp[3], const[2].zzzz; 11: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 12: SUB temp[2], const[7].wwww, temp[3]; 13: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 14: MOV temp[3].z, const[7].wwww; 15: DP3 temp[4].x, temp[3], temp[3]; 16: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 17: RSQ temp[4].x, temp[4].xxxx; 18: RCP temp[3].z, temp[4].xxxx; 19: DP3 temp[2].x, temp[3], input[4]; 20: DP3 temp[2].y, temp[3], input[5]; 21: DP3 temp[2].z, temp[3], input[6]; 22: MOV temp[5], temp[0]; 23: MOV temp[6], input[3]; 24: DP3 temp[3], temp[6], temp[2]; 25: MUL temp[3], temp[3], const[7].xxxx; 26: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 27: MOV temp[8], const[8].xxxx; 28: TEX temp[2], temp[5], RECT[2]; 29: MUL temp[2], temp[2], const[4]; 30: TEX temp[3], temp[7], CUBE[3]; 31: SUB temp[5], temp[3], temp[2]; 32: MAD temp[5], temp[5], temp[8], temp[2]; 33: MOV temp[9], temp[5]; 34: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 35: LRP output[0].xyz, input[1].xxxx, const[5], temp[9]; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: SUB temp[0].y, const[6], temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: LRP temp[3], const[0], temp[2], temp[1]; 8: MOV temp[3].x, temp[3].wwww; 9: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 10: MUL temp[3].xy, temp[3], const[2].zzzz; 11: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 12: SUB temp[2], const[7].wwww, temp[3]; 13: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 14: MOV temp[3].z, const[7].wwww; 15: DP3 temp[4].x, temp[3], temp[3]; 16: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 17: RSQ temp[4].x, temp[4].xxxx; 18: RCP temp[3].z, temp[4].xxxx; 19: DP3 temp[2].x, temp[3], input[4]; 20: DP3 temp[2].y, temp[3], input[5]; 21: DP3 temp[2].z, temp[3], input[6]; 22: MOV temp[5], temp[0]; 23: MOV temp[6], input[3]; 24: DP3 temp[3], temp[6], temp[2]; 25: MUL temp[3], temp[3], const[7].xxxx; 26: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 27: MOV temp[8], const[8].xxxx; 28: TEX temp[2], temp[5], RECT[2]; 29: MUL temp[2], temp[2], const[4]; 30: TEX temp[3], temp[7], CUBE[3]; 31: SUB temp[5], temp[3], temp[2]; 32: MAD temp[5], temp[5], temp[8], temp[2]; 33: MOV temp[9], temp[5]; 34: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 35: LRP output[0].xyz, input[1].xxxx, const[5], temp[9]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: ADD temp[0].y, const[6], -temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: ADD temp[12], temp[2], -temp[1]; 8: MAD temp[3], const[0], temp[12], temp[1]; 9: MOV temp[3].x, temp[3].wwww; 10: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 11: MUL temp[3].xy, temp[3], const[2].zzzz; 12: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 13: ADD temp[2], const[7].wwww, -temp[3]; 14: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 15: MOV temp[3].z, const[7].wwww; 16: DP3 temp[4].x, temp[3], temp[3]; 17: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 18: RSQ temp[4].x, |temp[4].xxxx|; 19: RCP temp[3].z, temp[4].xxxx; 20: DP3 temp[2].x, temp[3], input[4]; 21: DP3 temp[2].y, temp[3], input[5]; 22: DP3 temp[2].z, temp[3], input[6]; 23: MOV temp[5], temp[0]; 24: MOV temp[6], input[3]; 25: DP3 temp[3], temp[6], temp[2]; 26: MUL temp[3], temp[3], const[7].xxxx; 27: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 28: MOV temp[8], const[8].xxxx; 29: TEX temp[2], temp[5], RECT[2]; 30: MUL temp[2], temp[2], const[4]; 31: TEX temp[3], temp[7], CUBE[3]; 32: ADD temp[5], temp[3], -temp[2]; 33: MAD temp[5], temp[5], temp[8], temp[2]; 34: MOV temp[9], temp[5]; 35: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 36: ADD temp[13], const[5], -temp[9]; 37: MAD output[0].xyz, input[1].xxxx, temp[13], temp[9]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[11].w, input[0].wwww; 1: MUL temp[11].xyz, input[0], temp[11].wwww; 2: MAD temp[11].xyz, temp[11].xyz0, const[9].xyz0, const[10].xyz0; 3: MOV temp[0], temp[11]; 4: ADD temp[0].y, const[6], -temp[11]; 5: TEX temp[1], input[2], 2D[0]; 6: TEX temp[2], input[2], 2D[1]; 7: ADD temp[12], temp[2], -temp[1]; 8: MAD temp[3], const[0], temp[12], temp[1]; 9: MOV temp[3].x, temp[3].wwww; 10: MAD temp[3], temp[3], const[7].xxxx, -const[7].yyyy; 11: MUL temp[3].xy, temp[3], const[2].zzzz; 12: MUL_SAT temp[1].w, input[3].wwww, const[7].zzzz; 13: ADD temp[2], const[7].wwww, -temp[3]; 14: MAD temp[3], temp[3], temp[1].wwww, temp[2]; 15: MOV temp[3].z, const[7].wwww; 16: DP3 temp[4].x, temp[3], temp[3]; 17: ADD temp[4].x, const[7].yyyy, -temp[4].xxxx; 18: RSQ temp[4].x, |temp[4].xxxx|; 19: RCP temp[3].z, temp[4].xxxx; 20: DP3 temp[2].x, temp[3], input[4]; 21: DP3 temp[2].y, temp[3], input[5]; 22: DP3 temp[2].z, temp[3], input[6]; 23: MOV temp[5], temp[0]; 24: MOV temp[6], input[3]; 25: DP3 temp[3], temp[6], temp[2]; 26: MUL temp[3], temp[3], const[7].xxxx; 27: MAD temp[7], -temp[2], temp[3].xxxx, temp[6]; 28: MOV temp[8], const[8].xxxx; 29: MUL temp[14], temp[5], const[11]; 30: TEX temp[2], temp[14], 2D[2]; 31: MUL temp[2], temp[2], const[4]; 32: TEX temp[3], temp[7], CUBE[3]; 33: ADD temp[5], temp[3], -temp[2]; 34: MAD temp[5], temp[5], temp[8], temp[2]; 35: MOV temp[9], temp[5]; 36: ADD output[0].w, temp[10].xxxx, temp[10].yyyy; 37: ADD temp[13], const[5], -temp[9]; 38: MAD output[0].xyz, input[1].xxxx, temp[13], temp[9]; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[11].w, input[0].w___; 1: MUL temp[11].xy, input[0].xy__, temp[11].ww__; 2: MAD temp[11].xy, temp[11].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[11].x___; 4: ADD temp[0].y, const[6]._y__, -temp[11]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: ADD temp[12].yw, temp[2]._y_w, -temp[1]._y_w; 8: MAD temp[3].yw, const[0]._y_w, temp[12]._y_w, temp[1]._y_w; 9: MOV temp[3].x, temp[3].w___; 10: MAD temp[3].xy, temp[3].xy__, const[7].xx__, -const[7].yy__; 11: MUL temp[3].xy, temp[3].xy__, const[2].zz__; 12: MUL_SAT temp[1].w, input[3].___w, const[7].___z; 13: ADD temp[2].xy, const[7].ww__, -temp[3].xy__; 14: MAD temp[3].xy, temp[3].xy__, temp[1].ww__, temp[2].xy__; 15: MOV temp[3].z, const[7].__w_; 16: DP3 temp[4].x, temp[3].xyz_, temp[3].xyz_; 17: ADD temp[4].x, const[7].y___, -temp[4].x___; 18: RSQ temp[4].x, |temp[4].x___|; 19: RCP temp[3].z, temp[4].x___; 20: DP3 temp[2].x, temp[3].xyz_, input[4].xyz_; 21: DP3 temp[2].y, temp[3].xyz_, input[5].xyz_; 22: DP3 temp[2].z, temp[3].xyz_, input[6].xyz_; 23: MOV temp[5].xy, temp[0].xy__; 24: MOV temp[6].xyz, input[3].xyz_; 25: DP3 temp[3].x, temp[6].xyz_, temp[2].xyz_; 26: MUL temp[3].x, temp[3].x___, const[7].x___; 27: MAD temp[7].xyz, -temp[2].xyz_, temp[3].xxx_, temp[6].xyz_; 28: MOV temp[8].xyz, const[8].xxx_; 29: MUL temp[14].xy, temp[5].xy__, const[11].xy__; 30: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 31: MUL temp[2].xyz, temp[2].xyz_, const[4].xyz_; 32: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 33: ADD temp[5].xyz, temp[3].xyz_, -temp[2].xyz_; 34: MAD temp[5].xyz, temp[5].xyz_, temp[8].xyz_, temp[2].xyz_; 35: MOV temp[9].xyz, temp[5].xyz_; 36: ADD output[0].w, temp[10].___x, temp[10].___y; 37: ADD temp[13].xyz, const[5].xyz_, -temp[9].xyz_; 38: MAD output[0].xyz, input[1].xxx_, temp[13].xyz_, temp[9].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[11].w, input[0].w___; 1: MUL temp[11].xy, input[0].xy__, temp[11].ww__; 2: MAD temp[11].xy, temp[11].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[11].x___; 4: ADD temp[0].y, const[6]._y__, -temp[11]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: ADD temp[12].yw, temp[2]._y_w, -temp[1]._y_w; 8: MAD temp[3].yw, const[0]._y_w, temp[12]._y_w, temp[1]._y_w; 9: MOV temp[3].x, temp[3].w___; 10: MAD temp[3].xy, temp[3].xy__, const[7].xx__, -none.11__; 11: MUL temp[3].xy, temp[3].xy__, const[2].zz__; 12: MUL_SAT temp[1].w, input[3].___w, const[7].___z; 13: MAD temp[3].xy, temp[3].xy__, temp[1].ww__, temp[3].-x-y__; 14: MOV temp[3].z, none.__0_; 15: DP3 temp[4].x, temp[3].xyz_, temp[3].xyz_; 16: ADD temp[4].x, none.1___, -temp[4].x___; 17: RSQ temp[4].x, |temp[4].x___|; 18: RCP temp[3].z, temp[4].x___; 19: DP3 temp[2].x, temp[3].xyz_, input[4].xyz_; 20: DP3 temp[2].y, temp[3].xyz_, input[5].xyz_; 21: DP3 temp[2].z, temp[3].xyz_, input[6].xyz_; 22: DP3 temp[3].x, input[3].xyz_, temp[2].xyz_; 23: MUL temp[3].x, temp[3].x___, const[7].x___; 24: MAD temp[7].xyz, -temp[2].xyz_, temp[3].xxx_, input[3].xyz_; 25: MUL temp[14].xy, temp[0].xy__, const[11].xy__; 26: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 27: MUL temp[2].xyz, temp[2].xyz_, const[4].xyz_; 28: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 29: ADD temp[5].xyz, temp[3].xyz_, -temp[2].xyz_; 30: MAD temp[5].xyz, temp[5].xyz_, const[8].xxx_, temp[2].xyz_; 31: ADD output[0].w, temp[10].___x, temp[10].___y; 32: ADD temp[13].xyz, const[5].xyz_, -temp[5].xyz_; 33: MAD output[0].xyz, input[1].xxx_, temp[13].xyz_, temp[5].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[11].w, input[0].w___; 1: MUL temp[11].xy, input[0].xy__, temp[11].ww__; 2: MAD temp[11].xy, temp[11].xy__, const[9].xy__, const[10].xy__; 3: MOV temp[0].x, temp[11].x___; 4: ADD temp[0].y, const[6]._y__, -temp[11]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: ADD temp[12].yw, temp[2]._y_w, -temp[1]._y_w; 8: MAD temp[3].yw, const[0]._y_w, temp[12]._y_w, temp[1]._y_w; 9: MOV temp[3].x, temp[3].w___; 10: MAD temp[3].xy, temp[3].xy__, const[7].xx__, -none.11__; 11: MUL temp[3].xy, temp[3].xy__, const[2].zz__; 12: MUL_SAT temp[1].w, input[3].___w, const[7].___z; 13: MAD temp[3].xy, temp[3].xy__, temp[1].ww__, temp[3].-x-y__; 14: MOV temp[3].z, none.__0_; 15: DP3 temp[4].x, temp[3].xyz_, temp[3].xyz_; 16: ADD temp[4].x, none.1___, -temp[4].x___; 17: RSQ temp[4].x, |temp[4].x___|; 18: RCP temp[3].z, temp[4].x___; 19: DP3 temp[2].x, temp[3].xyz_, input[4].xyz_; 20: DP3 temp[2].y, temp[3].xyz_, input[5].xyz_; 21: DP3 temp[2].z, temp[3].xyz_, input[6].xyz_; 22: DP3 temp[3].x, input[3].xyz_, temp[2].xyz_; 23: MUL temp[3].x, temp[3].x___, const[7].x___; 24: MAD temp[7].xyz, -temp[2].xyz_, temp[3].xxx_, input[3].xyz_; 25: MUL temp[14].xy, temp[0].xy__, const[11].xy__; 26: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 27: MUL temp[2].xyz, temp[2].xyz_, const[4].xyz_; 28: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 29: ADD temp[5].xyz, temp[3].xyz_, -temp[2].xyz_; 30: MAD temp[5].xyz, temp[5].xyz_, const[8].xxx_, temp[2].xyz_; 31: ADD output[0].w, temp[10].___x, temp[10].___y; 32: ADD temp[13].xyz, const[5].xyz_, -temp[5].xyz_; 33: MAD output[0].xyz, input[1].xxx_, temp[13].xyz_, temp[5].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[11].w, src0.w 1: src0.xyz = input[0], src0.w = temp[11] MAD temp[11].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[11], src1.xyz = const[9], src2.xyz = const[10] MAD temp[11].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[11] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[6], src1.xyz = temp[11] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[12].y, src0._y_, src0.111, -src1._y_ MAD temp[12].w, src0.w, src0.1, -src1.w 8: src0.xyz = const[0], src0.w = const[0], src1.xyz = temp[12], src1.w = temp[12], src2.xyz = temp[1], src2.w = temp[1] MAD temp[3].y, src0._y_, src1._y_, src2._y_ MAD temp[3].w, src0.w, src1.w, src2.w 9: src0.w = temp[3] MAD temp[3].x, src0.w__, src0.111, src0.000 10: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xy, src0.xy_, src1.xx_, -src0.11_ 11: src0.xyz = temp[3], src1.xyz = const[2] MAD temp[3].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[7], src0.w = input[3] MAD_SAT temp[1].w, src0.w, src0.z, src0.0 13: src0.xyz = temp[3], src0.w = temp[1] MAD temp[3].xy, src0.xy_, src0.ww_, -src0.xy_ 14: MAD temp[3].z, src0.__0, src0.111, src0.000 15: src0.xyz = temp[3] DP3 temp[4].x, src0.xyz, src0.xyz 16: src0.xyz = temp[4] MAD temp[4].x, src0.1__, src0.111, -src0.x__ 17: src0.xyz = temp[4] REPL_ALPHA temp[4].x RSQ, |src0.x| 18: src0.xyz = temp[4] REPL_ALPHA temp[3].z RCP, src0.x 19: src0.xyz = temp[3], src1.xyz = input[4] DP3 temp[2].x, src0.xyz, src1.xyz 20: src0.xyz = temp[3], src1.xyz = input[5] DP3 temp[2].y, src0.xyz, src1.xyz 21: src0.xyz = temp[3], src1.xyz = input[6] DP3 temp[2].z, src0.xyz, src1.xyz 22: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[3].x, src0.xyz, src1.xyz 23: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].x, src0.x__, src1.x__, src0.000 24: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = input[3] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 25: src0.xyz = temp[0], src1.xyz = const[11] MAD temp[14].xy, src0.xy_, src1.xy_, src0.000 26: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 27: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 28: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 29: src0.xyz = temp[3], src1.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 30: src0.xyz = temp[5], src1.xyz = const[8], src2.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = temp[10] MAD color[0].w, src0.x, src0.1, src0.y 32: src0.xyz = const[5], src1.xyz = temp[5] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz 33: src0.xyz = input[1], src1.xyz = temp[13], src2.xyz = temp[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[2].yw, input[2].xy__, 2D[1]; 2: TEX temp[1].yw, input[2].xy__, 2D[0]; 3: src0.xyz = temp[2], src0.w = temp[2], src1.xyz = temp[1], src1.w = temp[1] MAD temp[12].y, src0._y_, src0.111, -src1._y_ MAD temp[12].w, src0.w, src0.1, -src1.w 4: src0.xyz = const[0], src0.w = const[0], src1.xyz = temp[12], src1.w = temp[12], src2.xyz = temp[1], src2.w = temp[1] MAD temp[3].y, src0._y_, src1._y_, src2._y_ MAD temp[3].w, src0.w, src1.w, src2.w 5: src0.xyz = const[7], src0.w = temp[3], src1.w = input[3] MAD temp[3].x, src0.w__, src0.111, src0.000 MAD_SAT temp[1].w, src1.w, src0.z, src0.0 6: src0.xyz = temp[3], src1.xyz = const[7], src2.xyz = temp[10] MAD temp[3].xy, src0.xy_, src1.xx_, -src0.11_ MAD color[0].w, src2.x, src0.1, src2.y 7: src0.xyz = temp[3], src0.w = input[0], src1.xyz = const[2] MAD temp[3].xy, src0.xy_, src1.zz_, src0.000 RCP temp[11].w, src0.w 8: src0.xyz = input[0], src0.w = temp[11] MAD temp[11].xy, src0.xy_, src0.ww_, src0.000 9: src0.xyz = temp[11], src1.xyz = const[9], src2.xyz = const[10] MAD temp[11].xy, src0.xy_, src1.xy_, src2.xy_ 10: src0.xyz = const[6], src1.xyz = temp[11] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 11: src0.xyz = temp[11] MAD temp[0].x, src0.x__, src0.111, src0.000 12: src0.xyz = temp[0], src1.xyz = const[11] MAD temp[14].xy, src0.xy_, src1.xy_, src0.000 13: src0.xyz = temp[3], src0.w = temp[1] MAD temp[3].xy, src0.xy_, src0.ww_, -src0.xy_ 14: MAD temp[3].z, src0.__0, src0.111, src0.000 15: src0.xyz = temp[3] DP3 temp[4].x, src0.xyz, src0.xyz 16: src0.xyz = temp[4] MAD temp[4].x, src0.1__, src0.111, -src0.x__ 17: src0.xyz = temp[4] REPL_ALPHA temp[4].x RSQ, |src0.x| 18: src0.xyz = temp[4] REPL_ALPHA temp[3].z RCP, src0.x 19: src0.xyz = temp[3], src1.xyz = input[4] DP3 temp[2].x, src0.xyz, src1.xyz 20: src0.xyz = temp[3], src1.xyz = input[5] DP3 temp[2].y, src0.xyz, src1.xyz 21: src0.xyz = temp[3], src1.xyz = input[6] DP3 temp[2].z, src0.xyz, src1.xyz 22: src0.xyz = input[3], src1.xyz = temp[2] DP3 temp[3].x, src0.xyz, src1.xyz 23: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].x, src0.x__, src1.x__, src0.000 24: src0.xyz = temp[2], src1.xyz = temp[3], src2.xyz = input[3] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 25: BEGIN_TEX; 26: TEX temp[3].xyz, temp[7].xyz_, CUBE[3]; 27: TEX temp[2].xyz, temp[14].xy__, 2D[2]; 28: src0.xyz = temp[2], src1.xyz = const[4] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[3], src1.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 30: src0.xyz = temp[5], src1.xyz = const[8], src2.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = const[5], src1.xyz = temp[5] MAD temp[13].xyz, src0.xyz, src0.111, -src1.xyz 32: src0.xyz = input[1], src1.xyz = temp[13], src2.xyz = temp[5] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8].yw, temp[1].xy__, 2D[1]; 2: TEX temp[7].yw, temp[1].xy__, 2D[0]; 3: src0.xyz = temp[8], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[7] MAD temp[1].y, src0._y_, src0.111, -src1._y_ MAD temp[1].w, src0.w, src0.1, -src1.w 4: src0.xyz = const[0], src0.w = const[0], src1.xyz = temp[1], src1.w = temp[1], src2.xyz = temp[7], src2.w = temp[7] MAD temp[9].y, src0._y_, src1._y_, src2._y_ MAD temp[9].w, src0.w, src1.w, src2.w 5: src0.xyz = const[7], src0.w = temp[9], src1.w = temp[2] MAD temp[9].x, src0.w__, src0.111, src0.000 MAD_SAT temp[7].w, src1.w, src0.z, src0.0 6: src0.xyz = temp[9], src1.xyz = const[7], src2.xyz = temp[1] MAD temp[9].xy, src0.xy_, src1.xx_, -src0.11_ MAD color[0].w, src2.x, src0.1, src2.y 7: src0.xyz = temp[9], src0.w = temp[6], src1.xyz = const[2] MAD temp[9].xy, src0.xy_, src1.zz_, src0.000 RCP temp[10].w, src0.w 8: src0.xyz = temp[6], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 9: src0.xyz = temp[10], src1.xyz = const[9], src2.xyz = const[10] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 10: src0.xyz = const[6], src1.xyz = temp[10] MAD temp[1].y, src0._y_, src0.111, -src1._y_ 11: src0.xyz = temp[10] MAD temp[1].x, src0.x__, src0.111, src0.000 12: src0.xyz = temp[1], src1.xyz = const[11] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 13: src0.xyz = temp[9], src0.w = temp[7] MAD temp[9].xy, src0.xy_, src0.ww_, -src0.xy_ 14: MAD temp[9].z, src0.__0, src0.111, src0.000 15: src0.xyz = temp[9] DP3 temp[1].x, src0.xyz, src0.xyz 16: src0.xyz = temp[1] MAD temp[1].x, src0.1__, src0.111, -src0.x__ 17: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 18: src0.xyz = temp[1] REPL_ALPHA temp[9].z RCP, src0.x 19: src0.xyz = temp[9], src1.xyz = temp[3] DP3 temp[8].x, src0.xyz, src1.xyz 20: src0.xyz = temp[9], src1.xyz = temp[4] DP3 temp[8].y, src0.xyz, src1.xyz 21: src0.xyz = temp[9], src1.xyz = temp[5] DP3 temp[8].z, src0.xyz, src1.xyz 22: src0.xyz = temp[2], src1.xyz = temp[8] DP3 temp[9].x, src0.xyz, src1.xyz 23: src0.xyz = temp[9], src1.xyz = const[7] MAD temp[9].x, src0.x__, src1.x__, src0.000 24: src0.xyz = temp[8], src1.xyz = temp[9], src2.xyz = temp[2] MAD temp[1].xyz, -src0.xyz, src1.xxx, src2.xyz 25: BEGIN_TEX; 26: TEX temp[9].xyz, temp[1].xyz_, CUBE[3]; 27: TEX temp[8].xyz, temp[6].xy__, 2D[2]; 28: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[9], src1.xyz = temp[8] MAD temp[1].xyz, src0.xyz, src0.111, -src1.xyz 30: src0.xyz = temp[1], src1.xyz = const[8], src2.xyz = temp[8] MAD temp[1].xyz, src0.xyz, src1.xxx, src2.xyz 31: src0.xyz = const[5], src1.xyz = temp[1] MAD temp[2].xyz, src0.xyz, src0.111, -src1.xyz 32: src0.xyz = temp[0], src1.xyz = temp[2], src2.xyz = temp[1] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz pc=41************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 21, tex_end: 1 (code_addr: 00420540) TEX: TEX t8, t1, texture[1] (00008a01) TEX t7, t1, texture[0] (000081c1) 0: xyz: t8 t7 t0 -> t1.y (010401c8) w: t8 t7 t0 -> t1.w (008401c8) xyz: t8.xyz 1.0 -t7.xyz op: 00090a80 w: t8.w 1.0 -t7.w op: 000a8889 1: xyz: c0 t1 t7 -> t9.y (01247060) w: c0 t1 t7 -> t9.w (00a47060) xyz: c0.xyz t1.xyz t7.xyz op: 00020200 w: c0.w t1.w t7.w op: 0002c509 2: xyz: c7 t0 t0 -> t9.x (00a40027) w: t9 t2 t0 -> t7.w (009c0089) xyz: t9.www 1.0 0.0 op: 00050a8c w: t2.w c7.z 0.0 op: 4004010a 3: xyz: t9 c7 t1 -> t9.xy (01a419c9) w: t0 t0 t0 -> o0.w (01000000) xyz: t9.xyz c7.xxx -1.0 op: 000d4280 w: t1.x 1.0 t1.y op: 0001c886 4: xyz: t9 c2 t0 -> t9.xy (01a40889) w: t6 t0 t0 -> t10.w (00a80006) xyz: t9.xyz c2.zzz 0.0 op: 00050380 w: t6.w t9.x t9.x op: 05000009 5: xyz: t6 t0 t0 -> t10.xy (01a80006) w: t10 t0 t0 -> (0000000a) xyz: t6.xyz t10.www 0.0 op: 00050600 w: t6.x t6.x t6.x op: 00000000 6: xyz: t10 c9 c10 -> t10.xy (01aaaa4a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz c9.xyz c10.xyz op: 00020200 w: t10.x t10.x t10.x op: 00000000 7: xyz: c6 t10 t0 -> t1.y (010402a6) w: t0 t0 t0 -> (00000000) xyz: c6.xyz 1.0 -t10.xyz op: 00090a80 w: c6.x c6.x c6.x op: 00000000 8: xyz: t10 t0 t0 -> t1.x (0084000a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz 1.0 0.0 op: 00050a80 w: t10.x t10.x t10.x op: 00000000 9: xyz: t1 c11 t0 -> t6.xy (01980ac1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c11.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 10: xyz: t9 t0 t0 -> t9.xy (01a40009) w: t7 t0 t0 -> (00000007) xyz: t9.xyz t7.www -t9.xyz op: 00080600 w: t9.x t9.x t9.x op: 00000000 11: xyz: t0 t0 t0 -> t9.z (02240000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 12: xyz: t9 t0 t0 -> t1.x (00840009) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t9.xyz t9.xxx op: 00804000 w: t9.x t9.x t9.x op: 00000000 13: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t1.xyz op: 00080a95 w: t1.x t1.x t1.x op: 00000000 14: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: |t1.x| t1.x t1.x op: 05800040 15: xyz: t1 t0 t0 -> t9.z (02240001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: t1.x t1.x t1.x op: 05000000 16: xyz: t9 t3 t0 -> t8.x (00a000c9) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t3.xyz t9.xxx op: 00804200 w: t9.x t9.x t9.x op: 00000000 17: xyz: t9 t4 t0 -> t8.y (01200109) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t4.xyz t9.xxx op: 00804200 w: t9.x t9.x t9.x op: 00000000 18: xyz: t9 t5 t0 -> t8.z (02200149) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t5.xyz t9.xxx op: 00804200 w: t9.x t9.x t9.x op: 00000000 19: xyz: t2 t8 t0 -> t9.x (00a40202) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t8.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 20: xyz: t9 c7 t0 -> t9.x (00a409c9) w: t0 t0 t0 -> (00000000) xyz: t9.xyz c7.xyz 0.0 op: 00050200 w: t9.x t9.x t9.x op: 00000000 21: xyz: t8 t9 t2 -> t1.xyz (03842248) w: t0 t0 t0 -> (00000000) xyz: -t8.xyz t9.xxx t2.xyz op: 000202a0 w: t8.x t8.x t8.x op: 00000000 NODE 1: alu_offset: 22, tex_offset: 2, alu_end: 4, tex_end: 1 (code_addr: 00422116) TEX: TEX t9, t1, texture[3] (00009a41) TEX t8, t6, texture[2] (00009206) 22: xyz: t8 c4 t0 -> t8.xyz (03a00908) w: t0 t0 t0 -> (00000000) xyz: t8.xyz c4.xyz 0.0 op: 00050200 w: t8.x t8.x t8.x op: 00000000 23: xyz: t9 t8 t0 -> t1.xyz (03840209) w: t0 t0 t0 -> (00000000) xyz: t9.xyz 1.0 -t8.xyz op: 00090a80 w: t9.x t9.x t9.x op: 00000000 24: xyz: t1 c8 t8 -> t1.xyz (03848a01) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c8.xxx t8.xyz op: 00020280 w: t1.x t1.x t1.x op: 00000000 25: xyz: c5 t1 t0 -> t2.xyz (03880065) w: t0 t0 t0 -> (00000000) xyz: c5.xyz 1.0 -t1.xyz op: 00090a80 w: c5.x c5.x c5.x op: 00000000 26: xyz: t0 t2 t1 -> o0.xyz (1c001080) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t2.xyz t1.xyz op: 00020201 w: t0.x t0.x t0.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[2], PERSPECTIVE DCL IN[2], GENERIC[3], PERSPECTIVE DCL IN[3], GENERIC[4], PERSPECTIVE DCL IN[4], GENERIC[5], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL CONST[1] DCL TEMP[0..4] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[0], SAMP[0], 2D 1: MOV TEMP[0].x, TEMP[0].wwww 2: MAD TEMP[1], TEMP[0], IMM[0].xxxx, -IMM[0].yyyy 3: MOV TEMP[1].z, IMM[0].zzzz 4: DP3 TEMP[0].x, TEMP[1], TEMP[1] 5: ADD TEMP[0].x, IMM[0].yyyy, -TEMP[0].xxxx 6: RSQ TEMP[0].x, TEMP[0].xxxx 7: RCP TEMP[1].z, TEMP[0].xxxx 8: DP3 TEMP[0].x, TEMP[1], IN[2] 9: DP3 TEMP[0].y, TEMP[1], IN[3] 10: DP3 TEMP[0].z, TEMP[1], IN[4] 11: DP3 TEMP[2].w, IN[1], IN[1] 12: RSQ TEMP[2].w, TEMP[2].wwww 13: MUL TEMP[2], IN[1], TEMP[2].wwww 14: DP3 TEMP[1], TEMP[2], TEMP[0] 15: MUL TEMP[1], TEMP[1], IMM[0].xxxx 16: MAD TEMP[3], -TEMP[0], TEMP[1].xxxx, TEMP[2] 17: DP3_SAT TEMP[0], -TEMP[2], TEMP[0] 18: SUB TEMP[0], IMM[0].yyyy, TEMP[0] 19: POW TEMP[4], TEMP[0].xxxx, CONST[1].xxxx 20: TEX TEMP[3], TEMP[3], SAMP[1], CUBE 21: TEX TEMP[1], IN[0], SAMP[2], 2D 22: MUL OUT[0].xyz, TEMP[3], CONST[1].yyyy 23: ADD TEMP[4], TEMP[4], CONST[1].zzzz 24: MUL OUT[0].w, TEMP[1].xxxx, TEMP[4] 25: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, temp[0].xxxx; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, temp[2].wwww; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: SUB temp[0], const[2].yyyy, temp[0]; 19: POW temp[4], temp[0].xxxx, const[1].xxxx; 20: TEX temp[3], temp[3], CUBE[1]; 21: TEX temp[1], input[0], 2D[2]; 22: MUL output[0].xyz, temp[3], const[1].yyyy; 23: ADD temp[4], temp[4], const[1].zzzz; 24: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, temp[0].xxxx; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, temp[2].wwww; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: SUB temp[0], const[2].yyyy, temp[0]; 19: POW temp[4], temp[0].xxxx, const[1].xxxx; 20: TEX temp[3], temp[3], CUBE[1]; 21: TEX temp[1], input[0], 2D[2]; 22: MUL output[0].xyz, temp[3], const[1].yyyy; 23: ADD temp[4], temp[4], const[1].zzzz; 24: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, temp[0].xxxx; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, temp[2].wwww; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: SUB temp[0], const[2].yyyy, temp[0]; 19: POW temp[4], temp[0].xxxx, const[1].xxxx; 20: TEX temp[3], temp[3], CUBE[1]; 21: TEX temp[1], input[0], 2D[2]; 22: MUL output[0].xyz, temp[3], const[1].yyyy; 23: ADD temp[4], temp[4], const[1].zzzz; 24: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, |temp[0].xxxx|; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, |temp[2].wwww|; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: ADD temp[0], const[2].yyyy, -temp[0]; 19: LG2 temp[5].w, temp[0].xxxx; 20: MUL temp[5].w, temp[5].wwww, const[1].xxxx; 21: EX2 temp[4], temp[5].wwww; 22: TEX temp[3], temp[3], CUBE[1]; 23: TEX temp[1], input[0], 2D[2]; 24: MUL output[0].xyz, temp[3], const[1].yyyy; 25: ADD temp[4], temp[4], const[1].zzzz; 26: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, |temp[0].xxxx|; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, |temp[2].wwww|; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: ADD temp[0], const[2].yyyy, -temp[0]; 19: LG2 temp[5].w, temp[0].xxxx; 20: MUL temp[5].w, temp[5].wwww, const[1].xxxx; 21: EX2 temp[4], temp[5].wwww; 22: TEX temp[3], temp[3], CUBE[1]; 23: MUL temp[6], input[0], const[3]; 24: TEX temp[1], temp[6], 2D[2]; 25: MUL output[0].xyz, temp[3], const[1].yyyy; 26: ADD temp[4], temp[4], const[1].zzzz; 27: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[1].xy, temp[0].xy__, const[2].xx__, -const[2].yy__; 3: MOV temp[1].z, const[2].__z_; 4: DP3 temp[0].x, temp[1].xyz_, temp[1].xyz_; 5: ADD temp[0].x, const[2].y___, -temp[0].x___; 6: RSQ temp[0].x, |temp[0].x___|; 7: RCP temp[1].z, temp[0].x___; 8: DP3 temp[0].x, temp[1].xyz_, input[2].xyz_; 9: DP3 temp[0].y, temp[1].xyz_, input[3].xyz_; 10: DP3 temp[0].z, temp[1].xyz_, input[4].xyz_; 11: DP3 temp[2].w, input[1].xyz_, input[1].xyz_; 12: RSQ temp[2].w, |temp[2].w___|; 13: MUL temp[2].xyz, input[1].xyz_, temp[2].www_; 14: DP3 temp[1].x, temp[2].xyz_, temp[0].xyz_; 15: MUL temp[1].x, temp[1].x___, const[2].x___; 16: MAD temp[3].xyz, -temp[0].xyz_, temp[1].xxx_, temp[2].xyz_; 17: DP3_SAT temp[0].x, -temp[2].xyz_, temp[0].xyz_; 18: ADD temp[0].x, const[2].y___, -temp[0].x___; 19: LG2 temp[5].w, temp[0].x___; 20: MUL temp[5].w, temp[5].___w, const[1].___x; 21: EX2 temp[4].w, temp[5].w___; 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: MUL temp[6].xy, input[0].xy__, const[3].xy__; 24: TEX temp[1].x, temp[6].xy__, 2D[2]; 25: MUL output[0].xyz, temp[3].xyz_, const[1].yyy_; 26: ADD temp[4].w, temp[4].___w, const[1].___z; 27: MUL output[0].w, temp[1].___x, temp[4].___w; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[1].xy, temp[0].xy__, const[2].xx__, -none.11__; 3: MOV temp[1].z, none.__0_; 4: DP3 temp[0].x, temp[1].xyz_, temp[1].xyz_; 5: ADD temp[0].x, none.1___, -temp[0].x___; 6: RSQ temp[0].x, |temp[0].x___|; 7: RCP temp[1].z, temp[0].x___; 8: DP3 temp[0].x, temp[1].xyz_, input[2].xyz_; 9: DP3 temp[0].y, temp[1].xyz_, input[3].xyz_; 10: DP3 temp[0].z, temp[1].xyz_, input[4].xyz_; 11: DP3 temp[2].w, input[1].xyz_, input[1].xyz_; 12: RSQ temp[2].w, |temp[2].w___|; 13: MUL temp[2].xyz, input[1].xyz_, temp[2].www_; 14: DP3 temp[1].x, temp[2].xyz_, temp[0].xyz_; 15: MUL temp[1].x, temp[1].x___, const[2].x___; 16: MAD temp[3].xyz, -temp[0].xyz_, temp[1].xxx_, temp[2].xyz_; 17: DP3_SAT temp[0].x, -temp[2].xyz_, temp[0].xyz_; 18: ADD temp[0].x, none.1___, -temp[0].x___; 19: LG2 temp[5].w, temp[0].x___; 20: MUL temp[5].w, temp[5].___w, const[1].___x; 21: EX2 temp[4].w, temp[5].w___; 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: MUL temp[6].xy, input[0].xy__, const[3].xy__; 24: TEX temp[1].x, temp[6].xy__, 2D[2]; 25: MUL output[0].xyz, temp[3].xyz_, const[1].yyy_; 26: ADD temp[4].w, temp[4].___w, const[1].___z; 27: MUL output[0].w, temp[1].___x, temp[4].___w; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[1].xy, temp[0].xy__, const[2].xx__, -none.11__; 3: MOV temp[1].z, none.__0_; 4: DP3 temp[0].x, temp[1].xyz_, temp[1].xyz_; 5: ADD temp[0].x, none.1___, -temp[0].x___; 6: RSQ temp[0].x, |temp[0].x___|; 7: RCP temp[1].z, temp[0].x___; 8: DP3 temp[0].x, temp[1].xyz_, input[2].xyz_; 9: DP3 temp[0].y, temp[1].xyz_, input[3].xyz_; 10: DP3 temp[0].z, temp[1].xyz_, input[4].xyz_; 11: DP3 temp[2].w, input[1].xyz_, input[1].xyz_; 12: RSQ temp[2].w, |temp[2].w___|; 13: MUL temp[2].xyz, input[1].xyz_, temp[2].www_; 14: DP3 temp[1].x, temp[2].xyz_, temp[0].xyz_; 15: MUL temp[1].x, temp[1].x___, const[2].x___; 16: MAD temp[3].xyz, -temp[0].xyz_, temp[1].xxx_, temp[2].xyz_; 17: DP3_SAT temp[0].x, -temp[2].xyz_, temp[0].xyz_; 18: ADD temp[0].x, none.1___, -temp[0].x___; 19: LG2 temp[5].w, temp[0].x___; 20: MUL temp[5].w, temp[5].___w, const[1].___x; 21: EX2 temp[4].w, temp[5].w___; 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: MUL temp[6].xy, input[0].xy__, const[3].xy__; 24: TEX temp[1].x, temp[6].xy__, 2D[2]; 25: MUL output[0].xyz, temp[3].xyz_, const[1].yyy_; 26: ADD temp[4].w, temp[4].___w, const[1].___z; 27: MUL output[0].w, temp[1].___x, temp[4].___w; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: src0.w = temp[0] MAD temp[0].x, src0.w__, src0.111, src0.000 2: src0.xyz = temp[0], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src1.xx_, -src0.11_ 3: MAD temp[1].z, src0.__0, src0.111, src0.000 4: src0.xyz = temp[1] DP3 temp[0].x, src0.xyz, src0.xyz 5: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 6: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 7: src0.xyz = temp[0] REPL_ALPHA temp[1].z RCP, src0.x 8: src0.xyz = temp[1], src1.xyz = input[2] DP3 temp[0].x, src0.xyz, src1.xyz 9: src0.xyz = temp[1], src1.xyz = input[3] DP3 temp[0].y, src0.xyz, src1.xyz 10: src0.xyz = temp[1], src1.xyz = input[4] DP3 temp[0].z, src0.xyz, src1.xyz 11: src0.xyz = input[1] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0._, src0._ 12: src0.w = temp[2] RSQ temp[2].w, |src0.w| 13: src0.xyz = input[1], src0.w = temp[2] MAD temp[2].xyz, src0.xyz, src0.www, src0.000 14: src0.xyz = temp[2], src1.xyz = temp[0] DP3 temp[1].x, src0.xyz, src1.xyz 15: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].x, src0.x__, src1.x__, src0.000 16: src0.xyz = temp[0], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[3].xyz, -src0.xyz, src1.xxx, src2.xyz 17: src0.xyz = temp[2], src1.xyz = temp[0] DP3_SAT temp[0].x, -src0.xyz, src1.xyz 18: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 19: src0.xyz = temp[0] LG2 temp[5].w, src0.x 20: src0.xyz = const[1], src0.w = temp[5] MAD temp[5].w, src0.w, src0.x, src0.0 21: src0.w = temp[5] EX2 temp[4].w, src0.w 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: src0.xyz = input[0], src1.xyz = const[3] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 24: TEX temp[1].x, temp[6].xy__, 2D[2]; 25: src0.xyz = temp[3], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src1.yyy, src0.000 26: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.1, src0.z 27: src0.xyz = temp[1], src0.w = temp[4] MAD color[0].w, src0.x, src0.w, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0].yw, input[0].xy__, 2D[0]; 2: src0.xyz = input[1] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0._, src0._ 3: src0.w = temp[0], src1.w = temp[2] MAD temp[0].x, src0.w__, src0.111, src0.000 RSQ temp[2].w, |src1.w| 4: src0.xyz = input[1], src0.w = temp[2] MAD temp[2].xyz, src0.xyz, src0.www, src0.000 5: src0.xyz = temp[0], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src1.xx_, -src0.11_ 6: src0.xyz = input[0], src1.xyz = const[3] MAD temp[6].xy, src0.xy_, src1.xy_, src0.000 7: MAD temp[1].z, src0.__0, src0.111, src0.000 8: src0.xyz = temp[1] DP3 temp[0].x, src0.xyz, src0.xyz 9: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 10: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 11: src0.xyz = temp[0] REPL_ALPHA temp[1].z RCP, src0.x 12: src0.xyz = temp[1], src1.xyz = input[2] DP3 temp[0].x, src0.xyz, src1.xyz 13: src0.xyz = temp[1], src1.xyz = input[3] DP3 temp[0].y, src0.xyz, src1.xyz 14: src0.xyz = temp[1], src1.xyz = input[4] DP3 temp[0].z, src0.xyz, src1.xyz 15: src0.xyz = temp[2], src1.xyz = temp[0] DP3 temp[1].x, src0.xyz, src1.xyz 16: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].x, src0.x__, src1.x__, src0.000 17: src0.xyz = temp[0], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[3].xyz, -src0.xyz, src1.xxx, src2.xyz 18: src0.xyz = temp[2], src1.xyz = temp[0] DP3_SAT temp[0].x, -src0.xyz, src1.xyz 19: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 20: src0.xyz = temp[0] LG2 temp[5].w, src0.x 21: src0.xyz = const[1], src0.w = temp[5] MAD temp[5].w, src0.w, src0.x, src0.0 22: src0.w = temp[5] EX2 temp[4].w, src0.w 23: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.1, src0.z 24: BEGIN_TEX; 25: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 26: TEX temp[1].x, temp[6].xy__, 2D[2]; 27: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = const[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.yyy, src0.000 MAD color[0].w, src2.x, src0.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5].yw, temp[0].xy__, 2D[0]; 2: src0.xyz = temp[1] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 3: src0.w = temp[5], src1.w = temp[6] MAD temp[5].x, src0.w__, src0.111, src0.000 RSQ temp[6].w, |src1.w| 4: src0.xyz = temp[1], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 5: src0.xyz = temp[5], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src1.xx_, -src0.11_ 6: src0.xyz = temp[0], src1.xyz = const[3] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 7: MAD temp[1].z, src0.__0, src0.111, src0.000 8: src0.xyz = temp[1] DP3 temp[5].x, src0.xyz, src0.xyz 9: src0.xyz = temp[5] MAD temp[5].x, src0.1__, src0.111, -src0.x__ 10: src0.xyz = temp[5] REPL_ALPHA temp[5].x RSQ, |src0.x| 11: src0.xyz = temp[5] REPL_ALPHA temp[1].z RCP, src0.x 12: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[5].x, src0.xyz, src1.xyz 13: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[5].y, src0.xyz, src1.xyz 14: src0.xyz = temp[1], src1.xyz = temp[4] DP3 temp[5].z, src0.xyz, src1.xyz 15: src0.xyz = temp[6], src1.xyz = temp[5] DP3 temp[1].x, src0.xyz, src1.xyz 16: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].x, src0.x__, src1.x__, src0.000 17: src0.xyz = temp[5], src1.xyz = temp[1], src2.xyz = temp[6] MAD temp[0].xyz, -src0.xyz, src1.xxx, src2.xyz 18: src0.xyz = temp[6], src1.xyz = temp[5] DP3_SAT temp[5].x, -src0.xyz, src1.xyz 19: src0.xyz = temp[5] MAD temp[5].x, src0.1__, src0.111, -src0.x__ 20: src0.xyz = temp[5] LG2 temp[2].w, src0.x 21: src0.xyz = const[1], src0.w = temp[2] MAD temp[2].w, src0.w, src0.x, src0.0 22: src0.w = temp[2] EX2 temp[2].w, src0.w 23: src0.xyz = const[1], src0.w = temp[2] MAD temp[2].w, src0.w, src0.1, src0.z 24: BEGIN_TEX; 25: TEX temp[0].xyz, temp[0].xyz_, CUBE[1]; 26: TEX temp[1].x, temp[7].xy__, 2D[2]; 27: src0.xyz = temp[0], src0.w = temp[2], src1.xyz = const[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.yyy, src0.000 MAD color[0].w, src2.x, src0.w, src0.0 pc=42************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 21, tex_end: 0 (code_addr: 00000540) TEX: TEX t5, t0, texture[0] (00008140) 0: xyz: t1 t0 t0 -> (00000001) w: t0 t0 t0 -> t6.w (00980000) xyz: t1.xyz t1.xyz t1.xxx op: 00804000 w: 1.0 1.0 t1.x op: 00800891 1: xyz: t0 t0 t0 -> t5.x (00940000) w: t5 t6 t0 -> t6.w (00980185) xyz: t5.www 1.0 0.0 op: 00050a8c w: |t6.w| t0.x t0.x op: 0580004a 2: xyz: t1 t0 t0 -> t6.xyz (03980001) w: t6 t0 t0 -> (00000006) xyz: t1.xyz t6.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 3: xyz: t5 c2 t0 -> t1.xy (01840885) w: t0 t0 t0 -> (00000000) xyz: t5.xyz c2.xxx -1.0 op: 000d4280 w: t5.x t5.x t5.x op: 00000000 4: xyz: t0 c3 t0 -> t7.xy (019c08c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c3.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 5: xyz: t0 t0 t0 -> t1.z (02040000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 6: xyz: t1 t0 t0 -> t5.x (00940001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.xyz t1.xxx op: 00804000 w: t1.x t1.x t1.x op: 00000000 7: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t5.xyz op: 00080a95 w: t5.x t5.x t5.x op: 00000000 8: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: |t5.x| t5.x t5.x op: 05800040 9: xyz: t5 t0 t0 -> t1.z (02040005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: t5.x t5.x t5.x op: 05000000 10: xyz: t1 t2 t0 -> t5.x (00940081) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t2.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 11: xyz: t1 t3 t0 -> t5.y (011400c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 12: xyz: t1 t4 t0 -> t5.z (02140101) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t4.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 13: xyz: t6 t5 t0 -> t1.x (00840146) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t5.xyz t6.xxx op: 00804200 w: t6.x t6.x t6.x op: 00000000 14: xyz: t1 c2 t0 -> t1.x (00840881) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c2.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 15: xyz: t5 t1 t6 -> t0.xyz (03806045) w: t0 t0 t0 -> (00000000) xyz: -t5.xyz t1.xxx t6.xyz op: 000202a0 w: t5.x t5.x t5.x op: 00000000 16: xyz: t6 t5 t0 -> t5.x (00940146) w: t0 t0 t0 -> (00000000) xyz: -t6.xyz t5.xyz t6.xxx op: 40804220 w: t6.x t6.x t6.x op: 00000000 17: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t5.xyz op: 00080a95 w: t5.x t5.x t5.x op: 00000000 18: xyz: t5 t0 t0 -> (00000005) w: t0 t0 t0 -> t2.w (00880000) xyz: t5.xxx t5.xxx t5.xxx op: 00004081 w: t5.x t5.x t5.x op: 04800000 19: xyz: c1 t0 t0 -> (00000021) w: t2 t0 t0 -> t2.w (00880002) xyz: c1.xxx c1.xxx c1.xxx op: 00004081 w: t2.w c1.x 0.0 op: 00040009 20: xyz: t0 t0 t0 -> (00000000) w: t2 t0 t0 -> t2.w (00880002) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: t2.w t0.x t0.x op: 04000009 21: xyz: c1 t0 t0 -> (00000021) w: t2 t0 t0 -> t2.w (00880002) xyz: c1.xxx c1.xxx c1.xxx op: 00004081 w: t2.w 1.0 c1.z op: 00008889 NODE 1: alu_offset: 22, tex_offset: 1, alu_end: 0, tex_end: 1 (code_addr: 00421016) TEX: TEX t0, t0, texture[1] (00008800) TEX t1, t7, texture[2] (00009047) 22: xyz: t0 c1 t1 -> o0.xyz (1c001840) w: t2 t0 t0 -> o0.w (01000002) xyz: t0.xyz c1.yyy 0.0 op: 00050300 w: t1.x t2.w 0.0 op: 00040486 r300: Initial fragment program FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL IN[1], GENERIC[2], PERSPECTIVE DCL IN[2], GENERIC[3], PERSPECTIVE DCL IN[3], GENERIC[4], PERSPECTIVE DCL IN[4], GENERIC[5], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL CONST[1] DCL TEMP[0..4] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: TEX TEMP[0], IN[0], SAMP[0], 2D 1: MOV TEMP[0].x, TEMP[0].wwww 2: MAD TEMP[1], TEMP[0], IMM[0].xxxx, -IMM[0].yyyy 3: MOV TEMP[1].z, IMM[0].zzzz 4: DP3 TEMP[0].x, TEMP[1], TEMP[1] 5: ADD TEMP[0].x, IMM[0].yyyy, -TEMP[0].xxxx 6: RSQ TEMP[0].x, TEMP[0].xxxx 7: RCP TEMP[1].z, TEMP[0].xxxx 8: DP3 TEMP[0].x, TEMP[1], IN[2] 9: DP3 TEMP[0].y, TEMP[1], IN[3] 10: DP3 TEMP[0].z, TEMP[1], IN[4] 11: DP3 TEMP[2].w, IN[1], IN[1] 12: RSQ TEMP[2].w, TEMP[2].wwww 13: MUL TEMP[2], IN[1], TEMP[2].wwww 14: DP3 TEMP[1], TEMP[2], TEMP[0] 15: MUL TEMP[1], TEMP[1], IMM[0].xxxx 16: MAD TEMP[3], -TEMP[0], TEMP[1].xxxx, TEMP[2] 17: DP3_SAT TEMP[0], -TEMP[2], TEMP[0] 18: SUB TEMP[0], IMM[0].yyyy, TEMP[0] 19: POW TEMP[4], TEMP[0].xxxx, CONST[1].xxxx 20: TEX TEMP[3], TEMP[3], SAMP[1], CUBE 21: TEX TEMP[1], IN[0], SAMP[2], 2D 22: MUL OUT[0].xyz, TEMP[3], CONST[1].yyyy 23: ADD TEMP[4], TEMP[4], CONST[1].zzzz 24: MUL OUT[0].w, TEMP[1].xxxx, TEMP[4] 25: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, temp[0].xxxx; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, temp[2].wwww; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: SUB temp[0], const[2].yyyy, temp[0]; 19: POW temp[4], temp[0].xxxx, const[1].xxxx; 20: TEX temp[3], temp[3], CUBE[1]; 21: TEX temp[1], input[0], 2D[2]; 22: MUL output[0].xyz, temp[3], const[1].yyyy; 23: ADD temp[4], temp[4], const[1].zzzz; 24: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, temp[0].xxxx; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, temp[2].wwww; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: SUB temp[0], const[2].yyyy, temp[0]; 19: POW temp[4], temp[0].xxxx, const[1].xxxx; 20: TEX temp[3], temp[3], CUBE[1]; 21: TEX temp[1], input[0], 2D[2]; 22: MUL output[0].xyz, temp[3], const[1].yyyy; 23: ADD temp[4], temp[4], const[1].zzzz; 24: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, temp[0].xxxx; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, temp[2].wwww; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: SUB temp[0], const[2].yyyy, temp[0]; 19: POW temp[4], temp[0].xxxx, const[1].xxxx; 20: TEX temp[3], temp[3], CUBE[1]; 21: TEX temp[1], input[0], 2D[2]; 22: MUL output[0].xyz, temp[3], const[1].yyyy; 23: ADD temp[4], temp[4], const[1].zzzz; 24: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, |temp[0].xxxx|; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, |temp[2].wwww|; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: ADD temp[0], const[2].yyyy, -temp[0]; 19: LG2 temp[5].w, temp[0].xxxx; 20: MUL temp[5].w, temp[5].wwww, const[1].xxxx; 21: EX2 temp[4], temp[5].wwww; 22: TEX temp[3], temp[3], CUBE[1]; 23: TEX temp[1], input[0], 2D[2]; 24: MUL output[0].xyz, temp[3], const[1].yyyy; 25: ADD temp[4], temp[4], const[1].zzzz; 26: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[0], 2D[0]; 1: MOV temp[0].x, temp[0].wwww; 2: MAD temp[1], temp[0], const[2].xxxx, -const[2].yyyy; 3: MOV temp[1].z, const[2].zzzz; 4: DP3 temp[0].x, temp[1], temp[1]; 5: ADD temp[0].x, const[2].yyyy, -temp[0].xxxx; 6: RSQ temp[0].x, |temp[0].xxxx|; 7: RCP temp[1].z, temp[0].xxxx; 8: DP3 temp[0].x, temp[1], input[2]; 9: DP3 temp[0].y, temp[1], input[3]; 10: DP3 temp[0].z, temp[1], input[4]; 11: DP3 temp[2].w, input[1], input[1]; 12: RSQ temp[2].w, |temp[2].wwww|; 13: MUL temp[2], input[1], temp[2].wwww; 14: DP3 temp[1], temp[2], temp[0]; 15: MUL temp[1], temp[1], const[2].xxxx; 16: MAD temp[3], -temp[0], temp[1].xxxx, temp[2]; 17: DP3_SAT temp[0], -temp[2], temp[0]; 18: ADD temp[0], const[2].yyyy, -temp[0]; 19: LG2 temp[5].w, temp[0].xxxx; 20: MUL temp[5].w, temp[5].wwww, const[1].xxxx; 21: EX2 temp[4], temp[5].wwww; 22: TEX temp[3], temp[3], CUBE[1]; 23: TEX temp[1], input[0], 2D[2]; 24: MUL output[0].xyz, temp[3], const[1].yyyy; 25: ADD temp[4], temp[4], const[1].zzzz; 26: MUL output[0].w, temp[1].xxxx, temp[4]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[1].xy, temp[0].xy__, const[2].xx__, -const[2].yy__; 3: MOV temp[1].z, const[2].__z_; 4: DP3 temp[0].x, temp[1].xyz_, temp[1].xyz_; 5: ADD temp[0].x, const[2].y___, -temp[0].x___; 6: RSQ temp[0].x, |temp[0].x___|; 7: RCP temp[1].z, temp[0].x___; 8: DP3 temp[0].x, temp[1].xyz_, input[2].xyz_; 9: DP3 temp[0].y, temp[1].xyz_, input[3].xyz_; 10: DP3 temp[0].z, temp[1].xyz_, input[4].xyz_; 11: DP3 temp[2].w, input[1].xyz_, input[1].xyz_; 12: RSQ temp[2].w, |temp[2].w___|; 13: MUL temp[2].xyz, input[1].xyz_, temp[2].www_; 14: DP3 temp[1].x, temp[2].xyz_, temp[0].xyz_; 15: MUL temp[1].x, temp[1].x___, const[2].x___; 16: MAD temp[3].xyz, -temp[0].xyz_, temp[1].xxx_, temp[2].xyz_; 17: DP3_SAT temp[0].x, -temp[2].xyz_, temp[0].xyz_; 18: ADD temp[0].x, const[2].y___, -temp[0].x___; 19: LG2 temp[5].w, temp[0].x___; 20: MUL temp[5].w, temp[5].___w, const[1].___x; 21: EX2 temp[4].w, temp[5].w___; 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: TEX temp[1].x, input[0].xy__, 2D[2]; 24: MUL output[0].xyz, temp[3].xyz_, const[1].yyy_; 25: ADD temp[4].w, temp[4].___w, const[1].___z; 26: MUL output[0].w, temp[1].___x, temp[4].___w; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[1].xy, temp[0].xy__, const[2].xx__, -none.11__; 3: MOV temp[1].z, none.__0_; 4: DP3 temp[0].x, temp[1].xyz_, temp[1].xyz_; 5: ADD temp[0].x, none.1___, -temp[0].x___; 6: RSQ temp[0].x, |temp[0].x___|; 7: RCP temp[1].z, temp[0].x___; 8: DP3 temp[0].x, temp[1].xyz_, input[2].xyz_; 9: DP3 temp[0].y, temp[1].xyz_, input[3].xyz_; 10: DP3 temp[0].z, temp[1].xyz_, input[4].xyz_; 11: DP3 temp[2].w, input[1].xyz_, input[1].xyz_; 12: RSQ temp[2].w, |temp[2].w___|; 13: MUL temp[2].xyz, input[1].xyz_, temp[2].www_; 14: DP3 temp[1].x, temp[2].xyz_, temp[0].xyz_; 15: MUL temp[1].x, temp[1].x___, const[2].x___; 16: MAD temp[3].xyz, -temp[0].xyz_, temp[1].xxx_, temp[2].xyz_; 17: DP3_SAT temp[0].x, -temp[2].xyz_, temp[0].xyz_; 18: ADD temp[0].x, none.1___, -temp[0].x___; 19: LG2 temp[5].w, temp[0].x___; 20: MUL temp[5].w, temp[5].___w, const[1].___x; 21: EX2 temp[4].w, temp[5].w___; 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: TEX temp[1].x, input[0].xy__, 2D[2]; 24: MUL output[0].xyz, temp[3].xyz_, const[1].yyy_; 25: ADD temp[4].w, temp[4].___w, const[1].___z; 26: MUL output[0].w, temp[1].___x, temp[4].___w; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: MOV temp[0].x, temp[0].w___; 2: MAD temp[1].xy, temp[0].xy__, const[2].xx__, -none.11__; 3: MOV temp[1].z, none.__0_; 4: DP3 temp[0].x, temp[1].xyz_, temp[1].xyz_; 5: ADD temp[0].x, none.1___, -temp[0].x___; 6: RSQ temp[0].x, |temp[0].x___|; 7: RCP temp[1].z, temp[0].x___; 8: DP3 temp[0].x, temp[1].xyz_, input[2].xyz_; 9: DP3 temp[0].y, temp[1].xyz_, input[3].xyz_; 10: DP3 temp[0].z, temp[1].xyz_, input[4].xyz_; 11: DP3 temp[2].w, input[1].xyz_, input[1].xyz_; 12: RSQ temp[2].w, |temp[2].w___|; 13: MUL temp[2].xyz, input[1].xyz_, temp[2].www_; 14: DP3 temp[1].x, temp[2].xyz_, temp[0].xyz_; 15: MUL temp[1].x, temp[1].x___, const[2].x___; 16: MAD temp[3].xyz, -temp[0].xyz_, temp[1].xxx_, temp[2].xyz_; 17: DP3_SAT temp[0].x, -temp[2].xyz_, temp[0].xyz_; 18: ADD temp[0].x, none.1___, -temp[0].x___; 19: LG2 temp[5].w, temp[0].x___; 20: MUL temp[5].w, temp[5].___w, const[1].___x; 21: EX2 temp[4].w, temp[5].w___; 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: TEX temp[1].x, input[0].xy__, 2D[2]; 24: MUL output[0].xyz, temp[3].xyz_, const[1].yyy_; 25: ADD temp[4].w, temp[4].___w, const[1].___z; 26: MUL output[0].w, temp[1].___x, temp[4].___w; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0].yw, input[0].xy__, 2D[0]; 1: src0.w = temp[0] MAD temp[0].x, src0.w__, src0.111, src0.000 2: src0.xyz = temp[0], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src1.xx_, -src0.11_ 3: MAD temp[1].z, src0.__0, src0.111, src0.000 4: src0.xyz = temp[1] DP3 temp[0].x, src0.xyz, src0.xyz 5: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 6: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 7: src0.xyz = temp[0] REPL_ALPHA temp[1].z RCP, src0.x 8: src0.xyz = temp[1], src1.xyz = input[2] DP3 temp[0].x, src0.xyz, src1.xyz 9: src0.xyz = temp[1], src1.xyz = input[3] DP3 temp[0].y, src0.xyz, src1.xyz 10: src0.xyz = temp[1], src1.xyz = input[4] DP3 temp[0].z, src0.xyz, src1.xyz 11: src0.xyz = input[1] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0._, src0._ 12: src0.w = temp[2] RSQ temp[2].w, |src0.w| 13: src0.xyz = input[1], src0.w = temp[2] MAD temp[2].xyz, src0.xyz, src0.www, src0.000 14: src0.xyz = temp[2], src1.xyz = temp[0] DP3 temp[1].x, src0.xyz, src1.xyz 15: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].x, src0.x__, src1.x__, src0.000 16: src0.xyz = temp[0], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[3].xyz, -src0.xyz, src1.xxx, src2.xyz 17: src0.xyz = temp[2], src1.xyz = temp[0] DP3_SAT temp[0].x, -src0.xyz, src1.xyz 18: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 19: src0.xyz = temp[0] LG2 temp[5].w, src0.x 20: src0.xyz = const[1], src0.w = temp[5] MAD temp[5].w, src0.w, src0.x, src0.0 21: src0.w = temp[5] EX2 temp[4].w, src0.w 22: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 23: TEX temp[1].x, input[0].xy__, 2D[2]; 24: src0.xyz = temp[3], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src1.yyy, src0.000 25: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.1, src0.z 26: src0.xyz = temp[1], src0.w = temp[4] MAD color[0].w, src0.x, src0.w, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[0].yw, input[0].xy__, 2D[0]; 2: src0.xyz = input[1] DP3, src0.xyz, src0.xyz DP3 temp[2].w, src0._, src0._ 3: src0.w = temp[0], src1.w = temp[2] MAD temp[0].x, src0.w__, src0.111, src0.000 RSQ temp[2].w, |src1.w| 4: src0.xyz = input[1], src0.w = temp[2] MAD temp[2].xyz, src0.xyz, src0.www, src0.000 5: src0.xyz = temp[0], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src1.xx_, -src0.11_ 6: MAD temp[1].z, src0.__0, src0.111, src0.000 7: src0.xyz = temp[1] DP3 temp[0].x, src0.xyz, src0.xyz 8: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 9: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 10: src0.xyz = temp[0] REPL_ALPHA temp[1].z RCP, src0.x 11: src0.xyz = temp[1], src1.xyz = input[2] DP3 temp[0].x, src0.xyz, src1.xyz 12: src0.xyz = temp[1], src1.xyz = input[3] DP3 temp[0].y, src0.xyz, src1.xyz 13: src0.xyz = temp[1], src1.xyz = input[4] DP3 temp[0].z, src0.xyz, src1.xyz 14: src0.xyz = temp[2], src1.xyz = temp[0] DP3 temp[1].x, src0.xyz, src1.xyz 15: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].x, src0.x__, src1.x__, src0.000 16: src0.xyz = temp[0], src1.xyz = temp[1], src2.xyz = temp[2] MAD temp[3].xyz, -src0.xyz, src1.xxx, src2.xyz 17: src0.xyz = temp[2], src1.xyz = temp[0] DP3_SAT temp[0].x, -src0.xyz, src1.xyz 18: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 19: src0.xyz = temp[0] LG2 temp[5].w, src0.x 20: src0.xyz = const[1], src0.w = temp[5] MAD temp[5].w, src0.w, src0.x, src0.0 21: src0.w = temp[5] EX2 temp[4].w, src0.w 22: src0.xyz = const[1], src0.w = temp[4] MAD temp[4].w, src0.w, src0.1, src0.z 23: BEGIN_TEX; 24: TEX temp[3].xyz, temp[3].xyz_, CUBE[1]; 25: TEX temp[1].x, input[0].xy__, 2D[2]; 26: src0.xyz = temp[3], src0.w = temp[4], src1.xyz = const[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.yyy, src0.000 MAD color[0].w, src2.x, src0.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5].yw, temp[0].xy__, 2D[0]; 2: src0.xyz = temp[1] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 3: src0.w = temp[5], src1.w = temp[6] MAD temp[5].x, src0.w__, src0.111, src0.000 RSQ temp[6].w, |src1.w| 4: src0.xyz = temp[1], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 5: src0.xyz = temp[5], src1.xyz = const[2] MAD temp[1].xy, src0.xy_, src1.xx_, -src0.11_ 6: MAD temp[1].z, src0.__0, src0.111, src0.000 7: src0.xyz = temp[1] DP3 temp[5].x, src0.xyz, src0.xyz 8: src0.xyz = temp[5] MAD temp[5].x, src0.1__, src0.111, -src0.x__ 9: src0.xyz = temp[5] REPL_ALPHA temp[5].x RSQ, |src0.x| 10: src0.xyz = temp[5] REPL_ALPHA temp[1].z RCP, src0.x 11: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[5].x, src0.xyz, src1.xyz 12: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[5].y, src0.xyz, src1.xyz 13: src0.xyz = temp[1], src1.xyz = temp[4] DP3 temp[5].z, src0.xyz, src1.xyz 14: src0.xyz = temp[6], src1.xyz = temp[5] DP3 temp[1].x, src0.xyz, src1.xyz 15: src0.xyz = temp[1], src1.xyz = const[2] MAD temp[1].x, src0.x__, src1.x__, src0.000 16: src0.xyz = temp[5], src1.xyz = temp[1], src2.xyz = temp[6] MAD temp[2].xyz, -src0.xyz, src1.xxx, src2.xyz 17: src0.xyz = temp[6], src1.xyz = temp[5] DP3_SAT temp[5].x, -src0.xyz, src1.xyz 18: src0.xyz = temp[5] MAD temp[5].x, src0.1__, src0.111, -src0.x__ 19: src0.xyz = temp[5] LG2 temp[3].w, src0.x 20: src0.xyz = const[1], src0.w = temp[3] MAD temp[3].w, src0.w, src0.x, src0.0 21: src0.w = temp[3] EX2 temp[3].w, src0.w 22: src0.xyz = const[1], src0.w = temp[3] MAD temp[3].w, src0.w, src0.1, src0.z 23: BEGIN_TEX; 24: TEX temp[2].xyz, temp[2].xyz_, CUBE[1]; 25: TEX temp[1].x, temp[0].xy__, 2D[2]; 26: src0.xyz = temp[2], src0.w = temp[3], src1.xyz = const[1], src2.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.yyy, src0.000 MAD color[0].w, src2.x, src0.w, src0.0 pc=43************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 20, tex_end: 0 (code_addr: 00000500) TEX: TEX t5, t0, texture[0] (00008140) 0: xyz: t1 t0 t0 -> (00000001) w: t0 t0 t0 -> t6.w (00980000) xyz: t1.xyz t1.xyz t1.xxx op: 00804000 w: 1.0 1.0 t1.x op: 00800891 1: xyz: t0 t0 t0 -> t5.x (00940000) w: t5 t6 t0 -> t6.w (00980185) xyz: t5.www 1.0 0.0 op: 00050a8c w: |t6.w| t0.x t0.x op: 0580004a 2: xyz: t1 t0 t0 -> t6.xyz (03980001) w: t6 t0 t0 -> (00000006) xyz: t1.xyz t6.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 3: xyz: t5 c2 t0 -> t1.xy (01840885) w: t0 t0 t0 -> (00000000) xyz: t5.xyz c2.xxx -1.0 op: 000d4280 w: t5.x t5.x t5.x op: 00000000 4: xyz: t0 t0 t0 -> t1.z (02040000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 5: xyz: t1 t0 t0 -> t5.x (00940001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.xyz t1.xxx op: 00804000 w: t1.x t1.x t1.x op: 00000000 6: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t5.xyz op: 00080a95 w: t5.x t5.x t5.x op: 00000000 7: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: |t5.x| t5.x t5.x op: 05800040 8: xyz: t5 t0 t0 -> t1.z (02040005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: t5.x t5.x t5.x op: 05000000 9: xyz: t1 t2 t0 -> t5.x (00940081) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t2.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 10: xyz: t1 t3 t0 -> t5.y (011400c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 11: xyz: t1 t4 t0 -> t5.z (02140101) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t4.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 12: xyz: t6 t5 t0 -> t1.x (00840146) w: t0 t0 t0 -> (00000000) xyz: t6.xyz t5.xyz t6.xxx op: 00804200 w: t6.x t6.x t6.x op: 00000000 13: xyz: t1 c2 t0 -> t1.x (00840881) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c2.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 14: xyz: t5 t1 t6 -> t2.xyz (03886045) w: t0 t0 t0 -> (00000000) xyz: -t5.xyz t1.xxx t6.xyz op: 000202a0 w: t5.x t5.x t5.x op: 00000000 15: xyz: t6 t5 t0 -> t5.x (00940146) w: t0 t0 t0 -> (00000000) xyz: -t6.xyz t5.xyz t6.xxx op: 40804220 w: t6.x t6.x t6.x op: 00000000 16: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t5.xyz op: 00080a95 w: t5.x t5.x t5.x op: 00000000 17: xyz: t5 t0 t0 -> (00000005) w: t0 t0 t0 -> t3.w (008c0000) xyz: t5.xxx t5.xxx t5.xxx op: 00004081 w: t5.x t5.x t5.x op: 04800000 18: xyz: c1 t0 t0 -> (00000021) w: t3 t0 t0 -> t3.w (008c0003) xyz: c1.xxx c1.xxx c1.xxx op: 00004081 w: t3.w c1.x 0.0 op: 00040009 19: xyz: t0 t0 t0 -> (00000000) w: t3 t0 t0 -> t3.w (008c0003) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: t3.w t0.x t0.x op: 04000009 20: xyz: c1 t0 t0 -> (00000021) w: t3 t0 t0 -> t3.w (008c0003) xyz: c1.xxx c1.xxx c1.xxx op: 00004081 w: t3.w 1.0 c1.z op: 00008889 NODE 1: alu_offset: 21, tex_offset: 1, alu_end: 0, tex_end: 1 (code_addr: 00421015) TEX: TEX t2, t2, texture[1] (00008882) TEX t1, t0, texture[2] (00009040) 21: xyz: t2 c1 t1 -> o0.xyz (1c001842) w: t3 t0 t0 -> o0.w (01000003) xyz: t2.xyz c1.yyy 0.0 op: 00050300 w: t1.x t3.w 0.0 op: 00040486 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR DCL IN[2], GENERIC[0], PERSPECTIVE DCL IN[3], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL CONST[2] DCL TEMP[0..1] IMM FLT32 { 8.0000, 4.0000, 2.0000, 0.0000} IMM FLT32 { 0.5000, 0.2500, 0.1250, 0.0625} IMM FLT32 { 1.0000, 0.0000, 0.0000, 0.0000} 0: MUL TEMP[0].xyz, IN[3], IMM[0].xxxx 1: TEX TEMP[0].x, TEMP[0], SAMP[0], 3D 2: MOV TEMP[0].w, TEMP[0].xxxx 3: MUL TEMP[1].xyz, IN[3], IMM[0].yyyy 4: TEX TEMP[1].x, TEMP[1], SAMP[0], 3D 5: MOV TEMP[0].z, TEMP[1].xxxx 6: MUL TEMP[1].xyz, IN[3], IMM[0].zzzz 7: TEX TEMP[1].x, TEMP[1], SAMP[0], 3D 8: MOV TEMP[0].y, TEMP[1].xxxx 9: TEX TEMP[0].x, IN[3], SAMP[0], 3D 10: DP4 TEMP[0].z, TEMP[0], IMM[1] 11: MAD TEMP[0].xy, TEMP[0].zzzz, CONST[2], IN[2] 12: TEX TEMP[0].x, TEMP[0], SAMP[2], 2D 13: MUL TEMP[0].x, TEMP[0], IMM[0].zzzz 14: ADD TEMP[0].y, TEMP[0].xxxx, -IMM[2].xxxx 15: MOV TEMP[0].w, IMM[0] 16: TEX TEMP[0].x, TEMP[0].zwzw, SAMP[1], 2D 17: ADD TEMP[0].x, TEMP[0], TEMP[0].yyyy 18: MOV TEMP[0].y, IMM[0].wwww 19: ADD TEMP[0].x, TEMP[0], -IN[0] 20: TEX TEMP[0], TEMP[0], SAMP[3], 2D 21: MAD TEMP[1].x, -IN[1], IN[1], IMM[2].xyyx 22: MUL TEMP[0], TEMP[0], IN[0].wwww 23: MUL OUT[0], TEMP[0], TEMP[1].xxxx 24: END Fragment Program: before compilation # Radeon Compiler Program 0: MUL temp[0].xyz, input[3], const[3].xxxx; 1: TEX temp[0].x, temp[0], 3D[0]; 2: MOV temp[0].w, temp[0].xxxx; 3: MUL temp[1].xyz, input[3], const[3].yyyy; 4: TEX temp[1].x, temp[1], 3D[0]; 5: MOV temp[0].z, temp[1].xxxx; 6: MUL temp[1].xyz, input[3], const[3].zzzz; 7: TEX temp[1].x, temp[1], 3D[0]; 8: MOV temp[0].y, temp[1].xxxx; 9: TEX temp[0].x, input[3], 3D[0]; 10: DP4 temp[0].z, temp[0], const[4]; 11: MAD temp[0].xy, temp[0].zzzz, const[2], input[2]; 12: TEX temp[0].x, temp[0], 2D[2]; 13: MUL temp[0].x, temp[0], const[3].zzzz; 14: ADD temp[0].y, temp[0].xxxx, -temp[0].1111; 15: MOV temp[0].w, const[3]; 16: TEX temp[0].x, temp[0].zwzw, 2D[1]; 17: ADD temp[0].x, temp[0], temp[0].yyyy; 18: MOV temp[0].y, const[3].wwww; 19: ADD temp[0].x, temp[0], -input[0]; 20: TEX temp[0], temp[0], 2D[3]; 21: MAD temp[1].x, -input[1], input[1], temp[0].1001; 22: MUL temp[0], temp[0], input[0].wwww; 23: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after emulate loops # Radeon Compiler Program 0: MUL temp[0].xyz, input[3], const[3].xxxx; 1: TEX temp[0].x, temp[0], 3D[0]; 2: MOV temp[0].w, temp[0].xxxx; 3: MUL temp[1].xyz, input[3], const[3].yyyy; 4: TEX temp[1].x, temp[1], 3D[0]; 5: MOV temp[0].z, temp[1].xxxx; 6: MUL temp[1].xyz, input[3], const[3].zzzz; 7: TEX temp[1].x, temp[1], 3D[0]; 8: MOV temp[0].y, temp[1].xxxx; 9: TEX temp[0].x, input[3], 3D[0]; 10: DP4 temp[0].z, temp[0], const[4]; 11: MAD temp[0].xy, temp[0].zzzz, const[2], input[2]; 12: TEX temp[0].x, temp[0], 2D[2]; 13: MUL temp[0].x, temp[0], const[3].zzzz; 14: ADD temp[0].y, temp[0].xxxx, -temp[0].1111; 15: MOV temp[0].w, const[3]; 16: TEX temp[0].x, temp[0].zwzw, 2D[1]; 17: ADD temp[0].x, temp[0], temp[0].yyyy; 18: MOV temp[0].y, const[3].wwww; 19: ADD temp[0].x, temp[0], -input[0]; 20: TEX temp[0], temp[0], 2D[3]; 21: MAD temp[1].x, -input[1], input[1], temp[0].1001; 22: MUL temp[0], temp[0], input[0].wwww; 23: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after emulate branches # Radeon Compiler Program 0: MUL temp[0].xyz, input[3], const[3].xxxx; 1: TEX temp[0].x, temp[0], 3D[0]; 2: MOV temp[0].w, temp[0].xxxx; 3: MUL temp[1].xyz, input[3], const[3].yyyy; 4: TEX temp[1].x, temp[1], 3D[0]; 5: MOV temp[0].z, temp[1].xxxx; 6: MUL temp[1].xyz, input[3], const[3].zzzz; 7: TEX temp[1].x, temp[1], 3D[0]; 8: MOV temp[0].y, temp[1].xxxx; 9: TEX temp[0].x, input[3], 3D[0]; 10: DP4 temp[0].z, temp[0], const[4]; 11: MAD temp[0].xy, temp[0].zzzz, const[2], input[2]; 12: TEX temp[0].x, temp[0], 2D[2]; 13: MUL temp[0].x, temp[0], const[3].zzzz; 14: ADD temp[0].y, temp[0].xxxx, -temp[0].1111; 15: MOV temp[0].w, const[3]; 16: TEX temp[0].x, temp[0].zwzw, 2D[1]; 17: ADD temp[0].x, temp[0], temp[0].yyyy; 18: MOV temp[0].y, const[3].wwww; 19: ADD temp[0].x, temp[0], -input[0]; 20: TEX temp[0], temp[0], 2D[3]; 21: MAD temp[1].x, -input[1], input[1], temp[0].1001; 22: MUL temp[0], temp[0], input[0].wwww; 23: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MUL temp[0].xyz, input[3], const[3].xxxx; 1: TEX temp[0].x, temp[0], 3D[0]; 2: MOV temp[0].w, temp[0].xxxx; 3: MUL temp[1].xyz, input[3], const[3].yyyy; 4: TEX temp[1].x, temp[1], 3D[0]; 5: MOV temp[0].z, temp[1].xxxx; 6: MUL temp[1].xyz, input[3], const[3].zzzz; 7: TEX temp[1].x, temp[1], 3D[0]; 8: MOV temp[0].y, temp[1].xxxx; 9: TEX temp[0].x, input[3], 3D[0]; 10: DP4 temp[0].z, temp[0], const[4]; 11: MAD temp[0].xy, temp[0].zzzz, const[2], input[2]; 12: TEX temp[0].x, temp[0], 2D[2]; 13: MUL temp[0].x, temp[0], const[3].zzzz; 14: ADD temp[0].y, temp[0].xxxx, -temp[0].1111; 15: MOV temp[0].w, const[3]; 16: TEX temp[0].x, temp[0].zwzw, 2D[1]; 17: ADD temp[0].x, temp[0], temp[0].yyyy; 18: MOV temp[0].y, const[3].wwww; 19: ADD temp[0].x, temp[0], -input[0]; 20: TEX temp[0], temp[0], 2D[3]; 21: MAD temp[1].x, -input[1], input[1], temp[0].1001; 22: MUL temp[0], temp[0], input[0].wwww; 23: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MUL temp[0].xyz, input[3], const[3].xxxx; 1: TEX temp[2], temp[0], 3D[0]; 2: MOV temp[0].x, temp[2]; 3: MOV temp[0].w, temp[0].xxxx; 4: MUL temp[1].xyz, input[3], const[3].yyyy; 5: TEX temp[3], temp[1], 3D[0]; 6: MOV temp[1].x, temp[3]; 7: MOV temp[0].z, temp[1].xxxx; 8: MUL temp[1].xyz, input[3], const[3].zzzz; 9: TEX temp[4], temp[1], 3D[0]; 10: MOV temp[1].x, temp[4]; 11: MOV temp[0].y, temp[1].xxxx; 12: TEX temp[5], input[3], 3D[0]; 13: MOV temp[0].x, temp[5]; 14: DP4 temp[0].z, temp[0], const[4]; 15: MAD temp[0].xy, temp[0].zzzz, const[2], input[2]; 16: TEX temp[6], temp[0], 2D[2]; 17: MOV temp[0].x, temp[6]; 18: MUL temp[0].x, temp[0], const[3].zzzz; 19: ADD temp[0].y, temp[0].xxxx, -temp[0].1111; 20: MOV temp[0].w, const[3]; 21: TEX temp[7], temp[0].zwzw, 2D[1]; 22: MOV temp[0].x, temp[7]; 23: ADD temp[0].x, temp[0], temp[0].yyyy; 24: MOV temp[0].y, const[3].wwww; 25: ADD temp[0].x, temp[0], -input[0]; 26: TEX temp[0], temp[0], 2D[3]; 27: MAD temp[1].x, -input[1], input[1], temp[0].1001; 28: MUL temp[0], temp[0], input[0].wwww; 29: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after deadcode # Radeon Compiler Program 0: MUL temp[0].xyz, input[3].xyz_, const[3].xxx_; 1: TEX temp[2].x, temp[0].xyz_, 3D[0]; 2: MOV temp[0].x, temp[2].x___; 3: MOV temp[0].w, temp[0].___x; 4: MUL temp[1].xyz, input[3].xyz_, const[3].yyy_; 5: TEX temp[3].x, temp[1].xyz_, 3D[0]; 6: MOV temp[1].x, temp[3].x___; 7: MOV temp[0].z, temp[1].__x_; 8: MUL temp[1].xyz, input[3].xyz_, const[3].zzz_; 9: TEX temp[4].x, temp[1].xyz_, 3D[0]; 10: MOV temp[1].x, temp[4].x___; 11: MOV temp[0].y, temp[1]._x__; 12: TEX temp[5].x, input[3].xyz_, 3D[0]; 13: MOV temp[0].x, temp[5].x___; 14: DP4 temp[0].z, temp[0], const[4]; 15: MAD temp[0].xy, temp[0].zz__, const[2].xy__, input[2].xy__; 16: TEX temp[6].x, temp[0].xy__, 2D[2]; 17: MOV temp[0].x, temp[6].x___; 18: MUL temp[0].x, temp[0].x___, const[3].z___; 19: ADD temp[0].y, temp[0]._x__, -temp[0]._1__; 20: MOV temp[0].w, const[3].___w; 21: TEX temp[7].x, temp[0].zw__, 2D[1]; 22: MOV temp[0].x, temp[7].x___; 23: ADD temp[0].x, temp[0].x___, temp[0].y___; 24: MOV temp[0].y, const[3]._w__; 25: ADD temp[0].x, temp[0].x___, -input[0].x___; 26: TEX temp[0], temp[0].xy__, 2D[3]; 27: MAD temp[1].x, -input[1].x___, input[1].x___, temp[0].1___; 28: MUL temp[0], temp[0], input[0].wwww; 29: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MUL temp[0].xyz, input[3].xyz_, const[3].xxx_; 1: TEX temp[2].x, temp[0].xyz_, 3D[0]; 2: MOV temp[0].w, temp[2].___x; 3: MUL temp[1].xyz, input[3].xyz_, const[3].yyy_; 4: TEX temp[3].x, temp[1].xyz_, 3D[0]; 5: MOV temp[0].z, temp[3].__x_; 6: MUL temp[1].xyz, input[3].xyz_, const[3].zzz_; 7: TEX temp[4].x, temp[1].xyz_, 3D[0]; 8: MOV temp[0].y, temp[4]._x__; 9: TEX temp[5].x, input[3].xyz_, 3D[0]; 10: MOV temp[0].x, temp[5].x___; 11: DP4 temp[0].z, temp[0], const[4]; 12: MAD temp[0].xy, temp[0].zz__, const[2].xy__, input[2].xy__; 13: TEX temp[6].x, temp[0].xy__, 2D[2]; 14: MUL temp[0].x, temp[6].x___, const[3].z___; 15: ADD temp[0].y, temp[0]._x__, -temp[2]._1__; 16: MOV temp[0].w, none.___0; 17: TEX temp[7].x, temp[0].zw__, 2D[1]; 18: ADD temp[0].x, temp[7].x___, temp[0].y___; 19: MOV temp[0].y, none._0__; 20: ADD temp[0].x, temp[0].x___, -input[0].x___; 21: TEX temp[0], temp[0].xy__, 2D[3]; 22: MAD temp[1].x, -input[1].x___, input[1].x___, temp[2].1___; 23: MUL temp[0], temp[0], input[0].wwww; 24: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MUL temp[0].xyz, input[3].xyz_, const[3].xxx_; 1: TEX temp[2].x, temp[0].xyz_, 3D[0]; 2: MOV temp[0].w, temp[2].___x; 3: MUL temp[1].xyz, input[3].xyz_, const[3].yyy_; 4: TEX temp[3].x, temp[1].xyz_, 3D[0]; 5: MOV temp[0].z, temp[3].__x_; 6: MUL temp[1].xyz, input[3].xyz_, const[3].zzz_; 7: TEX temp[4].x, temp[1].xyz_, 3D[0]; 8: MOV temp[0].y, temp[4]._x__; 9: TEX temp[5].x, input[3].xyz_, 3D[0]; 10: MOV temp[0].x, temp[5].x___; 11: DP4 temp[0].z, temp[0], const[4]; 12: MAD temp[0].xy, temp[0].zz__, const[2].xy__, input[2].xy__; 13: TEX temp[6].x, temp[0].xy__, 2D[2]; 14: MUL temp[0].x, temp[6].x___, const[3].z___; 15: ADD temp[0].y, temp[0]._x__, -temp[2]._1__; 16: MOV temp[0].w, none.___0; 17: MOV temp[8].x, temp[0].z___; 18: MOV temp[8].y, temp[0]._w__; 19: TEX temp[7].x, temp[8].xy__, 2D[1]; 20: ADD temp[0].x, temp[7].x___, temp[0].y___; 21: MOV temp[0].y, none._0__; 22: ADD temp[0].x, temp[0].x___, -input[0].x___; 23: TEX temp[0], temp[0].xy__, 2D[3]; 24: MAD temp[1].x, -input[1].x___, input[1].x___, temp[2].1___; 25: MUL temp[0], temp[0], input[0].wwww; 26: MUL output[0], temp[0], temp[1].xxxx; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[3], src1.xyz = const[3] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 1: TEX temp[2].x, temp[0].xyz_, 3D[0]; 2: src0.xyz = temp[2] MAD temp[0].w, src0.x, src0.1, src0.0 3: src0.xyz = input[3], src1.xyz = const[3] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 4: TEX temp[3].x, temp[1].xyz_, 3D[0]; 5: src0.xyz = temp[3] MAD temp[0].z, src0.__x, src0.111, src0.000 6: src0.xyz = input[3], src1.xyz = const[3] MAD temp[1].xyz, src0.xyz, src1.zzz, src0.000 7: TEX temp[4].x, temp[1].xyz_, 3D[0]; 8: src0.xyz = temp[4] MAD temp[0].y, src0._x_, src0.111, src0.000 9: TEX temp[5].x, input[3].xyz_, 3D[0]; 10: src0.xyz = temp[5] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[4], src1.w = const[4] DP4 temp[0].z, src0.xyz, src1.xyz DP4, src0.w, src1.w 12: src0.xyz = temp[0], src1.xyz = const[2], src2.xyz = input[2] MAD temp[0].xy, src0.zz_, src1.xy_, src2.xy_ 13: TEX temp[6].x, temp[0].xy__, 2D[2]; 14: src0.xyz = temp[6], src1.xyz = const[3] MAD temp[0].x, src0.x__, src1.z__, src0.000 15: src0.xyz = temp[0] MAD temp[0].y, src0._x_, src0.111, -src0._1_ 16: MAD temp[0].w, src0.0, src0.1, src0.0 17: src0.xyz = temp[0] MAD temp[8].x, src0.z__, src0.111, src0.000 18: src0.w = temp[0] MAD temp[8].y, src0._w_, src0.111, src0.000 19: TEX temp[7].x, temp[8].xy__, 2D[1]; 20: src0.xyz = temp[7], src1.xyz = temp[0] MAD temp[0].x, src0.x__, src0.111, src1.y__ 21: MAD temp[0].y, src0._0_, src0.111, src0.000 22: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].x, src0.x__, src0.111, -src1.x__ 23: TEX temp[0], temp[0].xy__, 2D[3]; 24: src0.xyz = input[1] MAD temp[1].x, -src0.x__, src0.x__, src0.1__ 25: src0.xyz = temp[0], src0.w = temp[0], src1.w = input[0] MAD temp[0].xyz, src0.xyz, src1.www, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 26: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.xxx, src0.000 MAD color[0].w, src0.w, src1.x, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[5].x, input[3].xyz_, 3D[0]; 2: src0.xyz = input[3], src1.xyz = const[3] MAD temp[1].xyz, src0.xyz, src1.yyy, src0.000 3: src0.xyz = input[3], src1.xyz = const[3] MAD temp[0].xyz, src0.xyz, src1.xxx, src0.000 4: BEGIN_TEX; 5: TEX temp[2].x, temp[0].xyz_, 3D[0]; 6: TEX temp[3].x, temp[1].xyz_, 3D[0]; 7: src0.xyz = temp[3], src1.xyz = temp[2] MAD temp[0].z, src0.__x, src0.111, src0.000 MAD temp[0].w, src1.x, src0.1, src0.0 8: src0.xyz = input[3], src1.xyz = const[3] MAD temp[1].xyz, src0.xyz, src1.zzz, src0.000 9: src0.xyz = temp[5] MAD temp[0].x, src0.x__, src0.111, src0.000 10: BEGIN_TEX; 11: TEX temp[4].x, temp[1].xyz_, 3D[0]; 12: src0.xyz = temp[4] MAD temp[0].y, src0._x_, src0.111, src0.000 13: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = const[4], src1.w = const[4] DP4 temp[0].z, src0.xyz, src1.xyz DP4, src0.w, src1.w 14: src0.xyz = temp[0], src1.xyz = const[2], src2.xyz = input[2] MAD temp[0].xy, src0.zz_, src1.xy_, src2.xy_ MAD temp[0].w, src0.0, src0.1, src0.0 15: src0.w = temp[0] MAD temp[8].y, src0._w_, src0.111, src0.000 16: src0.xyz = temp[0] MAD temp[8].x, src0.z__, src0.111, src0.000 17: src0.xyz = input[1] MAD temp[1].x, -src0.x__, src0.x__, src0.1__ 18: BEGIN_TEX; 19: TEX temp[7].x, temp[8].xy__, 2D[1]; 20: TEX temp[6].x, temp[0].xy__, 2D[2]; 21: src0.xyz = temp[6], src1.xyz = const[3] MAD temp[0].x, src0.x__, src1.z__, src0.000 22: src0.xyz = temp[0] MAD temp[0].y, src0._x_, src0.111, -src0._1_ 23: src0.xyz = temp[7], src1.xyz = temp[0] MAD temp[0].x, src0.x__, src0.111, src1.y__ 24: src0.xyz = temp[0], src1.xyz = input[0] MAD temp[0].x, src0.x__, src0.111, -src1.x__ 25: MAD temp[0].y, src0._0_, src0.111, src0.000 26: BEGIN_TEX; 27: TEX temp[0], temp[0].xy__, 2D[3]; 28: src0.xyz = temp[0], src0.w = temp[0], src1.w = input[0] MAD temp[0].xyz, src0.xyz, src1.www, src0.000 MAD temp[0].w, src0.w, src1.w, src0.0 29: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = temp[1] MAD color[0].xyz, src0.xyz, src1.xxx, src0.000 MAD color[0].w, src0.w, src1.x, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[8].x, temp[3].xyz_, 3D[0]; 2: src0.xyz = temp[3], src1.xyz = const[3] MAD temp[5].xyz, src0.xyz, src1.yyy, src0.000 3: src0.xyz = temp[3], src1.xyz = const[3] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 4: BEGIN_TEX; 5: TEX temp[6].x, temp[4].xyz_, 3D[0]; 6: TEX temp[7].x, temp[5].xyz_, 3D[0]; 7: src0.xyz = temp[7], src1.xyz = temp[6] MAD temp[4].z, src0.__x, src0.111, src0.000 MAD temp[4].w, src1.x, src0.1, src0.0 8: src0.xyz = temp[3], src1.xyz = const[3] MAD temp[5].xyz, src0.xyz, src1.zzz, src0.000 9: src0.xyz = temp[8] MAD temp[4].x, src0.x__, src0.111, src0.000 10: BEGIN_TEX; 11: TEX temp[3].x, temp[5].xyz_, 3D[0]; 12: src0.xyz = temp[3] MAD temp[4].y, src0._x_, src0.111, src0.000 13: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = const[4], src1.w = const[4] DP4 temp[4].z, src0.xyz, src1.xyz DP4, src0.w, src1.w 14: src0.xyz = temp[4], src1.xyz = const[2], src2.xyz = temp[2] MAD temp[4].xy, src0.zz_, src1.xy_, src2.xy_ MAD temp[4].w, src0.0, src0.1, src0.0 15: src0.w = temp[4] MAD temp[2].y, src0._w_, src0.111, src0.000 16: src0.xyz = temp[4] MAD temp[2].x, src0.z__, src0.111, src0.000 17: src0.xyz = temp[1] MAD temp[5].x, -src0.x__, src0.x__, src0.1__ 18: BEGIN_TEX; 19: TEX temp[2].x, temp[2].xy__, 2D[1]; 20: TEX temp[1].x, temp[4].xy__, 2D[2]; 21: src0.xyz = temp[1], src1.xyz = const[3] MAD temp[4].x, src0.x__, src1.z__, src0.000 22: src0.xyz = temp[4] MAD temp[4].y, src0._x_, src0.111, -src0._1_ 23: src0.xyz = temp[2], src1.xyz = temp[4] MAD temp[4].x, src0.x__, src0.111, src1.y__ 24: src0.xyz = temp[4], src1.xyz = temp[0] MAD temp[4].x, src0.x__, src0.111, -src1.x__ 25: MAD temp[4].y, src0._0_, src0.111, src0.000 26: BEGIN_TEX; 27: TEX temp[4], temp[4].xy__, 2D[3]; 28: src0.xyz = temp[4], src0.w = temp[4], src1.w = temp[0] MAD temp[4].xyz, src0.xyz, src1.www, src0.000 MAD temp[4].w, src0.w, src1.w, src0.0 29: src0.xyz = temp[4], src0.w = temp[4], src1.xyz = temp[5] MAD color[0].xyz, src0.xyz, src1.xxx, src0.000 MAD color[0].w, src0.w, src1.x, src0.0 r300compiler error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections pc=44************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00000000) TEX: TEX t8, t3, texture[0] (00008203) 0: xyz: t3 c3 t0 -> t5.xyz (039408c3) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c3.yyy 0.0 op: 00050300 w: t3.x t3.x t3.x op: 00000000 r300 FP: Compiler Error: r300_fragprog_emit.c::begin_tex(): Too many texture indirections Using a dummy shader instead. If there's an 'unknown opcode' message, please file a bug report and attach this log. r300: Initial fragment program FRAG DCL OUT[0], COLOR IMM FLT32 { 0.0000, 1.0000, 0.0000, 0.0000} 0: MOV OUT[0], IMM[0].xxxy 1: END Fragment Program: before compilation # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate loops # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after emulate branches # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after deadcode # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV output[0], temp[0].0001; Fragment Program: after pair translate # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: MAD color[0].xyz, src0.000, src0.111, src0.000 MAD color[0].w, src0.1, src0.1, src0.0 pc=45************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) 0: xyz: t0 t0 t0 -> o0.xyz (1c000000) w: t0 t0 t0 -> o0.w (01000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: 1.0 1.0 0.0 op: 00040891 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL TEMP[0..1] 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: TEX TEMP[1], IN[1], SAMP[0], 2D 2: MUL TEMP[1], TEMP[1], TEMP[0] 3: MUL OUT[0], TEMP[1], IN[0] 4: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = input[0], src1.w = input[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[1], input[1].xy__, 2D[0]; 2: TEX temp[0], input[2].xy__, 2D[1]; 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[1].xy__, 2D[0]; 2: TEX temp[1], temp[2].xy__, 2D[1]; 3: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[1], src1.w = temp[1] 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[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 pc=46************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 1 (code_addr: 00420040) TEX: TEX t3, t1, texture[0] (000080c1) TEX t1, t2, texture[1] (00008842) 0: xyz: t3 t1 t0 -> t3.xyz (038c0043) w: t3 t1 t0 -> t3.w (008c0043) xyz: t3.xyz t1.xyz 0.0 op: 00050200 w: t3.w t1.w 0.0 op: 00040509 1: xyz: t3 t0 t0 -> o0.xyz (1c000003) w: t3 t0 t0 -> o0.w (01000003) xyz: t3.xyz t0.xyz 0.0 op: 00050200 w: t3.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], GENERIC[2], PERSPECTIVE DCL OUT[0], COLOR DCL CONST[0] DCL TEMP[0] IMM FLT32 { 2.7183, 1.0000, 0.0000, 0.0000} 0: DP3 TEMP[0].x, IN[0], IN[0] 1: RSQ TEMP[0].x, TEMP[0].xxxx 2: RCP TEMP[0].x, TEMP[0].xxxx 3: MUL TEMP[0].x, TEMP[0], CONST[0].wwww 4: MUL TEMP[0].x, TEMP[0], TEMP[0] 5: POW TEMP[0].x, IMM[0].xxxx, -TEMP[0].xxxx 6: MOV OUT[0].xyz, CONST[0] 7: ADD OUT[0].w, -TEMP[0].xxxx, IMM[0].yyyy 8: END Fragment Program: before compilation # Radeon Compiler Program 0: DP3 temp[0].x, input[0], input[0]; 1: RSQ temp[0].x, temp[0].xxxx; 2: RCP temp[0].x, temp[0].xxxx; 3: MUL temp[0].x, temp[0], const[0].wwww; 4: MUL temp[0].x, temp[0], temp[0]; 5: POW temp[0].x, const[1].xxxx, -temp[0].xxxx; 6: MOV output[0].xyz, const[0]; 7: ADD output[0].w, -temp[0].xxxx, const[1].yyyy; Fragment Program: after emulate loops # Radeon Compiler Program 0: DP3 temp[0].x, input[0], input[0]; 1: RSQ temp[0].x, temp[0].xxxx; 2: RCP temp[0].x, temp[0].xxxx; 3: MUL temp[0].x, temp[0], const[0].wwww; 4: MUL temp[0].x, temp[0], temp[0]; 5: POW temp[0].x, const[1].xxxx, -temp[0].xxxx; 6: MOV output[0].xyz, const[0]; 7: ADD output[0].w, -temp[0].xxxx, const[1].yyyy; Fragment Program: after emulate branches # Radeon Compiler Program 0: DP3 temp[0].x, input[0], input[0]; 1: RSQ temp[0].x, temp[0].xxxx; 2: RCP temp[0].x, temp[0].xxxx; 3: MUL temp[0].x, temp[0], const[0].wwww; 4: MUL temp[0].x, temp[0], temp[0]; 5: POW temp[0].x, const[1].xxxx, -temp[0].xxxx; 6: MOV output[0].xyz, const[0]; 7: ADD output[0].w, -temp[0].xxxx, const[1].yyyy; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: DP3 temp[0].x, input[0], input[0]; 1: RSQ temp[0].x, |temp[0].xxxx|; 2: RCP temp[0].x, temp[0].xxxx; 3: MUL temp[0].x, temp[0], const[0].wwww; 4: MUL temp[0].x, temp[0], temp[0]; 5: LG2 temp[1].w, const[1].xxxx; 6: MUL temp[1].w, temp[1].wwww, -temp[0].xxxx; 7: EX2 temp[0].x, temp[1].wwww; 8: MOV output[0].xyz, const[0]; 9: ADD output[0].w, -temp[0].xxxx, const[1].yyyy; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: DP3 temp[0].x, input[0], input[0]; 1: RSQ temp[0].x, |temp[0].xxxx|; 2: RCP temp[0].x, temp[0].xxxx; 3: MUL temp[0].x, temp[0], const[0].wwww; 4: MUL temp[0].x, temp[0], temp[0]; 5: LG2 temp[1].w, const[1].xxxx; 6: MUL temp[1].w, temp[1].wwww, -temp[0].xxxx; 7: EX2 temp[0].x, temp[1].wwww; 8: MOV output[0].xyz, const[0]; 9: ADD output[0].w, -temp[0].xxxx, const[1].yyyy; Fragment Program: after deadcode # Radeon Compiler Program 0: DP3 temp[0].x, input[0].xyz_, input[0].xyz_; 1: RSQ temp[0].x, |temp[0].x___|; 2: RCP temp[0].x, temp[0].x___; 3: MUL temp[0].x, temp[0].x___, const[0].w___; 4: MUL temp[0].x, temp[0].x___, temp[0].x___; 5: LG2 temp[1].w, const[1].x___; 6: MUL temp[1].w, temp[1].___w, -temp[0].___x; 7: EX2 temp[0].x, temp[1].w___; 8: MOV output[0].xyz, const[0].xyz_; 9: ADD output[0].w, -temp[0].___x, const[1].___y; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: DP3 temp[0].x, input[0].xyz_, input[0].xyz_; 1: RSQ temp[0].x, |temp[0].x___|; 2: RCP temp[0].x, temp[0].x___; 3: MUL temp[0].x, temp[0].x___, const[0].w___; 4: MUL temp[0].x, temp[0].x___, temp[0].x___; 5: LG2 temp[1].w, const[1].x___; 6: MUL temp[1].w, temp[1].___w, -temp[0].___x; 7: EX2 temp[0].x, temp[1].w___; 8: MOV output[0].xyz, const[0].xyz_; 9: ADD output[0].w, -temp[0].___x, none.___1; Fragment Program: after dataflow passes # Radeon Compiler Program 0: DP3 temp[0].x, input[0].xyz_, input[0].xyz_; 1: RSQ temp[0].x, |temp[0].x___|; 2: RCP temp[0].x, temp[0].x___; 3: MUL temp[0].x, temp[0].x___, const[0].w___; 4: MUL temp[0].x, temp[0].x___, temp[0].x___; 5: LG2 temp[1].w, const[1].x___; 6: MUL temp[1].w, temp[1].___w, -temp[0].___x; 7: EX2 temp[0].x, temp[1].w___; 8: MOV output[0].xyz, const[0].xyz_; 9: ADD output[0].w, -temp[0].___x, none.___1; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[0] DP3 temp[0].x, src0.xyz, src0.xyz 1: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 2: src0.xyz = temp[0] REPL_ALPHA temp[0].x RCP, src0.x 3: src0.xyz = temp[0], src0.w = const[0] MAD temp[0].x, src0.x__, src0.w__, src0.000 4: src0.xyz = temp[0] MAD temp[0].x, src0.x__, src0.x__, src0.000 5: src0.xyz = const[1] LG2 temp[1].w, src0.x 6: src0.xyz = temp[0], src0.w = temp[1] MAD temp[1].w, src0.w, -src0.x, src0.0 7: src0.w = temp[1] REPL_ALPHA temp[0].x EX2, src0.w 8: src0.xyz = const[0] MAD color[0].xyz, src0.xyz, src0.111, src0.000 9: src0.xyz = temp[0] MAD color[0].w, -src0.x, src0.1, src0.1 Fragment Program: after pair scheduling # Radeon Compiler Program 0: src0.xyz = const[0], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src0.111, src0.000 LG2 temp[1].w, src1.x 1: src0.xyz = input[0] DP3 temp[0].x, src0.xyz, src0.xyz 2: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 3: src0.xyz = temp[0] REPL_ALPHA temp[0].x RCP, src0.x 4: src0.xyz = temp[0], src0.w = const[0] MAD temp[0].x, src0.x__, src0.w__, src0.000 5: src0.xyz = temp[0] MAD temp[0].x, src0.x__, src0.x__, src0.000 6: src0.xyz = temp[0], src0.w = temp[1] MAD temp[1].w, src0.w, -src0.x, src0.0 7: src0.w = temp[1] REPL_ALPHA temp[0].x EX2, src0.w 8: src0.xyz = temp[0] MAD color[0].w, -src0.x, src0.1, src0.1 Fragment Program: after register allocation # Radeon Compiler Program 0: src0.xyz = const[0], src1.xyz = const[1] MAD color[0].xyz, src0.xyz, src0.111, src0.000 LG2 temp[1].w, src1.x 1: src0.xyz = temp[0] DP3 temp[0].x, src0.xyz, src0.xyz 2: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 3: src0.xyz = temp[0] REPL_ALPHA temp[0].x RCP, src0.x 4: src0.xyz = temp[0], src0.w = const[0] MAD temp[0].x, src0.x__, src0.w__, src0.000 5: src0.xyz = temp[0] MAD temp[0].x, src0.x__, src0.x__, src0.000 6: src0.xyz = temp[0], src0.w = temp[1] MAD temp[1].w, src0.w, -src0.x, src0.0 7: src0.w = temp[1] REPL_ALPHA temp[0].x EX2, src0.w 8: src0.xyz = temp[0] MAD color[0].w, -src0.x, src0.1, src0.1 pc=47************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 8, tex_end: 0 (code_addr: 00400200) 0: xyz: c0 c1 t0 -> o0.xyz (1c000860) w: t0 t0 t0 -> t1.w (00840000) xyz: c0.xyz 1.0 0.0 op: 00050a80 w: c1.x c0.x c0.x op: 04800003 1: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t0.xyz t0.xxx op: 00804000 w: t0.x t0.x t0.x op: 00000000 2: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: |t0.x| t0.x t0.x op: 05800040 3: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: t0.x t0.x t0.x op: 05000000 4: xyz: t0 t0 t0 -> t0.x (00800000) w: c0 t0 t0 -> (00000020) xyz: t0.xyz c0.www 0.0 op: 00050600 w: t0.x t0.x t0.x op: 00000000 5: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t0.xyz 0.0 op: 00050000 w: t0.x t0.x t0.x op: 00000000 6: xyz: t0 t0 t0 -> (00000000) w: t1 t0 t0 -> t1.w (00840001) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: t1.w -t0.x 0.0 op: 00041009 7: xyz: t0 t0 t0 -> t0.x (00800000) w: t1 t0 t0 -> (00000001) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: t1.w t0.x t0.x op: 04000009 8: xyz: t0 t0 t0 -> (00000000) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xxx t0.xxx t0.xxx op: 00004081 w: -t0.x 1.0 1.0 op: 000448a0 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], GENERIC[0], PERSPECTIVE DCL IN[2], GENERIC[1], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL TEMP[0..1] 0: TEX TEMP[0], IN[2], SAMP[1], 2D 1: TEX TEMP[1], IN[1], SAMP[0], 2D 2: MUL TEMP[1], TEMP[1], TEMP[0] 3: MUL OUT[0], TEMP[1], IN[0] 4: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[2], 2D[1]; 1: TEX temp[1], input[1], 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: MUL temp[1], temp[1], temp[0]; 3: MUL output[0], temp[1], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[2].xy__, 2D[1]; 1: TEX temp[1], input[1].xy__, 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = input[0], src1.w = input[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[1], input[1].xy__, 2D[0]; 2: TEX temp[0], input[2].xy__, 2D[1]; 3: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = temp[0], src1.w = temp[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 MAD temp[1].w, src0.w, src1.w, src0.0 4: src0.xyz = temp[1], src0.w = temp[1], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[3], temp[1].xy__, 2D[0]; 2: TEX temp[1], temp[2].xy__, 2D[1]; 3: src0.xyz = temp[3], src0.w = temp[3], src1.xyz = temp[1], src1.w = temp[1] 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[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 pc=48************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 1, tex_end: 1 (code_addr: 00420040) TEX: TEX t3, t1, texture[0] (000080c1) TEX t1, t2, texture[1] (00008842) 0: xyz: t3 t1 t0 -> t3.xyz (038c0043) w: t3 t1 t0 -> t3.w (008c0043) xyz: t3.xyz t1.xyz 0.0 op: 00050200 w: t3.w t1.w 0.0 op: 00040509 1: xyz: t3 t0 t0 -> o0.xyz (1c000003) w: t3 t0 t0 -> o0.w (01000003) xyz: t3.xyz t0.xyz 0.0 op: 00050200 w: t3.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], COLOR, LINEAR DCL IN[1], COLOR[1], LINEAR 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 IN[7], GENERIC[5], PERSPECTIVE DCL IN[8], GENERIC[6], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL SAMP[1] DCL SAMP[3] DCL SAMP[4] DCL SAMP[5] DCL SAMP[6] DCL SAMP[7] DCL SAMP[8] DCL SAMP[9] DCL CONST[0] DCL CONST[5..8] DCL TEMP[0..11] IMM FLT32 { 2.0000, -1.0000, 1.0000, 4.0000} IMM FLT32 { 0.3000, 0.5900, 0.1100, 0.0000} IMM FLT32 { 1.0000, 4.0000, 3.0000, 0.5000} 0: MAD TEMP[0].xy, IN[3], CONST[0], CONST[0].zwzw 1: TEX TEMP[1], IN[6], SAMP[0], 2D 2: TEX TEMP[2], IN[6], SAMP[1], 2D 3: MUL_SAT TEMP[2], TEMP[2], IN[3].wwww 4: DP3 TEMP[3].x, IN[8], IN[8] 5: RSQ TEMP[3].x, TEMP[3].xxxx 6: MUL TEMP[3], TEMP[3].xxxx, IN[8] 7: DP3 TEMP[4].x, IN[2], IN[2] 8: RSQ TEMP[4].x, TEMP[4].xxxx 9: MUL TEMP[4], TEMP[4].xxxx, IN[2] 10: TEX TEMP[5], IN[3], SAMP[3], 2D 11: MOV TEMP[5].x, TEMP[5].wwww 12: MAD TEMP[5], TEMP[5], IMM[0].xxxx, IMM[0].yyyy 13: TEX TEMP[6], TEMP[0], SAMP[4], 2D 14: MOV TEMP[6].x, TEMP[6].wwww 15: MAD TEMP[6].xy, TEMP[6], IMM[0].xxxx, IMM[0].yyyy 16: MAD TEMP[5].xy, TEMP[2].xxxx, TEMP[6], TEMP[5] 17: MOV TEMP[5].z, IMM[1].wwww 18: DP3 TEMP[7].x, TEMP[5], TEMP[5] 19: ADD TEMP[7].x, IMM[2].xxxx, -TEMP[7].xxxx 20: RSQ TEMP[7].x, TEMP[7].xxxx 21: RCP TEMP[5].z, TEMP[7].xxxx 22: DP3_SAT TEMP[4].x, TEMP[4], TEMP[5] 23: TXP TEMP[7], IN[5], SAMP[5], 2D 24: MUL TEMP[4], TEMP[4].xxxx, TEMP[7] 25: TEX TEMP[7].x, IN[4], SAMP[6], 2D 26: MUL TEMP[4], TEMP[4], TEMP[7].xxxx 27: MUL TEMP[1], TEMP[1], IN[0] 28: MUL TEMP[8], TEMP[1], CONST[5] 29: DP3 TEMP[3].x, TEMP[3], TEMP[5] 30: MAD_SAT TEMP[7].x, TEMP[3].xxxx, IMM[2].yyyy, -IMM[2].zzzz 31: MUL TEMP[7].x, TEMP[7].xxxx, TEMP[7].xxxx 32: MUL TEMP[7], TEMP[7].xxxx, CONST[6] 33: TEX TEMP[9], IN[7], SAMP[7], 2D 34: ADD TEMP[9], TEMP[9], TEMP[9] 35: TEX TEMP[10], TEMP[0], SAMP[8], 2D 36: ADD TEMP[10], TEMP[10], -IMM[2].wwww 37: MAD TEMP[9], TEMP[2].xxxx, TEMP[10], TEMP[9] 38: MAD TEMP[8], TEMP[7], TEMP[9], TEMP[8] 39: MUL TEMP[11].xyz, TEMP[4], TEMP[8] 40: MAD TEMP[11].xyz, TEMP[1], CONST[7], TEMP[11] 41: TEX TEMP[7], IN[6], SAMP[9], 2D 42: ADD TEMP[11], TEMP[7], TEMP[11] 43: LRP OUT[0].xyz, IN[1].xxxx, CONST[8], TEMP[11] 44: MUL TEMP[7], TEMP[7], TEMP[9] 45: MUL TEMP[7], TEMP[7], TEMP[4] 46: DP3 OUT[0].w, TEMP[7], IMM[1] 47: END Fragment Program: before compilation # Radeon Compiler Program 0: MAD temp[0].xy, input[3], const[0], const[0].zwzw; 1: TEX temp[1], input[6], 2D[0]; 2: TEX temp[2], input[6], 2D[1]; 3: MUL_SAT temp[2], temp[2], input[3].wwww; 4: DP3 temp[3].x, input[8], input[8]; 5: RSQ temp[3].x, temp[3].xxxx; 6: MUL temp[3], temp[3].xxxx, input[8]; 7: DP3 temp[4].x, input[2], input[2]; 8: RSQ temp[4].x, temp[4].xxxx; 9: MUL temp[4], temp[4].xxxx, input[2]; 10: TEX temp[5], input[3], 2D[3]; 11: MOV temp[5].x, temp[5].wwww; 12: MAD temp[5], temp[5], const[9].xxxx, const[9].yyyy; 13: TEX temp[6], temp[0], 2D[4]; 14: MOV temp[6].x, temp[6].wwww; 15: MAD temp[6].xy, temp[6], const[9].xxxx, const[9].yyyy; 16: MAD temp[5].xy, temp[2].xxxx, temp[6], temp[5]; 17: MOV temp[5].z, const[10].wwww; 18: DP3 temp[7].x, temp[5], temp[5]; 19: ADD temp[7].x, const[11].xxxx, -temp[7].xxxx; 20: RSQ temp[7].x, temp[7].xxxx; 21: RCP temp[5].z, temp[7].xxxx; 22: DP3_SAT temp[4].x, temp[4], temp[5]; 23: TXP temp[7], input[5], 2D[5]; 24: MUL temp[4], temp[4].xxxx, temp[7]; 25: TEX temp[7].x, input[4], 2D[6]; 26: MUL temp[4], temp[4], temp[7].xxxx; 27: MUL temp[1], temp[1], input[0]; 28: MUL temp[8], temp[1], const[5]; 29: DP3 temp[3].x, temp[3], temp[5]; 30: MAD_SAT temp[7].x, temp[3].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[7].x, temp[7].xxxx, temp[7].xxxx; 32: MUL temp[7], temp[7].xxxx, const[6]; 33: TEX temp[9], input[7], 2D[7]; 34: ADD temp[9], temp[9], temp[9]; 35: TEX temp[10], temp[0], 2D[8]; 36: ADD temp[10], temp[10], -const[11].wwww; 37: MAD temp[9], temp[2].xxxx, temp[10], temp[9]; 38: MAD temp[8], temp[7], temp[9], temp[8]; 39: MUL temp[11].xyz, temp[4], temp[8]; 40: MAD temp[11].xyz, temp[1], const[7], temp[11]; 41: TEX temp[7], input[6], 2D[9]; 42: ADD temp[11], temp[7], temp[11]; 43: LRP output[0].xyz, input[1].xxxx, const[8], temp[11]; 44: MUL temp[7], temp[7], temp[9]; 45: MUL temp[7], temp[7], temp[4]; 46: DP3 output[0].w, temp[7], const[10]; Fragment Program: after emulate loops # Radeon Compiler Program 0: MAD temp[0].xy, input[3], const[0], const[0].zwzw; 1: TEX temp[1], input[6], 2D[0]; 2: TEX temp[2], input[6], 2D[1]; 3: MUL_SAT temp[2], temp[2], input[3].wwww; 4: DP3 temp[3].x, input[8], input[8]; 5: RSQ temp[3].x, temp[3].xxxx; 6: MUL temp[3], temp[3].xxxx, input[8]; 7: DP3 temp[4].x, input[2], input[2]; 8: RSQ temp[4].x, temp[4].xxxx; 9: MUL temp[4], temp[4].xxxx, input[2]; 10: TEX temp[5], input[3], 2D[3]; 11: MOV temp[5].x, temp[5].wwww; 12: MAD temp[5], temp[5], const[9].xxxx, const[9].yyyy; 13: TEX temp[6], temp[0], 2D[4]; 14: MOV temp[6].x, temp[6].wwww; 15: MAD temp[6].xy, temp[6], const[9].xxxx, const[9].yyyy; 16: MAD temp[5].xy, temp[2].xxxx, temp[6], temp[5]; 17: MOV temp[5].z, const[10].wwww; 18: DP3 temp[7].x, temp[5], temp[5]; 19: ADD temp[7].x, const[11].xxxx, -temp[7].xxxx; 20: RSQ temp[7].x, temp[7].xxxx; 21: RCP temp[5].z, temp[7].xxxx; 22: DP3_SAT temp[4].x, temp[4], temp[5]; 23: TXP temp[7], input[5], 2D[5]; 24: MUL temp[4], temp[4].xxxx, temp[7]; 25: TEX temp[7].x, input[4], 2D[6]; 26: MUL temp[4], temp[4], temp[7].xxxx; 27: MUL temp[1], temp[1], input[0]; 28: MUL temp[8], temp[1], const[5]; 29: DP3 temp[3].x, temp[3], temp[5]; 30: MAD_SAT temp[7].x, temp[3].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[7].x, temp[7].xxxx, temp[7].xxxx; 32: MUL temp[7], temp[7].xxxx, const[6]; 33: TEX temp[9], input[7], 2D[7]; 34: ADD temp[9], temp[9], temp[9]; 35: TEX temp[10], temp[0], 2D[8]; 36: ADD temp[10], temp[10], -const[11].wwww; 37: MAD temp[9], temp[2].xxxx, temp[10], temp[9]; 38: MAD temp[8], temp[7], temp[9], temp[8]; 39: MUL temp[11].xyz, temp[4], temp[8]; 40: MAD temp[11].xyz, temp[1], const[7], temp[11]; 41: TEX temp[7], input[6], 2D[9]; 42: ADD temp[11], temp[7], temp[11]; 43: LRP output[0].xyz, input[1].xxxx, const[8], temp[11]; 44: MUL temp[7], temp[7], temp[9]; 45: MUL temp[7], temp[7], temp[4]; 46: DP3 output[0].w, temp[7], const[10]; Fragment Program: after emulate branches # Radeon Compiler Program 0: MAD temp[0].xy, input[3], const[0], const[0].zwzw; 1: TEX temp[1], input[6], 2D[0]; 2: TEX temp[2], input[6], 2D[1]; 3: MUL_SAT temp[2], temp[2], input[3].wwww; 4: DP3 temp[3].x, input[8], input[8]; 5: RSQ temp[3].x, temp[3].xxxx; 6: MUL temp[3], temp[3].xxxx, input[8]; 7: DP3 temp[4].x, input[2], input[2]; 8: RSQ temp[4].x, temp[4].xxxx; 9: MUL temp[4], temp[4].xxxx, input[2]; 10: TEX temp[5], input[3], 2D[3]; 11: MOV temp[5].x, temp[5].wwww; 12: MAD temp[5], temp[5], const[9].xxxx, const[9].yyyy; 13: TEX temp[6], temp[0], 2D[4]; 14: MOV temp[6].x, temp[6].wwww; 15: MAD temp[6].xy, temp[6], const[9].xxxx, const[9].yyyy; 16: MAD temp[5].xy, temp[2].xxxx, temp[6], temp[5]; 17: MOV temp[5].z, const[10].wwww; 18: DP3 temp[7].x, temp[5], temp[5]; 19: ADD temp[7].x, const[11].xxxx, -temp[7].xxxx; 20: RSQ temp[7].x, temp[7].xxxx; 21: RCP temp[5].z, temp[7].xxxx; 22: DP3_SAT temp[4].x, temp[4], temp[5]; 23: TXP temp[7], input[5], 2D[5]; 24: MUL temp[4], temp[4].xxxx, temp[7]; 25: TEX temp[7].x, input[4], 2D[6]; 26: MUL temp[4], temp[4], temp[7].xxxx; 27: MUL temp[1], temp[1], input[0]; 28: MUL temp[8], temp[1], const[5]; 29: DP3 temp[3].x, temp[3], temp[5]; 30: MAD_SAT temp[7].x, temp[3].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[7].x, temp[7].xxxx, temp[7].xxxx; 32: MUL temp[7], temp[7].xxxx, const[6]; 33: TEX temp[9], input[7], 2D[7]; 34: ADD temp[9], temp[9], temp[9]; 35: TEX temp[10], temp[0], 2D[8]; 36: ADD temp[10], temp[10], -const[11].wwww; 37: MAD temp[9], temp[2].xxxx, temp[10], temp[9]; 38: MAD temp[8], temp[7], temp[9], temp[8]; 39: MUL temp[11].xyz, temp[4], temp[8]; 40: MAD temp[11].xyz, temp[1], const[7], temp[11]; 41: TEX temp[7], input[6], 2D[9]; 42: ADD temp[11], temp[7], temp[11]; 43: LRP output[0].xyz, input[1].xxxx, const[8], temp[11]; 44: MUL temp[7], temp[7], temp[9]; 45: MUL temp[7], temp[7], temp[4]; 46: DP3 output[0].w, temp[7], const[10]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: MAD temp[0].xy, input[3], const[0], const[0].zwzw; 1: TEX temp[1], input[6], 2D[0]; 2: TEX temp[2], input[6], 2D[1]; 3: MUL_SAT temp[2], temp[2], input[3].wwww; 4: DP3 temp[3].x, input[8], input[8]; 5: RSQ temp[3].x, |temp[3].xxxx|; 6: MUL temp[3], temp[3].xxxx, input[8]; 7: DP3 temp[4].x, input[2], input[2]; 8: RSQ temp[4].x, |temp[4].xxxx|; 9: MUL temp[4], temp[4].xxxx, input[2]; 10: TEX temp[5], input[3], 2D[3]; 11: MOV temp[5].x, temp[5].wwww; 12: MAD temp[5], temp[5], const[9].xxxx, const[9].yyyy; 13: TEX temp[6], temp[0], 2D[4]; 14: MOV temp[6].x, temp[6].wwww; 15: MAD temp[6].xy, temp[6], const[9].xxxx, const[9].yyyy; 16: MAD temp[5].xy, temp[2].xxxx, temp[6], temp[5]; 17: MOV temp[5].z, const[10].wwww; 18: DP3 temp[7].x, temp[5], temp[5]; 19: ADD temp[7].x, const[11].xxxx, -temp[7].xxxx; 20: RSQ temp[7].x, |temp[7].xxxx|; 21: RCP temp[5].z, temp[7].xxxx; 22: DP3_SAT temp[4].x, temp[4], temp[5]; 23: TXP temp[7], input[5], 2D[5]; 24: MUL temp[4], temp[4].xxxx, temp[7]; 25: TEX temp[7].x, input[4], 2D[6]; 26: MUL temp[4], temp[4], temp[7].xxxx; 27: MUL temp[1], temp[1], input[0]; 28: MUL temp[8], temp[1], const[5]; 29: DP3 temp[3].x, temp[3], temp[5]; 30: MAD_SAT temp[7].x, temp[3].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[7].x, temp[7].xxxx, temp[7].xxxx; 32: MUL temp[7], temp[7].xxxx, const[6]; 33: TEX temp[9], input[7], 2D[7]; 34: ADD temp[9], temp[9], temp[9]; 35: TEX temp[10], temp[0], 2D[8]; 36: ADD temp[10], temp[10], -const[11].wwww; 37: MAD temp[9], temp[2].xxxx, temp[10], temp[9]; 38: MAD temp[8], temp[7], temp[9], temp[8]; 39: MUL temp[11].xyz, temp[4], temp[8]; 40: MAD temp[11].xyz, temp[1], const[7], temp[11]; 41: TEX temp[7], input[6], 2D[9]; 42: ADD temp[11], temp[7], temp[11]; 43: ADD temp[12], const[8], -temp[11]; 44: MAD output[0].xyz, input[1].xxxx, temp[12], temp[11]; 45: MUL temp[7], temp[7], temp[9]; 46: MUL temp[7], temp[7], temp[4]; 47: DP3 output[0].w, temp[7], const[10]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: MAD temp[0].xy, input[3], const[0], const[0].zwzw; 1: TEX temp[1], input[6], 2D[0]; 2: TEX temp[2], input[6], 2D[1]; 3: MUL_SAT temp[2], temp[2], input[3].wwww; 4: DP3 temp[3].x, input[8], input[8]; 5: RSQ temp[3].x, |temp[3].xxxx|; 6: MUL temp[3], temp[3].xxxx, input[8]; 7: DP3 temp[4].x, input[2], input[2]; 8: RSQ temp[4].x, |temp[4].xxxx|; 9: MUL temp[4], temp[4].xxxx, input[2]; 10: TEX temp[5], input[3], 2D[3]; 11: MOV temp[5].x, temp[5].wwww; 12: MAD temp[5], temp[5], const[9].xxxx, const[9].yyyy; 13: TEX temp[6], temp[0], 2D[4]; 14: MOV temp[6].x, temp[6].wwww; 15: MAD temp[6].xy, temp[6], const[9].xxxx, const[9].yyyy; 16: MAD temp[5].xy, temp[2].xxxx, temp[6], temp[5]; 17: MOV temp[5].z, const[10].wwww; 18: DP3 temp[7].x, temp[5], temp[5]; 19: ADD temp[7].x, const[11].xxxx, -temp[7].xxxx; 20: RSQ temp[7].x, |temp[7].xxxx|; 21: RCP temp[5].z, temp[7].xxxx; 22: DP3_SAT temp[4].x, temp[4], temp[5]; 23: TXP temp[7], input[5], 2D[5]; 24: MUL temp[4], temp[4].xxxx, temp[7]; 25: TEX temp[13], input[4], 2D[6]; 26: MOV temp[7].x, temp[13]; 27: MUL temp[4], temp[4], temp[7].xxxx; 28: MUL temp[1], temp[1], input[0]; 29: MUL temp[8], temp[1], const[5]; 30: DP3 temp[3].x, temp[3], temp[5]; 31: MAD_SAT temp[7].x, temp[3].xxxx, const[11].yyyy, -const[11].zzzz; 32: MUL temp[7].x, temp[7].xxxx, temp[7].xxxx; 33: MUL temp[7], temp[7].xxxx, const[6]; 34: TEX temp[9], input[7], 2D[7]; 35: ADD temp[9], temp[9], temp[9]; 36: TEX temp[10], temp[0], 2D[8]; 37: ADD temp[10], temp[10], -const[11].wwww; 38: MAD temp[9], temp[2].xxxx, temp[10], temp[9]; 39: MAD temp[8], temp[7], temp[9], temp[8]; 40: MUL temp[11].xyz, temp[4], temp[8]; 41: MAD temp[11].xyz, temp[1], const[7], temp[11]; 42: TEX temp[7], input[6], 2D[9]; 43: ADD temp[11], temp[7], temp[11]; 44: ADD temp[12], const[8], -temp[11]; 45: MAD output[0].xyz, input[1].xxxx, temp[12], temp[11]; 46: MUL temp[7], temp[7], temp[9]; 47: MUL temp[7], temp[7], temp[4]; 48: DP3 output[0].w, temp[7], const[10]; Fragment Program: after deadcode # Radeon Compiler Program 0: MAD temp[0].xy, input[3].xy__, const[0].xy__, const[0].zw__; 1: TEX temp[1].xyz, input[6].xy__, 2D[0]; 2: TEX temp[2].x, input[6].xy__, 2D[1]; 3: MUL_SAT temp[2].x, temp[2].x___, input[3].w___; 4: DP3 temp[3].x, input[8].xyz_, input[8].xyz_; 5: RSQ temp[3].x, |temp[3].x___|; 6: MUL temp[3].xyz, temp[3].xxx_, input[8].xyz_; 7: DP3 temp[4].x, input[2].xyz_, input[2].xyz_; 8: RSQ temp[4].x, |temp[4].x___|; 9: MUL temp[4].xyz, temp[4].xxx_, input[2].xyz_; 10: TEX temp[5].yw, input[3].xy__, 2D[3]; 11: MOV temp[5].x, temp[5].w___; 12: MAD temp[5].xy, temp[5].xy__, const[9].xx__, const[9].yy__; 13: TEX temp[6].yw, temp[0].xy__, 2D[4]; 14: MOV temp[6].x, temp[6].w___; 15: MAD temp[6].xy, temp[6].xy__, const[9].xx__, const[9].yy__; 16: MAD temp[5].xy, temp[2].xx__, temp[6].xy__, temp[5].xy__; 17: MOV temp[5].z, const[10].__w_; 18: DP3 temp[7].x, temp[5].xyz_, temp[5].xyz_; 19: ADD temp[7].x, const[11].x___, -temp[7].x___; 20: RSQ temp[7].x, |temp[7].x___|; 21: RCP temp[5].z, temp[7].x___; 22: DP3_SAT temp[4].x, temp[4].xyz_, temp[5].xyz_; 23: TXP temp[7].xyz, input[5].xy_w, 2D[5]; 24: MUL temp[4].xyz, temp[4].xxx_, temp[7].xyz_; 25: TEX temp[13].x, input[4].xy__, 2D[6]; 26: MOV temp[7].x, temp[13].x___; 27: MUL temp[4].xyz, temp[4].xyz_, temp[7].xxx_; 28: MUL temp[1].xyz, temp[1].xyz_, input[0].xyz_; 29: MUL temp[8].xyz, temp[1].xyz_, const[5].xyz_; 30: DP3 temp[3].x, temp[3].xyz_, temp[5].xyz_; 31: MAD_SAT temp[7].x, temp[3].x___, const[11].y___, -const[11].z___; 32: MUL temp[7].x, temp[7].x___, temp[7].x___; 33: MUL temp[7].xyz, temp[7].xxx_, const[6].xyz_; 34: TEX temp[9].xyz, input[7].xy__, 2D[7]; 35: ADD temp[9].xyz, temp[9].xyz_, temp[9].xyz_; 36: TEX temp[10].xyz, temp[0].xy__, 2D[8]; 37: ADD temp[10].xyz, temp[10].xyz_, -const[11].www_; 38: MAD temp[9].xyz, temp[2].xxx_, temp[10].xyz_, temp[9].xyz_; 39: MAD temp[8].xyz, temp[7].xyz_, temp[9].xyz_, temp[8].xyz_; 40: MUL temp[11].xyz, temp[4].xyz_, temp[8].xyz_; 41: MAD temp[11].xyz, temp[1].xyz_, const[7].xyz_, temp[11].xyz_; 42: TEX temp[7].xyz, input[6].xy__, 2D[9]; 43: ADD temp[11].xyz, temp[7].xyz_, temp[11].xyz_; 44: ADD temp[12].xyz, const[8].xyz_, -temp[11].xyz_; 45: MAD output[0].xyz, input[1].xxx_, temp[12].xyz_, temp[11].xyz_; 46: MUL temp[7].xyz, temp[7].xyz_, temp[9].xyz_; 47: MUL temp[7].xyz, temp[7].xyz_, temp[4].xyz_; 48: DP3 output[0].w, temp[7].xyz_, const[10].xyz_; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: MAD temp[0].xy, input[3].xy__, const[0].xy__, const[0].zw__; 1: TEX temp[1].xyz, input[6].xy__, 2D[0]; 2: TEX temp[2].x, input[6].xy__, 2D[1]; 3: MUL_SAT temp[2].x, temp[2].x___, input[3].w___; 4: DP3 temp[3].x, input[8].xyz_, input[8].xyz_; 5: RSQ temp[3].x, |temp[3].x___|; 6: MUL temp[3].xyz, temp[3].xxx_, input[8].xyz_; 7: DP3 temp[4].x, input[2].xyz_, input[2].xyz_; 8: RSQ temp[4].x, |temp[4].x___|; 9: MUL temp[4].xyz, temp[4].xxx_, input[2].xyz_; 10: TEX temp[5].yw, input[3].xy__, 2D[3]; 11: MOV temp[5].x, temp[5].w___; 12: MAD temp[5].xy, temp[5].xy__, const[9].xx__, none.-1-1__; 13: TEX temp[6].yw, temp[0].xy__, 2D[4]; 14: MOV temp[6].x, temp[6].w___; 15: MAD temp[6].xy, temp[6].xy__, const[9].xx__, none.-1-1__; 16: MAD temp[5].xy, temp[2].xx__, temp[6].xy__, temp[5].xy__; 17: MOV temp[5].z, none.__0_; 18: DP3 temp[7].x, temp[5].xyz_, temp[5].xyz_; 19: ADD temp[7].x, none.1___, -temp[7].x___; 20: RSQ temp[7].x, |temp[7].x___|; 21: RCP temp[5].z, temp[7].x___; 22: DP3_SAT temp[4].x, temp[4].xyz_, temp[5].xyz_; 23: TXP temp[7].xyz, input[5].xy_w, 2D[5]; 24: MUL temp[4].xyz, temp[4].xxx_, temp[7].xyz_; 25: TEX temp[13].x, input[4].xy__, 2D[6]; 26: MUL temp[4].xyz, temp[4].xyz_, temp[13].xxx_; 27: MUL temp[1].xyz, temp[1].xyz_, input[0].xyz_; 28: MUL temp[8].xyz, temp[1].xyz_, const[5].xyz_; 29: DP3 temp[3].x, temp[3].xyz_, temp[5].xyz_; 30: MAD_SAT temp[7].x, temp[3].x___, const[11].y___, -const[11].z___; 31: MUL temp[7].x, temp[7].x___, temp[7].x___; 32: MUL temp[7].xyz, temp[7].xxx_, const[6].xyz_; 33: TEX temp[9].xyz, input[7].xy__, 2D[7]; 34: ADD temp[9].xyz, temp[9].xyz_, temp[9].xyz_; 35: TEX temp[10].xyz, temp[0].xy__, 2D[8]; 36: ADD temp[10].xyz, temp[10].xyz_, -none.HHH_; 37: MAD temp[9].xyz, temp[2].xxx_, temp[10].xyz_, temp[9].xyz_; 38: MAD temp[8].xyz, temp[7].xyz_, temp[9].xyz_, temp[8].xyz_; 39: MUL temp[11].xyz, temp[4].xyz_, temp[8].xyz_; 40: MAD temp[11].xyz, temp[1].xyz_, const[7].xyz_, temp[11].xyz_; 41: TEX temp[7].xyz, input[6].xy__, 2D[9]; 42: ADD temp[11].xyz, temp[7].xyz_, temp[11].xyz_; 43: ADD temp[12].xyz, const[8].xyz_, -temp[11].xyz_; 44: MAD output[0].xyz, input[1].xxx_, temp[12].xyz_, temp[11].xyz_; 45: MUL temp[7].xyz, temp[7].xyz_, temp[9].xyz_; 46: MUL temp[7].xyz, temp[7].xyz_, temp[4].xyz_; 47: DP3 output[0].w, temp[7].xyz_, const[10].xyz_; Fragment Program: after dataflow passes # Radeon Compiler Program 0: MOV temp[14].x, const[0].z___; 1: MOV temp[14].y, const[0]._w__; 2: MAD temp[0].xy, input[3].xy__, const[0].xy__, temp[14].xy__; 3: TEX temp[1].xyz, input[6].xy__, 2D[0]; 4: TEX temp[2].x, input[6].xy__, 2D[1]; 5: MUL_SAT temp[2].x, temp[2].x___, input[3].w___; 6: DP3 temp[3].x, input[8].xyz_, input[8].xyz_; 7: RSQ temp[3].x, |temp[3].x___|; 8: MUL temp[3].xyz, temp[3].xxx_, input[8].xyz_; 9: DP3 temp[4].x, input[2].xyz_, input[2].xyz_; 10: RSQ temp[4].x, |temp[4].x___|; 11: MUL temp[4].xyz, temp[4].xxx_, input[2].xyz_; 12: TEX temp[5].yw, input[3].xy__, 2D[3]; 13: MOV temp[5].x, temp[5].w___; 14: MAD temp[5].xy, temp[5].xy__, const[9].xx__, none.-1-1__; 15: TEX temp[6].yw, temp[0].xy__, 2D[4]; 16: MOV temp[6].x, temp[6].w___; 17: MAD temp[6].xy, temp[6].xy__, const[9].xx__, none.-1-1__; 18: MAD temp[5].xy, temp[2].xx__, temp[6].xy__, temp[5].xy__; 19: MOV temp[5].z, none.__0_; 20: DP3 temp[7].x, temp[5].xyz_, temp[5].xyz_; 21: ADD temp[7].x, none.1___, -temp[7].x___; 22: RSQ temp[7].x, |temp[7].x___|; 23: RCP temp[5].z, temp[7].x___; 24: DP3_SAT temp[4].x, temp[4].xyz_, temp[5].xyz_; 25: TXP temp[7].xyz, input[5].xy_w, 2D[5]; 26: MUL temp[4].xyz, temp[4].xxx_, temp[7].xyz_; 27: TEX temp[13].x, input[4].xy__, 2D[6]; 28: MUL temp[4].xyz, temp[4].xyz_, temp[13].xxx_; 29: MUL temp[1].xyz, temp[1].xyz_, input[0].xyz_; 30: MUL temp[8].xyz, temp[1].xyz_, const[5].xyz_; 31: DP3 temp[3].x, temp[3].xyz_, temp[5].xyz_; 32: MAD_SAT temp[7].x, temp[3].x___, const[11].y___, -const[11].z___; 33: MUL temp[7].x, temp[7].x___, temp[7].x___; 34: MUL temp[7].xyz, temp[7].xxx_, const[6].xyz_; 35: TEX temp[9].xyz, input[7].xy__, 2D[7]; 36: ADD temp[9].xyz, temp[9].xyz_, temp[9].xyz_; 37: TEX temp[10].xyz, temp[0].xy__, 2D[8]; 38: ADD temp[10].xyz, temp[10].xyz_, -none.HHH_; 39: MAD temp[9].xyz, temp[2].xxx_, temp[10].xyz_, temp[9].xyz_; 40: MAD temp[8].xyz, temp[7].xyz_, temp[9].xyz_, temp[8].xyz_; 41: MUL temp[11].xyz, temp[4].xyz_, temp[8].xyz_; 42: MAD temp[11].xyz, temp[1].xyz_, const[7].xyz_, temp[11].xyz_; 43: TEX temp[7].xyz, input[6].xy__, 2D[9]; 44: ADD temp[11].xyz, temp[7].xyz_, temp[11].xyz_; 45: ADD temp[12].xyz, const[8].xyz_, -temp[11].xyz_; 46: MAD output[0].xyz, input[1].xxx_, temp[12].xyz_, temp[11].xyz_; 47: MUL temp[7].xyz, temp[7].xyz_, temp[9].xyz_; 48: MUL temp[7].xyz, temp[7].xyz_, temp[4].xyz_; 49: DP3 output[0].w, temp[7].xyz_, const[10].xyz_; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = const[0] MAD temp[14].x, src0.z__, src0.111, src0.000 1: src0.w = const[0] MAD temp[14].y, src0._w_, src0.111, src0.000 2: src0.xyz = input[3], src1.xyz = const[0], src2.xyz = temp[14] MAD temp[0].xy, src0.xy_, src1.xy_, src2.xy_ 3: TEX temp[1].xyz, input[6].xy__, 2D[0]; 4: TEX temp[2].x, input[6].xy__, 2D[1]; 5: src0.xyz = temp[2], src0.w = input[3] MAD_SAT temp[2].x, src0.x__, src0.w__, src0.000 6: src0.xyz = input[8] DP3 temp[3].x, src0.xyz, src0.xyz 7: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 8: src0.xyz = temp[3], src1.xyz = input[8] MAD temp[3].xyz, src0.xxx, src1.xyz, src0.000 9: src0.xyz = input[2] DP3 temp[4].x, src0.xyz, src0.xyz 10: src0.xyz = temp[4] REPL_ALPHA temp[4].x RSQ, |src0.x| 11: src0.xyz = temp[4], src1.xyz = input[2] MAD temp[4].xyz, src0.xxx, src1.xyz, src0.000 12: TEX temp[5].yw, input[3].xy__, 2D[3]; 13: src0.w = temp[5] MAD temp[5].x, src0.w__, src0.111, src0.000 14: src0.xyz = temp[5], src1.xyz = const[9] MAD temp[5].xy, src0.xy_, src1.xx_, -src0.11_ 15: TEX temp[6].yw, temp[0].xy__, 2D[4]; 16: src0.w = temp[6] MAD temp[6].x, src0.w__, src0.111, src0.000 17: src0.xyz = temp[6], src1.xyz = const[9] MAD temp[6].xy, src0.xy_, src1.xx_, -src0.11_ 18: src0.xyz = temp[2], src1.xyz = temp[6], src2.xyz = temp[5] MAD temp[5].xy, src0.xx_, src1.xy_, src2.xy_ 19: MAD temp[5].z, src0.__0, src0.111, src0.000 20: src0.xyz = temp[5] DP3 temp[7].x, src0.xyz, src0.xyz 21: src0.xyz = temp[7] MAD temp[7].x, src0.1__, src0.111, -src0.x__ 22: src0.xyz = temp[7] REPL_ALPHA temp[7].x RSQ, |src0.x| 23: src0.xyz = temp[7] REPL_ALPHA temp[5].z RCP, src0.x 24: src0.xyz = temp[4], src1.xyz = temp[5] DP3_SAT temp[4].x, src0.xyz, src1.xyz 25: TXP temp[7].xyz, input[5].xy_w, 2D[5]; 26: src0.xyz = temp[4], src1.xyz = temp[7] MAD temp[4].xyz, src0.xxx, src1.xyz, src0.000 27: TEX temp[13].x, input[4].xy__, 2D[6]; 28: src0.xyz = temp[4], src1.xyz = temp[13] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 29: src0.xyz = temp[1], src1.xyz = input[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 31: src0.xyz = temp[3], src1.xyz = temp[5] DP3 temp[3].x, src0.xyz, src1.xyz 32: src0.xyz = temp[3], src1.xyz = const[11] MAD_SAT temp[7].x, src0.x__, src1.y__, -src1.z__ 33: src0.xyz = temp[7] MAD temp[7].x, src0.x__, src0.x__, src0.000 34: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xxx, src1.xyz, src0.000 35: TEX temp[9].xyz, input[7].xy__, 2D[7]; 36: src0.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src0.111, src0.xyz 37: TEX temp[10].xyz, temp[0].xy__, 2D[8]; 38: src0.xyz = temp[10] MAD temp[10].xyz, src0.xyz, src0.111, -src0.HHH 39: src0.xyz = temp[2], src1.xyz = temp[10], src2.xyz = temp[9] MAD temp[9].xyz, src0.xxx, src1.xyz, src2.xyz 40: src0.xyz = temp[7], src1.xyz = temp[9], src2.xyz = temp[8] MAD temp[8].xyz, src0.xyz, src1.xyz, src2.xyz 41: src0.xyz = temp[4], src1.xyz = temp[8] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 42: src0.xyz = temp[1], src1.xyz = const[7], src2.xyz = temp[11] MAD temp[11].xyz, src0.xyz, src1.xyz, src2.xyz 43: TEX temp[7].xyz, input[6].xy__, 2D[9]; 44: src0.xyz = temp[7], src1.xyz = temp[11] MAD temp[11].xyz, src0.xyz, src0.111, src1.xyz 45: src0.xyz = const[8], src1.xyz = temp[11] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz 46: src0.xyz = input[1], src1.xyz = temp[12], src2.xyz = temp[11] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 47: src0.xyz = temp[7], src1.xyz = temp[9] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 48: src0.xyz = temp[7], src1.xyz = temp[4] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 49: src0.xyz = temp[7], src1.xyz = const[10] DP3, src0.xyz, src1.xyz DP3 color[0].w, src0._, src0._ Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[9].xyz, input[7].xy__, 2D[7]; 2: TEX temp[13].x, input[4].xy__, 2D[6]; 3: TEX temp[5].yw, input[3].xy__, 2D[3]; 4: TEX temp[2].x, input[6].xy__, 2D[1]; 5: TEX temp[1].xyz, input[6].xy__, 2D[0]; 6: src0.xyz = temp[1], src1.xyz = input[0] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 7: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 8: src0.xyz = temp[2], src0.w = input[3] MAD_SAT temp[2].x, src0.x__, src0.w__, src0.000 9: src0.w = temp[5] MAD temp[5].x, src0.w__, src0.111, src0.000 10: src0.xyz = temp[5], src1.xyz = const[9] MAD temp[5].xy, src0.xy_, src1.xx_, -src0.11_ 11: src0.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src0.111, src0.xyz 12: MAD temp[5].z, src0.__0, src0.111, src0.000 13: src0.xyz = input[2] DP3 temp[4].x, src0.xyz, src0.xyz 14: src0.xyz = temp[4] REPL_ALPHA temp[4].x RSQ, |src0.x| 15: src0.xyz = temp[4], src1.xyz = input[2] MAD temp[4].xyz, src0.xxx, src1.xyz, src0.000 16: src0.xyz = input[8] DP3 temp[3].x, src0.xyz, src0.xyz 17: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 18: src0.xyz = temp[3], src1.xyz = input[8] MAD temp[3].xyz, src0.xxx, src1.xyz, src0.000 19: src0.w = const[0] MAD temp[14].y, src0._w_, src0.111, src0.000 20: src0.xyz = const[0] MAD temp[14].x, src0.z__, src0.111, src0.000 21: src0.xyz = input[3], src1.xyz = const[0], src2.xyz = temp[14] MAD temp[0].xy, src0.xy_, src1.xy_, src2.xy_ 22: BEGIN_TEX; 23: TEX temp[6].yw, temp[0].xy__, 2D[4]; 24: TEX temp[10].xyz, temp[0].xy__, 2D[8]; 25: src0.xyz = temp[10] MAD temp[10].xyz, src0.xyz, src0.111, -src0.HHH 26: src0.xyz = temp[2], src1.xyz = temp[10], src2.xyz = temp[9] MAD temp[9].xyz, src0.xxx, src1.xyz, src2.xyz 27: src0.w = temp[6] MAD temp[6].x, src0.w__, src0.111, src0.000 28: src0.xyz = temp[6], src1.xyz = const[9] MAD temp[6].xy, src0.xy_, src1.xx_, -src0.11_ 29: src0.xyz = temp[2], src1.xyz = temp[6], src2.xyz = temp[5] MAD temp[5].xy, src0.xx_, src1.xy_, src2.xy_ 30: src0.xyz = temp[5] DP3 temp[7].x, src0.xyz, src0.xyz 31: src0.xyz = temp[7] MAD temp[7].x, src0.1__, src0.111, -src0.x__ 32: src0.xyz = temp[7] REPL_ALPHA temp[7].x RSQ, |src0.x| 33: src0.xyz = temp[7] REPL_ALPHA temp[5].z RCP, src0.x 34: src0.xyz = temp[4], src1.xyz = temp[5] DP3_SAT temp[4].x, src0.xyz, src1.xyz 35: src0.xyz = temp[3], src1.xyz = temp[5] DP3 temp[3].x, src0.xyz, src1.xyz 36: BEGIN_TEX; 37: TXP temp[7].xyz, input[5].xy_w, 2D[5]; 38: src0.xyz = temp[4], src1.xyz = temp[7] MAD temp[4].xyz, src0.xxx, src1.xyz, src0.000 39: src0.xyz = temp[4], src1.xyz = temp[13] MAD temp[4].xyz, src0.xyz, src1.xxx, src0.000 40: src0.xyz = temp[3], src1.xyz = const[11] MAD_SAT temp[7].x, src0.x__, src1.y__, -src1.z__ 41: src0.xyz = temp[7] MAD temp[7].x, src0.x__, src0.x__, src0.000 42: src0.xyz = temp[7], src1.xyz = const[6] MAD temp[7].xyz, src0.xxx, src1.xyz, src0.000 43: src0.xyz = temp[7], src1.xyz = temp[9], src2.xyz = temp[8] MAD temp[8].xyz, src0.xyz, src1.xyz, src2.xyz 44: src0.xyz = temp[4], src1.xyz = temp[8] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 45: src0.xyz = temp[1], src1.xyz = const[7], src2.xyz = temp[11] MAD temp[11].xyz, src0.xyz, src1.xyz, src2.xyz 46: BEGIN_TEX; 47: TEX temp[7].xyz, input[6].xy__, 2D[9]; 48: src0.xyz = temp[7], src1.xyz = temp[11] MAD temp[11].xyz, src0.xyz, src0.111, src1.xyz 49: src0.xyz = const[8], src1.xyz = temp[11] MAD temp[12].xyz, src0.xyz, src0.111, -src1.xyz 50: src0.xyz = input[1], src1.xyz = temp[12], src2.xyz = temp[11] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 51: src0.xyz = temp[7], src1.xyz = temp[9] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 52: src0.xyz = temp[7], src1.xyz = temp[4] MAD temp[7].xyz, src0.xyz, src1.xyz, src0.000 53: src0.xyz = temp[7], src1.xyz = const[10] DP3, src0.xyz, src1.xyz DP3 color[0].w, src0._, src0._ Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[12].xyz, temp[7].xy__, 2D[7]; 2: TEX temp[13].x, temp[4].xy__, 2D[6]; 3: TEX temp[10].yw, temp[3].xy__, 2D[3]; 4: TEX temp[7].x, temp[6].xy__, 2D[1]; 5: TEX temp[4].xyz, temp[6].xy__, 2D[0]; 6: src0.xyz = temp[4], src1.xyz = temp[0] MAD temp[4].xyz, src0.xyz, src1.xyz, src0.000 7: src0.xyz = temp[4], src1.xyz = const[5] MAD temp[11].xyz, src0.xyz, src1.xyz, src0.000 8: src0.xyz = temp[7], src0.w = temp[3] MAD_SAT temp[7].x, src0.x__, src0.w__, src0.000 9: src0.w = temp[10] MAD temp[10].x, src0.w__, src0.111, src0.000 10: src0.xyz = temp[10], src1.xyz = const[9] MAD temp[10].xy, src0.xy_, src1.xx_, -src0.11_ 11: src0.xyz = temp[12] MAD temp[12].xyz, src0.xyz, src0.111, src0.xyz 12: MAD temp[10].z, src0.__0, src0.111, src0.000 13: src0.xyz = temp[2] DP3 temp[9].x, src0.xyz, src0.xyz 14: src0.xyz = temp[9] REPL_ALPHA temp[9].x RSQ, |src0.x| 15: src0.xyz = temp[9], src1.xyz = temp[2] MAD temp[9].xyz, src0.xxx, src1.xyz, src0.000 16: src0.xyz = temp[8] DP3 temp[2].x, src0.xyz, src0.xyz 17: src0.xyz = temp[2] REPL_ALPHA temp[2].x RSQ, |src0.x| 18: src0.xyz = temp[2], src1.xyz = temp[8] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 19: src0.w = const[0] MAD temp[0].y, src0._w_, src0.111, src0.000 20: src0.xyz = const[0] MAD temp[0].x, src0.z__, src0.111, src0.000 21: src0.xyz = temp[3], src1.xyz = const[0], src2.xyz = temp[0] MAD temp[0].xy, src0.xy_, src1.xy_, src2.xy_ 22: BEGIN_TEX; 23: TEX temp[3].yw, temp[0].xy__, 2D[4]; 24: TEX temp[0].xyz, temp[0].xy__, 2D[8]; 25: src0.xyz = temp[0] MAD temp[0].xyz, src0.xyz, src0.111, -src0.HHH 26: src0.xyz = temp[7], src1.xyz = temp[0], src2.xyz = temp[12] MAD temp[12].xyz, src0.xxx, src1.xyz, src2.xyz 27: src0.w = temp[3] MAD temp[3].x, src0.w__, src0.111, src0.000 28: src0.xyz = temp[3], src1.xyz = const[9] MAD temp[3].xy, src0.xy_, src1.xx_, -src0.11_ 29: src0.xyz = temp[7], src1.xyz = temp[3], src2.xyz = temp[10] MAD temp[10].xy, src0.xx_, src1.xy_, src2.xy_ 30: src0.xyz = temp[10] DP3 temp[0].x, src0.xyz, src0.xyz 31: src0.xyz = temp[0] MAD temp[0].x, src0.1__, src0.111, -src0.x__ 32: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 33: src0.xyz = temp[0] REPL_ALPHA temp[10].z RCP, src0.x 34: src0.xyz = temp[9], src1.xyz = temp[10] DP3_SAT temp[9].x, src0.xyz, src1.xyz 35: src0.xyz = temp[2], src1.xyz = temp[10] DP3 temp[2].x, src0.xyz, src1.xyz 36: BEGIN_TEX; 37: TXP temp[0].xyz, temp[5].xy_w, 2D[5]; 38: src0.xyz = temp[9], src1.xyz = temp[0] MAD temp[9].xyz, src0.xxx, src1.xyz, src0.000 39: src0.xyz = temp[9], src1.xyz = temp[13] MAD temp[9].xyz, src0.xyz, src1.xxx, src0.000 40: src0.xyz = temp[2], src1.xyz = const[11] MAD_SAT temp[0].x, src0.x__, src1.y__, -src1.z__ 41: src0.xyz = temp[0] MAD temp[0].x, src0.x__, src0.x__, src0.000 42: src0.xyz = temp[0], src1.xyz = const[6] MAD temp[0].xyz, src0.xxx, src1.xyz, src0.000 43: src0.xyz = temp[0], src1.xyz = temp[12], src2.xyz = temp[11] MAD temp[11].xyz, src0.xyz, src1.xyz, src2.xyz 44: src0.xyz = temp[9], src1.xyz = temp[11] MAD temp[2].xyz, src0.xyz, src1.xyz, src0.000 45: src0.xyz = temp[4], src1.xyz = const[7], src2.xyz = temp[2] MAD temp[2].xyz, src0.xyz, src1.xyz, src2.xyz 46: BEGIN_TEX; 47: TEX temp[0].xyz, temp[6].xy__, 2D[9]; 48: src0.xyz = temp[0], src1.xyz = temp[2] MAD temp[2].xyz, src0.xyz, src0.111, src1.xyz 49: src0.xyz = const[8], src1.xyz = temp[2] MAD temp[3].xyz, src0.xyz, src0.111, -src1.xyz 50: src0.xyz = temp[1], src1.xyz = temp[3], src2.xyz = temp[2] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 51: src0.xyz = temp[0], src1.xyz = temp[12] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 52: src0.xyz = temp[0], src1.xyz = temp[9] MAD temp[0].xyz, src0.xyz, src1.xyz, src0.000 53: src0.xyz = temp[0], src1.xyz = const[10] DP3, src0.xyz, src1.xyz DP3 color[0].w, src0._, src0._ pc=49************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 15, tex_end: 4 (code_addr: 000803c0) TEX: TEX t12, t7, texture[7] (0000bb07) TEX t13, t4, texture[6] (0000b344) TEX t10, t3, texture[3] (00009a83) TEX t7, t6, texture[1] (000089c6) TEX t4, t6, texture[0] (00008106) 0: xyz: t4 t0 t0 -> t4.xyz (03900004) w: t0 t0 t0 -> (00000000) xyz: t4.xyz t0.xyz 0.0 op: 00050200 w: t4.x t4.x t4.x op: 00000000 1: xyz: t4 c5 t0 -> t11.xyz (03ac0944) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c5.xyz 0.0 op: 00050200 w: t4.x t4.x t4.x op: 00000000 2: xyz: t7 t0 t0 -> t7.x (009c0007) w: t3 t0 t0 -> (00000003) xyz: t7.xyz t3.www 0.0 op: 40050600 w: t7.x t7.x t7.x op: 00000000 3: xyz: t0 t0 t0 -> t10.x (00a80000) w: t10 t0 t0 -> (0000000a) xyz: t10.www 1.0 0.0 op: 00050a8c w: t0.x t0.x t0.x op: 00000000 4: xyz: t10 c9 t0 -> t10.xy (01a80a4a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz c9.xxx -1.0 op: 000d4280 w: t10.x t10.x t10.x op: 00000000 5: xyz: t12 t0 t0 -> t12.xyz (03b0000c) w: t0 t0 t0 -> (00000000) xyz: t12.xyz 1.0 t12.xyz op: 00000a80 w: t12.x t12.x t12.x op: 00000000 6: xyz: t0 t0 t0 -> t10.z (02280000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 7: xyz: t2 t0 t0 -> t9.x (00a40002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: t2.x t2.x t2.x op: 00000000 8: xyz: t9 t0 t0 -> t9.x (00a40009) w: t0 t0 t0 -> (00000000) xyz: t9.xxx t9.xxx t9.xxx op: 05004081 w: |t9.x| t9.x t9.x op: 05800040 9: xyz: t9 t2 t0 -> t9.xyz (03a40089) w: t0 t0 t0 -> (00000000) xyz: t9.xxx t2.xyz 0.0 op: 00050201 w: t9.x t9.x t9.x op: 00000000 10: xyz: t8 t0 t0 -> t2.x (00880008) w: t0 t0 t0 -> (00000000) xyz: t8.xyz t8.xyz t8.xxx op: 00804000 w: t8.x t8.x t8.x op: 00000000 11: xyz: t2 t0 t0 -> t2.x (00880002) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t2.xxx t2.xxx op: 05004081 w: |t2.x| t2.x t2.x op: 05800040 12: xyz: t2 t8 t0 -> t2.xyz (03880202) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t8.xyz 0.0 op: 00050201 w: t2.x t2.x t2.x op: 00000000 13: xyz: t0 t0 t0 -> t0.y (01000000) w: c0 t0 t0 -> (00000020) xyz: c0.www 1.0 0.0 op: 00050a8c w: t0.x t0.x t0.x op: 00000000 14: xyz: c0 t0 t0 -> t0.x (00800020) w: t0 t0 t0 -> (00000000) xyz: c0.zzz 1.0 0.0 op: 00050a83 w: c0.x c0.x c0.x op: 00000000 15: xyz: t3 c0 t0 -> t0.xy (01800803) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c0.xyz t0.xyz op: 00020200 w: t3.x t3.x t3.x op: 00000000 NODE 1: alu_offset: 16, tex_offset: 5, alu_end: 10, tex_end: 1 (code_addr: 00025290) TEX: TEX t3, t0, texture[4] (0000a0c0) TEX t0, t0, texture[8] (0000c000) 16: xyz: t0 t0 t0 -> t0.xyz (03800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz 1.0 -0.5 op: 000d8a80 w: t0.x t0.x t0.x op: 00000000 17: xyz: t7 t0 t12 -> t12.xyz (03b0c007) w: t0 t0 t0 -> (00000000) xyz: t7.xxx t0.xyz t12.xyz op: 00020201 w: t7.x t7.x t7.x op: 00000000 18: xyz: t0 t0 t0 -> t3.x (008c0000) w: t3 t0 t0 -> (00000003) xyz: t3.www 1.0 0.0 op: 00050a8c w: t0.x t0.x t0.x op: 00000000 19: xyz: t3 c9 t0 -> t3.xy (018c0a43) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c9.xxx -1.0 op: 000d4280 w: t3.x t3.x t3.x op: 00000000 20: xyz: t7 t3 t10 -> t10.xy (01a8a0c7) w: t0 t0 t0 -> (00000000) xyz: t7.xxx t3.xyz t10.xyz op: 00020201 w: t7.x t7.x t7.x op: 00000000 21: xyz: t10 t0 t0 -> t0.x (0080000a) w: t0 t0 t0 -> (00000000) xyz: t10.xyz t10.xyz t10.xxx op: 00804000 w: t10.x t10.x t10.x op: 00000000 22: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t0.xyz op: 00080a95 w: t0.x t0.x t0.x op: 00000000 23: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: |t0.x| t0.x t0.x op: 05800040 24: xyz: t0 t0 t0 -> t10.z (02280000) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: t0.x t0.x t0.x op: 05000000 25: xyz: t9 t10 t0 -> t9.x (00a40289) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t10.xyz t9.xxx op: 40804200 w: t9.x t9.x t9.x op: 00000000 26: xyz: t2 t10 t0 -> t2.x (00880282) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t10.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 NODE 2: alu_offset: 27, tex_offset: 7, alu_end: 7, tex_end: 0 (code_addr: 000071db) TEX: TXP t0, t5, texture[5] (0001a805) 27: xyz: t9 t0 t0 -> t9.xyz (03a40009) w: t0 t0 t0 -> (00000000) xyz: t9.xxx t0.xyz 0.0 op: 00050201 w: t9.x t9.x t9.x op: 00000000 28: xyz: t9 t13 t0 -> t9.xyz (03a40349) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t13.xxx 0.0 op: 00050280 w: t9.x t9.x t9.x op: 00000000 29: xyz: t2 c11 t0 -> t0.x (00800ac2) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c11.yyy -c11.zzz op: 4009c300 w: t2.x t2.x t2.x op: 00000000 30: xyz: t0 t0 t0 -> t0.x (00800000) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t0.xyz 0.0 op: 00050000 w: t0.x t0.x t0.x op: 00000000 31: xyz: t0 c6 t0 -> t0.xyz (03800980) w: t0 t0 t0 -> (00000000) xyz: t0.xxx c6.xyz 0.0 op: 00050201 w: t0.x t0.x t0.x op: 00000000 32: xyz: t0 t12 t11 -> t11.xyz (03acb300) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t12.xyz t11.xyz op: 00020200 w: t0.x t0.x t0.x op: 00000000 33: xyz: t9 t11 t0 -> t2.xyz (038802c9) w: t0 t0 t0 -> (00000000) xyz: t9.xyz t11.xyz 0.0 op: 00050200 w: t9.x t9.x t9.x op: 00000000 34: xyz: t4 c7 t2 -> t2.xyz (038829c4) w: t0 t0 t0 -> (00000000) xyz: t4.xyz c7.xyz t2.xyz op: 00020200 w: t4.x t4.x t4.x op: 00000000 NODE 3: alu_offset: 35, tex_offset: 8, alu_end: 5, tex_end: 0 (code_addr: 00408163) TEX: TEX t0, t6, texture[9] (0000c806) 35: xyz: t0 t2 t0 -> t2.xyz (03880080) w: t0 t0 t0 -> (00000000) xyz: t0.xyz 1.0 t2.xyz op: 00010a80 w: t0.x t0.x t0.x op: 00000000 36: xyz: c8 t2 t0 -> t3.xyz (038c00a8) w: t0 t0 t0 -> (00000000) xyz: c8.xyz 1.0 -t2.xyz op: 00090a80 w: c8.x c8.x c8.x op: 00000000 37: xyz: t1 t3 t2 -> o0.xyz (1c0020c1) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t3.xyz t2.xyz op: 00020201 w: t1.x t1.x t1.x op: 00000000 38: xyz: t0 t12 t0 -> t0.xyz (03800300) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t12.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 39: xyz: t0 t9 t0 -> t0.xyz (03800240) w: t0 t0 t0 -> (00000000) xyz: t0.xyz t9.xyz 0.0 op: 00050200 w: t0.x t0.x t0.x op: 00000000 40: xyz: t0 c10 t0 -> (00000a80) w: t0 t0 t0 -> o0.w (01000000) xyz: t0.xyz c10.xyz t0.xxx op: 00804200 w: 1.0 1.0 t0.x op: 00800891 r300: Initial fragment program FRAG DCL IN[0], COLOR[1], LINEAR 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 IN[7], GENERIC[6], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[1] DCL SAMP[2] DCL SAMP[3] DCL SAMP[4] DCL SAMP[5] DCL CONST[4..8] DCL TEMP[0..9] IMM FLT32 { 2.0000, -1.0000, 1.0000, 4.0000} IMM FLT32 { 0.3000, 0.5900, 0.1100, 0.0000} IMM FLT32 { 1.0000, 4.0000, 3.0000, 0.0000} 0: DP3 TEMP[0].x, IN[7], IN[7] 1: RSQ TEMP[0].x, TEMP[0].xxxx 2: MUL TEMP[0], TEMP[0].xxxx, IN[7] 3: DP3 TEMP[1].x, IN[1], IN[1] 4: RSQ TEMP[1].x, TEMP[1].xxxx 5: MUL TEMP[1], TEMP[1].xxxx, IN[1] 6: TEX TEMP[2], IN[2], SAMP[1], 2D 7: MOV TEMP[2].x, TEMP[2].wwww 8: MAD TEMP[2], TEMP[2], IMM[0].xxxx, IMM[0].yyyy 9: MOV TEMP[2].z, IMM[1].wwww 10: DP3 TEMP[3].x, TEMP[2], TEMP[2] 11: ADD TEMP[3].x, IMM[2].xxxx, -TEMP[3].xxxx 12: RSQ TEMP[3].x, TEMP[3].xxxx 13: RCP TEMP[2].z, TEMP[3].xxxx 14: MOV TEMP[4], TEMP[1].zzzz 15: TEX TEMP[5], IN[5], SAMP[2], 2D 16: MOV TEMP[6], TEMP[5] 17: DP3 TEMP[7].x, TEMP[1], -TEMP[2] 18: MUL TEMP[7].x, TEMP[7].xxxx, TEMP[5].wwww 19: MUL TEMP[7].x, TEMP[7].xxxx, CONST[4].wwww 20: DP3 TEMP[8].x, TEMP[1], TEMP[2] 21: CMP TEMP[1].x, TEMP[4].xxxx, TEMP[7].xxxx, TEMP[8].xxxx 22: TXP TEMP[3], IN[4], SAMP[3], 2D 23: MUL TEMP[1], TEMP[1].xxxx, TEMP[3] 24: TEX TEMP[3].x, IN[3], SAMP[4], 2D 25: MUL TEMP[1], TEMP[1], TEMP[3].xxxx 26: MUL TEMP[9], TEMP[5], CONST[5] 27: MUL TEMP[3].xyz, TEMP[9], CONST[4] 28: CMP TEMP[9].xyz, TEMP[4].xxxx, TEMP[3], TEMP[9] 29: DP3 TEMP[0].x, TEMP[0], TEMP[2] 30: MAD_SAT TEMP[3].x, TEMP[0].xxxx, IMM[2].yyyy, -IMM[2].zzzz 31: MUL TEMP[3].x, TEMP[3].xxxx, TEMP[3].xxxx 32: MUL TEMP[3], TEMP[3].xxxx, CONST[6] 33: CMP TEMP[3], TEMP[4].xxxx, IMM[1].wwww, TEMP[3] 34: TEX TEMP[5], IN[6], SAMP[5], 2D 35: ADD TEMP[5], TEMP[5], TEMP[5] 36: MAD TEMP[9], TEMP[3], TEMP[5], TEMP[9] 37: MUL TEMP[9], TEMP[1], TEMP[9] 38: MAD TEMP[9], TEMP[6], CONST[7], TEMP[9] 39: LRP OUT[0].xyz, IN[0].xxxx, CONST[8], TEMP[9] 40: MUL TEMP[3], TEMP[3], TEMP[5] 41: MUL TEMP[3], TEMP[3], TEMP[1] 42: DP3 TEMP[3].x, TEMP[3], IMM[1] 43: CMP OUT[0].w, TEMP[4].xxxx, IMM[2].xxxx, TEMP[3].xxxx 44: END Fragment Program: before compilation # Radeon Compiler Program 0: DP3 temp[0].x, input[7], input[7]; 1: RSQ temp[0].x, temp[0].xxxx; 2: MUL temp[0], temp[0].xxxx, input[7]; 3: DP3 temp[1].x, input[1], input[1]; 4: RSQ temp[1].x, temp[1].xxxx; 5: MUL temp[1], temp[1].xxxx, input[1]; 6: TEX temp[2], input[2], 2D[1]; 7: MOV temp[2].x, temp[2].wwww; 8: MAD temp[2], temp[2], const[9].xxxx, const[9].yyyy; 9: MOV temp[2].z, const[10].wwww; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[11].xxxx, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: MOV temp[4], temp[1].zzzz; 15: TEX temp[5], input[5], 2D[2]; 16: MOV temp[6], temp[5]; 17: DP3 temp[7].x, temp[1], -temp[2]; 18: MUL temp[7].x, temp[7].xxxx, temp[5].wwww; 19: MUL temp[7].x, temp[7].xxxx, const[4].wwww; 20: DP3 temp[8].x, temp[1], temp[2]; 21: CMP temp[1].x, temp[4].xxxx, temp[7].xxxx, temp[8].xxxx; 22: TXP temp[3], input[4], 2D[3]; 23: MUL temp[1], temp[1].xxxx, temp[3]; 24: TEX temp[3].x, input[3], 2D[4]; 25: MUL temp[1], temp[1], temp[3].xxxx; 26: MUL temp[9], temp[5], const[5]; 27: MUL temp[3].xyz, temp[9], const[4]; 28: CMP temp[9].xyz, temp[4].xxxx, temp[3], temp[9]; 29: DP3 temp[0].x, temp[0], temp[2]; 30: MAD_SAT temp[3].x, temp[0].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[3].x, temp[3].xxxx, temp[3].xxxx; 32: MUL temp[3], temp[3].xxxx, const[6]; 33: CMP temp[3], temp[4].xxxx, const[10].wwww, temp[3]; 34: TEX temp[5], input[6], 2D[5]; 35: ADD temp[5], temp[5], temp[5]; 36: MAD temp[9], temp[3], temp[5], temp[9]; 37: MUL temp[9], temp[1], temp[9]; 38: MAD temp[9], temp[6], const[7], temp[9]; 39: LRP output[0].xyz, input[0].xxxx, const[8], temp[9]; 40: MUL temp[3], temp[3], temp[5]; 41: MUL temp[3], temp[3], temp[1]; 42: DP3 temp[3].x, temp[3], const[10]; 43: CMP output[0].w, temp[4].xxxx, const[11].xxxx, temp[3].xxxx; Fragment Program: after emulate loops # Radeon Compiler Program 0: DP3 temp[0].x, input[7], input[7]; 1: RSQ temp[0].x, temp[0].xxxx; 2: MUL temp[0], temp[0].xxxx, input[7]; 3: DP3 temp[1].x, input[1], input[1]; 4: RSQ temp[1].x, temp[1].xxxx; 5: MUL temp[1], temp[1].xxxx, input[1]; 6: TEX temp[2], input[2], 2D[1]; 7: MOV temp[2].x, temp[2].wwww; 8: MAD temp[2], temp[2], const[9].xxxx, const[9].yyyy; 9: MOV temp[2].z, const[10].wwww; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[11].xxxx, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: MOV temp[4], temp[1].zzzz; 15: TEX temp[5], input[5], 2D[2]; 16: MOV temp[6], temp[5]; 17: DP3 temp[7].x, temp[1], -temp[2]; 18: MUL temp[7].x, temp[7].xxxx, temp[5].wwww; 19: MUL temp[7].x, temp[7].xxxx, const[4].wwww; 20: DP3 temp[8].x, temp[1], temp[2]; 21: CMP temp[1].x, temp[4].xxxx, temp[7].xxxx, temp[8].xxxx; 22: TXP temp[3], input[4], 2D[3]; 23: MUL temp[1], temp[1].xxxx, temp[3]; 24: TEX temp[3].x, input[3], 2D[4]; 25: MUL temp[1], temp[1], temp[3].xxxx; 26: MUL temp[9], temp[5], const[5]; 27: MUL temp[3].xyz, temp[9], const[4]; 28: CMP temp[9].xyz, temp[4].xxxx, temp[3], temp[9]; 29: DP3 temp[0].x, temp[0], temp[2]; 30: MAD_SAT temp[3].x, temp[0].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[3].x, temp[3].xxxx, temp[3].xxxx; 32: MUL temp[3], temp[3].xxxx, const[6]; 33: CMP temp[3], temp[4].xxxx, const[10].wwww, temp[3]; 34: TEX temp[5], input[6], 2D[5]; 35: ADD temp[5], temp[5], temp[5]; 36: MAD temp[9], temp[3], temp[5], temp[9]; 37: MUL temp[9], temp[1], temp[9]; 38: MAD temp[9], temp[6], const[7], temp[9]; 39: LRP output[0].xyz, input[0].xxxx, const[8], temp[9]; 40: MUL temp[3], temp[3], temp[5]; 41: MUL temp[3], temp[3], temp[1]; 42: DP3 temp[3].x, temp[3], const[10]; 43: CMP output[0].w, temp[4].xxxx, const[11].xxxx, temp[3].xxxx; Fragment Program: after emulate branches # Radeon Compiler Program 0: DP3 temp[0].x, input[7], input[7]; 1: RSQ temp[0].x, temp[0].xxxx; 2: MUL temp[0], temp[0].xxxx, input[7]; 3: DP3 temp[1].x, input[1], input[1]; 4: RSQ temp[1].x, temp[1].xxxx; 5: MUL temp[1], temp[1].xxxx, input[1]; 6: TEX temp[2], input[2], 2D[1]; 7: MOV temp[2].x, temp[2].wwww; 8: MAD temp[2], temp[2], const[9].xxxx, const[9].yyyy; 9: MOV temp[2].z, const[10].wwww; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[11].xxxx, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: MOV temp[4], temp[1].zzzz; 15: TEX temp[5], input[5], 2D[2]; 16: MOV temp[6], temp[5]; 17: DP3 temp[7].x, temp[1], -temp[2]; 18: MUL temp[7].x, temp[7].xxxx, temp[5].wwww; 19: MUL temp[7].x, temp[7].xxxx, const[4].wwww; 20: DP3 temp[8].x, temp[1], temp[2]; 21: CMP temp[1].x, temp[4].xxxx, temp[7].xxxx, temp[8].xxxx; 22: TXP temp[3], input[4], 2D[3]; 23: MUL temp[1], temp[1].xxxx, temp[3]; 24: TEX temp[3].x, input[3], 2D[4]; 25: MUL temp[1], temp[1], temp[3].xxxx; 26: MUL temp[9], temp[5], const[5]; 27: MUL temp[3].xyz, temp[9], const[4]; 28: CMP temp[9].xyz, temp[4].xxxx, temp[3], temp[9]; 29: DP3 temp[0].x, temp[0], temp[2]; 30: MAD_SAT temp[3].x, temp[0].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[3].x, temp[3].xxxx, temp[3].xxxx; 32: MUL temp[3], temp[3].xxxx, const[6]; 33: CMP temp[3], temp[4].xxxx, const[10].wwww, temp[3]; 34: TEX temp[5], input[6], 2D[5]; 35: ADD temp[5], temp[5], temp[5]; 36: MAD temp[9], temp[3], temp[5], temp[9]; 37: MUL temp[9], temp[1], temp[9]; 38: MAD temp[9], temp[6], const[7], temp[9]; 39: LRP output[0].xyz, input[0].xxxx, const[8], temp[9]; 40: MUL temp[3], temp[3], temp[5]; 41: MUL temp[3], temp[3], temp[1]; 42: DP3 temp[3].x, temp[3], const[10]; 43: CMP output[0].w, temp[4].xxxx, const[11].xxxx, temp[3].xxxx; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: DP3 temp[0].x, input[7], input[7]; 1: RSQ temp[0].x, |temp[0].xxxx|; 2: MUL temp[0], temp[0].xxxx, input[7]; 3: DP3 temp[1].x, input[1], input[1]; 4: RSQ temp[1].x, |temp[1].xxxx|; 5: MUL temp[1], temp[1].xxxx, input[1]; 6: TEX temp[2], input[2], 2D[1]; 7: MOV temp[2].x, temp[2].wwww; 8: MAD temp[2], temp[2], const[9].xxxx, const[9].yyyy; 9: MOV temp[2].z, const[10].wwww; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[11].xxxx, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: MOV temp[4], temp[1].zzzz; 15: TEX temp[5], input[5], 2D[2]; 16: MOV temp[6], temp[5]; 17: DP3 temp[7].x, temp[1], -temp[2]; 18: MUL temp[7].x, temp[7].xxxx, temp[5].wwww; 19: MUL temp[7].x, temp[7].xxxx, const[4].wwww; 20: DP3 temp[8].x, temp[1], temp[2]; 21: CMP temp[1].x, temp[4].xxxx, temp[7].xxxx, temp[8].xxxx; 22: TXP temp[3], input[4], 2D[3]; 23: MUL temp[1], temp[1].xxxx, temp[3]; 24: TEX temp[3].x, input[3], 2D[4]; 25: MUL temp[1], temp[1], temp[3].xxxx; 26: MUL temp[9], temp[5], const[5]; 27: MUL temp[3].xyz, temp[9], const[4]; 28: CMP temp[9].xyz, temp[4].xxxx, temp[3], temp[9]; 29: DP3 temp[0].x, temp[0], temp[2]; 30: MAD_SAT temp[3].x, temp[0].xxxx, const[11].yyyy, -const[11].zzzz; 31: MUL temp[3].x, temp[3].xxxx, temp[3].xxxx; 32: MUL temp[3], temp[3].xxxx, const[6]; 33: CMP temp[3], temp[4].xxxx, const[10].wwww, temp[3]; 34: TEX temp[5], input[6], 2D[5]; 35: ADD temp[5], temp[5], temp[5]; 36: MAD temp[9], temp[3], temp[5], temp[9]; 37: MUL temp[9], temp[1], temp[9]; 38: MAD temp[9], temp[6], const[7], temp[9]; 39: ADD temp[10], const[8], -temp[9]; 40: MAD output[0].xyz, input[0].xxxx, temp[10], temp[9]; 41: MUL temp[3], temp[3], temp[5]; 42: MUL temp[3], temp[3], temp[1]; 43: DP3 temp[3].x, temp[3], const[10]; 44: CMP output[0].w, temp[4].xxxx, const[11].xxxx, temp[3].xxxx; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: DP3 temp[0].x, input[7], input[7]; 1: RSQ temp[0].x, |temp[0].xxxx|; 2: MUL temp[0], temp[0].xxxx, input[7]; 3: DP3 temp[1].x, input[1], input[1]; 4: RSQ temp[1].x, |temp[1].xxxx|; 5: MUL temp[1], temp[1].xxxx, input[1]; 6: TEX temp[2], input[2], 2D[1]; 7: MOV temp[2].x, temp[2].wwww; 8: MAD temp[2], temp[2], const[9].xxxx, const[9].yyyy; 9: MOV temp[2].z, const[10].wwww; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[11].xxxx, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: MOV temp[4], temp[1].zzzz; 15: TEX temp[5], input[5], 2D[2]; 16: MOV temp[6], temp[5]; 17: DP3 temp[7].x, temp[1], -temp[2]; 18: MUL temp[7].x, temp[7].xxxx, temp[5].wwww; 19: MUL temp[7].x, temp[7].xxxx, const[4].wwww; 20: DP3 temp[8].x, temp[1], temp[2]; 21: CMP temp[1].x, temp[4].xxxx, temp[7].xxxx, temp[8].xxxx; 22: TXP temp[3], input[4], 2D[3]; 23: MUL temp[1], temp[1].xxxx, temp[3]; 24: TEX temp[11], input[3], 2D[4]; 25: MOV temp[3].x, temp[11]; 26: MUL temp[1], temp[1], temp[3].xxxx; 27: MUL temp[9], temp[5], const[5]; 28: MUL temp[3].xyz, temp[9], const[4]; 29: CMP temp[9].xyz, temp[4].xxxx, temp[3], temp[9]; 30: DP3 temp[0].x, temp[0], temp[2]; 31: MAD_SAT temp[3].x, temp[0].xxxx, const[11].yyyy, -const[11].zzzz; 32: MUL temp[3].x, temp[3].xxxx, temp[3].xxxx; 33: MUL temp[3], temp[3].xxxx, const[6]; 34: CMP temp[3], temp[4].xxxx, const[10].wwww, temp[3]; 35: TEX temp[5], input[6], 2D[5]; 36: ADD temp[5], temp[5], temp[5]; 37: MAD temp[9], temp[3], temp[5], temp[9]; 38: MUL temp[9], temp[1], temp[9]; 39: MAD temp[9], temp[6], const[7], temp[9]; 40: ADD temp[10], const[8], -temp[9]; 41: MAD output[0].xyz, input[0].xxxx, temp[10], temp[9]; 42: MUL temp[3], temp[3], temp[5]; 43: MUL temp[3], temp[3], temp[1]; 44: DP3 temp[3].x, temp[3], const[10]; 45: CMP output[0].w, temp[4].xxxx, const[11].xxxx, temp[3].xxxx; Fragment Program: after deadcode # Radeon Compiler Program 0: DP3 temp[0].x, input[7].xyz_, input[7].xyz_; 1: RSQ temp[0].x, |temp[0].x___|; 2: MUL temp[0].xyz, temp[0].xxx_, input[7].xyz_; 3: DP3 temp[1].x, input[1].xyz_, input[1].xyz_; 4: RSQ temp[1].x, |temp[1].x___|; 5: MUL temp[1].xyz, temp[1].xxx_, input[1].xyz_; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: MOV temp[2].x, temp[2].w___; 8: MAD temp[2].xy, temp[2].xy__, const[9].xx__, const[9].yy__; 9: MOV temp[2].z, const[10].__w_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, const[11].x___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: MOV temp[4].x, temp[1].z___; 15: TEX temp[5], input[5].xy__, 2D[2]; 16: MOV temp[6].xyz, temp[5].xyz_; 17: DP3 temp[7].x, temp[1].xyz_, -temp[2].xyz_; 18: MUL temp[7].x, temp[7].x___, temp[5].w___; 19: MUL temp[7].x, temp[7].x___, const[4].w___; 20: DP3 temp[8].x, temp[1].xyz_, temp[2].xyz_; 21: CMP temp[1].x, temp[4].x___, temp[7].x___, temp[8].x___; 22: TXP temp[3].xyz, input[4].xy_w, 2D[3]; 23: MUL temp[1].xyz, temp[1].xxx_, temp[3].xyz_; 24: TEX temp[11].x, input[3].xy__, 2D[4]; 25: MOV temp[3].x, temp[11].x___; 26: MUL temp[1].xyz, temp[1].xyz_, temp[3].xxx_; 27: MUL temp[9].xyz, temp[5].xyz_, const[5].xyz_; 28: MUL temp[3].xyz, temp[9].xyz_, const[4].xyz_; 29: CMP temp[9].xyz, temp[4].xxx_, temp[3].xyz_, temp[9].xyz_; 30: DP3 temp[0].x, temp[0].xyz_, temp[2].xyz_; 31: MAD_SAT temp[3].x, temp[0].x___, const[11].y___, -const[11].z___; 32: MUL temp[3].x, temp[3].x___, temp[3].x___; 33: MUL temp[3].xyz, temp[3].xxx_, const[6].xyz_; 34: CMP temp[3].xyz, temp[4].xxx_, const[10].www_, temp[3].xyz_; 35: TEX temp[5].xyz, input[6].xy__, 2D[5]; 36: ADD temp[5].xyz, temp[5].xyz_, temp[5].xyz_; 37: MAD temp[9].xyz, temp[3].xyz_, temp[5].xyz_, temp[9].xyz_; 38: MUL temp[9].xyz, temp[1].xyz_, temp[9].xyz_; 39: MAD temp[9].xyz, temp[6].xyz_, const[7].xyz_, temp[9].xyz_; 40: ADD temp[10].xyz, const[8].xyz_, -temp[9].xyz_; 41: MAD output[0].xyz, input[0].xxx_, temp[10].xyz_, temp[9].xyz_; 42: MUL temp[3].xyz, temp[3].xyz_, temp[5].xyz_; 43: MUL temp[3].xyz, temp[3].xyz_, temp[1].xyz_; 44: DP3 temp[3].x, temp[3].xyz_, const[10].xyz_; 45: CMP output[0].w, temp[4].___x, const[11].___x, temp[3].___x; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: DP3 temp[0].x, input[7].xyz_, input[7].xyz_; 1: RSQ temp[0].x, |temp[0].x___|; 2: MUL temp[0].xyz, temp[0].xxx_, input[7].xyz_; 3: DP3 temp[1].x, input[1].xyz_, input[1].xyz_; 4: RSQ temp[1].x, |temp[1].x___|; 5: MUL temp[1].xyz, temp[1].xxx_, input[1].xyz_; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: MOV temp[2].x, temp[2].w___; 8: MAD temp[2].xy, temp[2].xy__, const[9].xx__, none.-1-1__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: MOV temp[4].x, temp[1].z___; 15: TEX temp[5], input[5].xy__, 2D[2]; 16: MOV temp[6].xyz, temp[5].xyz_; 17: DP3 temp[7].x, temp[1].xyz_, -temp[2].xyz_; 18: MUL temp[7].x, temp[7].x___, temp[5].w___; 19: MUL temp[7].x, temp[7].x___, const[4].w___; 20: DP3 temp[8].x, temp[1].xyz_, temp[2].xyz_; 21: CMP temp[1].x, temp[4].x___, temp[7].x___, temp[8].x___; 22: TXP temp[3].xyz, input[4].xy_w, 2D[3]; 23: MUL temp[1].xyz, temp[1].xxx_, temp[3].xyz_; 24: TEX temp[11].x, input[3].xy__, 2D[4]; 25: MUL temp[1].xyz, temp[1].xyz_, temp[11].xxx_; 26: MUL temp[9].xyz, temp[5].xyz_, const[5].xyz_; 27: MUL temp[3].xyz, temp[9].xyz_, const[4].xyz_; 28: CMP temp[9].xyz, temp[4].xxx_, temp[3].xyz_, temp[9].xyz_; 29: DP3 temp[0].x, temp[0].xyz_, temp[2].xyz_; 30: MAD_SAT temp[3].x, temp[0].x___, const[11].y___, -const[11].z___; 31: MUL temp[3].x, temp[3].x___, temp[3].x___; 32: MUL temp[3].xyz, temp[3].xxx_, const[6].xyz_; 33: CMP temp[3].xyz, temp[4].xxx_, none.000_, temp[3].xyz_; 34: TEX temp[5].xyz, input[6].xy__, 2D[5]; 35: ADD temp[5].xyz, temp[5].xyz_, temp[5].xyz_; 36: MAD temp[9].xyz, temp[3].xyz_, temp[5].xyz_, temp[9].xyz_; 37: MUL temp[9].xyz, temp[1].xyz_, temp[9].xyz_; 38: MAD temp[9].xyz, temp[6].xyz_, const[7].xyz_, temp[9].xyz_; 39: ADD temp[10].xyz, const[8].xyz_, -temp[9].xyz_; 40: MAD output[0].xyz, input[0].xxx_, temp[10].xyz_, temp[9].xyz_; 41: MUL temp[3].xyz, temp[3].xyz_, temp[5].xyz_; 42: MUL temp[3].xyz, temp[3].xyz_, temp[1].xyz_; 43: DP3 temp[3].x, temp[3].xyz_, const[10].xyz_; 44: CMP output[0].w, temp[4].___x, none.___1, temp[3].___x; Fragment Program: after dataflow passes # Radeon Compiler Program 0: DP3 temp[0].x, input[7].xyz_, input[7].xyz_; 1: RSQ temp[0].x, |temp[0].x___|; 2: MUL temp[0].xyz, temp[0].xxx_, input[7].xyz_; 3: DP3 temp[1].x, input[1].xyz_, input[1].xyz_; 4: RSQ temp[1].x, |temp[1].x___|; 5: MUL temp[1].xyz, temp[1].xxx_, input[1].xyz_; 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: MOV temp[2].x, temp[2].w___; 8: MAD temp[2].xy, temp[2].xy__, const[9].xx__, none.-1-1__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: MOV temp[4].x, temp[1].z___; 15: TEX temp[5], input[5].xy__, 2D[2]; 16: MOV temp[6].xyz, temp[5].xyz_; 17: DP3 temp[7].x, temp[1].xyz_, -temp[2].xyz_; 18: MUL temp[7].x, temp[7].x___, temp[5].w___; 19: MUL temp[7].x, temp[7].x___, const[4].w___; 20: DP3 temp[8].x, temp[1].xyz_, temp[2].xyz_; 21: CMP temp[1].x, temp[4].x___, temp[7].x___, temp[8].x___; 22: TXP temp[3].xyz, input[4].xy_w, 2D[3]; 23: MUL temp[1].xyz, temp[1].xxx_, temp[3].xyz_; 24: TEX temp[11].x, input[3].xy__, 2D[4]; 25: MUL temp[1].xyz, temp[1].xyz_, temp[11].xxx_; 26: MUL temp[9].xyz, temp[5].xyz_, const[5].xyz_; 27: MUL temp[3].xyz, temp[9].xyz_, const[4].xyz_; 28: CMP temp[9].xyz, temp[4].xxx_, temp[3].xyz_, temp[9].xyz_; 29: DP3 temp[0].x, temp[0].xyz_, temp[2].xyz_; 30: MAD_SAT temp[3].x, temp[0].x___, const[11].y___, -const[11].z___; 31: MUL temp[3].x, temp[3].x___, temp[3].x___; 32: MUL temp[3].xyz, temp[3].xxx_, const[6].xyz_; 33: CMP temp[3].xyz, temp[4].xxx_, none.000_, temp[3].xyz_; 34: TEX temp[5].xyz, input[6].xy__, 2D[5]; 35: ADD temp[5].xyz, temp[5].xyz_, temp[5].xyz_; 36: MAD temp[9].xyz, temp[3].xyz_, temp[5].xyz_, temp[9].xyz_; 37: MUL temp[9].xyz, temp[1].xyz_, temp[9].xyz_; 38: MAD temp[9].xyz, temp[6].xyz_, const[7].xyz_, temp[9].xyz_; 39: ADD temp[10].xyz, const[8].xyz_, -temp[9].xyz_; 40: MAD output[0].xyz, input[0].xxx_, temp[10].xyz_, temp[9].xyz_; 41: MUL temp[3].xyz, temp[3].xyz_, temp[5].xyz_; 42: MUL temp[3].xyz, temp[3].xyz_, temp[1].xyz_; 43: DP3 temp[3].x, temp[3].xyz_, const[10].xyz_; 44: CMP output[0].w, temp[4].___x, none.___1, temp[3].___x; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.xyz = input[7] DP3 temp[0].x, src0.xyz, src0.xyz 1: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 2: src0.xyz = temp[0], src1.xyz = input[7] MAD temp[0].xyz, src0.xxx, src1.xyz, src0.000 3: src0.xyz = input[1] DP3 temp[1].x, src0.xyz, src0.xyz 4: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 5: src0.xyz = temp[1], src1.xyz = input[1] MAD temp[1].xyz, src0.xxx, src1.xyz, src0.000 6: TEX temp[2].yw, input[2].xy__, 2D[1]; 7: src0.w = temp[2] MAD temp[2].x, src0.w__, src0.111, src0.000 8: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 9: MAD temp[2].z, src0.__0, src0.111, src0.000 10: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 11: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 12: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 13: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 14: src0.xyz = temp[1] MAD temp[4].x, src0.z__, src0.111, src0.000 15: TEX temp[5], input[5].xy__, 2D[2]; 16: src0.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src0.111, src0.000 17: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[7].x, src0.xyz, -src1.xyz 18: src0.xyz = temp[7], src0.w = temp[5] MAD temp[7].x, src0.x__, src0.w__, src0.000 19: src0.xyz = temp[7], src0.w = const[4] MAD temp[7].x, src0.x__, src0.w__, src0.000 20: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[8].x, src0.xyz, src1.xyz 21: src0.xyz = temp[8], src1.xyz = temp[7], src2.xyz = temp[4] CMP temp[1].x, src0.x__, src1.x__, src2.x__ 22: TXP temp[3].xyz, input[4].xy_w, 2D[3]; 23: src0.xyz = temp[1], src1.xyz = temp[3] MAD temp[1].xyz, src0.xxx, src1.xyz, src0.000 24: TEX temp[11].x, input[3].xy__, 2D[4]; 25: src0.xyz = temp[1], src1.xyz = temp[11] MAD temp[1].xyz, src0.xyz, src1.xxx, src0.000 26: src0.xyz = temp[5], src1.xyz = const[5] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 27: src0.xyz = temp[9], src1.xyz = const[4] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 28: src0.xyz = temp[9], src1.xyz = temp[3], src2.xyz = temp[4] CMP temp[9].xyz, src0.xyz, src1.xyz, src2.xxx 29: src0.xyz = temp[0], src1.xyz = temp[2] DP3 temp[0].x, src0.xyz, src1.xyz 30: src0.xyz = temp[0], src1.xyz = const[11] MAD_SAT temp[3].x, src0.x__, src1.y__, -src1.z__ 31: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.x__, src0.000 32: src0.xyz = temp[3], src1.xyz = const[6] MAD temp[3].xyz, src0.xxx, src1.xyz, src0.000 33: src0.xyz = temp[3], src1.xyz = temp[4] CMP temp[3].xyz, src0.xyz, src0.000, src1.xxx 34: TEX temp[5].xyz, input[6].xy__, 2D[5]; 35: src0.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src0.111, src0.xyz 36: src0.xyz = temp[3], src1.xyz = temp[5], src2.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src2.xyz 37: src0.xyz = temp[1], src1.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 38: src0.xyz = temp[6], src1.xyz = const[7], src2.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src2.xyz 39: src0.xyz = const[8], src1.xyz = temp[9] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz 40: src0.xyz = input[0], src1.xyz = temp[10], src2.xyz = temp[9] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 41: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 42: src0.xyz = temp[3], src1.xyz = temp[1] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 43: src0.xyz = temp[3], src1.xyz = const[10] DP3 temp[3].x, src0.xyz, src1.xyz 44: src0.xyz = temp[3], src1.xyz = temp[4] CMP color[0].w, src0.x, src0.1, src1.x Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[11].x, input[3].xy__, 2D[4]; 2: TEX temp[5], input[5].xy__, 2D[2]; 3: TEX temp[2].yw, input[2].xy__, 2D[1]; 4: src0.w = temp[2] MAD temp[2].x, src0.w__, src0.111, src0.000 5: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 6: src0.xyz = temp[5] MAD temp[6].xyz, src0.xyz, src0.111, src0.000 7: src0.xyz = temp[5], src1.xyz = const[5] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 8: MAD temp[2].z, src0.__0, src0.111, src0.000 9: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 10: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 11: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 12: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 13: src0.xyz = input[1] DP3 temp[1].x, src0.xyz, src0.xyz 14: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 15: src0.xyz = temp[1], src1.xyz = input[1] MAD temp[1].xyz, src0.xxx, src1.xyz, src0.000 16: src0.xyz = temp[1] MAD temp[4].x, src0.z__, src0.111, src0.000 17: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[7].x, src0.xyz, -src1.xyz 18: src0.xyz = temp[7], src0.w = temp[5] MAD temp[7].x, src0.x__, src0.w__, src0.000 19: src0.xyz = temp[7], src0.w = const[4] MAD temp[7].x, src0.x__, src0.w__, src0.000 20: src0.xyz = temp[1], src1.xyz = temp[2] DP3 temp[8].x, src0.xyz, src1.xyz 21: src0.xyz = temp[8], src1.xyz = temp[7], src2.xyz = temp[4] CMP temp[1].x, src0.x__, src1.x__, src2.x__ 22: src0.xyz = input[7] DP3 temp[0].x, src0.xyz, src0.xyz 23: src0.xyz = temp[0] REPL_ALPHA temp[0].x RSQ, |src0.x| 24: src0.xyz = temp[0], src1.xyz = input[7] MAD temp[0].xyz, src0.xxx, src1.xyz, src0.000 25: src0.xyz = temp[0], src1.xyz = temp[2] DP3 temp[0].x, src0.xyz, src1.xyz 26: BEGIN_TEX; 27: TXP temp[3].xyz, input[4].xy_w, 2D[3]; 28: TEX temp[5].xyz, input[6].xy__, 2D[5]; 29: src0.xyz = temp[5] MAD temp[5].xyz, src0.xyz, src0.111, src0.xyz 30: src0.xyz = temp[1], src1.xyz = temp[3] MAD temp[1].xyz, src0.xxx, src1.xyz, src0.000 31: src0.xyz = temp[1], src1.xyz = temp[11] MAD temp[1].xyz, src0.xyz, src1.xxx, src0.000 32: src0.xyz = temp[9], src1.xyz = const[4] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 33: src0.xyz = temp[9], src1.xyz = temp[3], src2.xyz = temp[4] CMP temp[9].xyz, src0.xyz, src1.xyz, src2.xxx 34: src0.xyz = temp[0], src1.xyz = const[11] MAD_SAT temp[3].x, src0.x__, src1.y__, -src1.z__ 35: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.x__, src0.000 36: src0.xyz = temp[3], src1.xyz = const[6] MAD temp[3].xyz, src0.xxx, src1.xyz, src0.000 37: src0.xyz = temp[3], src1.xyz = temp[4] CMP temp[3].xyz, src0.xyz, src0.000, src1.xxx 38: src0.xyz = temp[3], src1.xyz = temp[5], src2.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src2.xyz 39: src0.xyz = temp[1], src1.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[6], src1.xyz = const[7], src2.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src1.xyz, src2.xyz 41: src0.xyz = const[8], src1.xyz = temp[9] MAD temp[10].xyz, src0.xyz, src0.111, -src1.xyz 42: src0.xyz = input[0], src1.xyz = temp[10], src2.xyz = temp[9] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 43: src0.xyz = temp[3], src1.xyz = temp[5] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 44: src0.xyz = temp[3], src1.xyz = temp[1] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 45: src0.xyz = temp[3], src1.xyz = const[10] DP3 temp[3].x, src0.xyz, src1.xyz 46: src0.xyz = temp[3], src1.xyz = temp[4] CMP color[0].w, src0.x, src0.1, src1.x Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[13].x, temp[3].xy__, 2D[4]; 2: TEX temp[9], temp[5].xy__, 2D[2]; 3: TEX temp[3].yw, temp[2].xy__, 2D[1]; 4: src0.w = temp[3] MAD temp[3].x, src0.w__, src0.111, src0.000 5: src0.xyz = temp[3], src1.xyz = const[9] MAD temp[3].xy, src0.xy_, src1.xx_, -src0.11_ 6: src0.xyz = temp[9] MAD temp[10].xyz, src0.xyz, src0.111, src0.000 7: src0.xyz = temp[9], src1.xyz = const[5] MAD temp[12].xyz, src0.xyz, src1.xyz, src0.000 8: MAD temp[3].z, src0.__0, src0.111, src0.000 9: src0.xyz = temp[3] DP3 temp[5].x, src0.xyz, src0.xyz 10: src0.xyz = temp[5] MAD temp[5].x, src0.1__, src0.111, -src0.x__ 11: src0.xyz = temp[5] REPL_ALPHA temp[5].x RSQ, |src0.x| 12: src0.xyz = temp[5] REPL_ALPHA temp[3].z RCP, src0.x 13: src0.xyz = temp[1] DP3 temp[2].x, src0.xyz, src0.xyz 14: src0.xyz = temp[2] REPL_ALPHA temp[2].x RSQ, |src0.x| 15: src0.xyz = temp[2], src1.xyz = temp[1] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 16: src0.xyz = temp[2] MAD temp[8].x, src0.z__, src0.111, src0.000 17: src0.xyz = temp[2], src1.xyz = temp[3] DP3 temp[1].x, src0.xyz, -src1.xyz 18: src0.xyz = temp[1], src0.w = temp[9] MAD temp[1].x, src0.x__, src0.w__, src0.000 19: src0.xyz = temp[1], src0.w = const[4] MAD temp[1].x, src0.x__, src0.w__, src0.000 20: src0.xyz = temp[2], src1.xyz = temp[3] DP3 temp[11].x, src0.xyz, src1.xyz 21: src0.xyz = temp[11], src1.xyz = temp[1], src2.xyz = temp[8] CMP temp[2].x, src0.x__, src1.x__, src2.x__ 22: src0.xyz = temp[7] DP3 temp[1].x, src0.xyz, src0.xyz 23: src0.xyz = temp[1] REPL_ALPHA temp[1].x RSQ, |src0.x| 24: src0.xyz = temp[1], src1.xyz = temp[7] MAD temp[1].xyz, src0.xxx, src1.xyz, src0.000 25: src0.xyz = temp[1], src1.xyz = temp[3] DP3 temp[1].x, src0.xyz, src1.xyz 26: BEGIN_TEX; 27: TXP temp[5].xyz, temp[4].xy_w, 2D[3]; 28: TEX temp[9].xyz, temp[6].xy__, 2D[5]; 29: src0.xyz = temp[9] MAD temp[9].xyz, src0.xyz, src0.111, src0.xyz 30: src0.xyz = temp[2], src1.xyz = temp[5] MAD temp[2].xyz, src0.xxx, src1.xyz, src0.000 31: src0.xyz = temp[2], src1.xyz = temp[13] MAD temp[2].xyz, src0.xyz, src1.xxx, src0.000 32: src0.xyz = temp[12], src1.xyz = const[4] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 33: src0.xyz = temp[12], src1.xyz = temp[5], src2.xyz = temp[8] CMP temp[12].xyz, src0.xyz, src1.xyz, src2.xxx 34: src0.xyz = temp[1], src1.xyz = const[11] MAD_SAT temp[5].x, src0.x__, src1.y__, -src1.z__ 35: src0.xyz = temp[5] MAD temp[5].x, src0.x__, src0.x__, src0.000 36: src0.xyz = temp[5], src1.xyz = const[6] MAD temp[5].xyz, src0.xxx, src1.xyz, src0.000 37: src0.xyz = temp[5], src1.xyz = temp[8] CMP temp[5].xyz, src0.xyz, src0.000, src1.xxx 38: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[12] MAD temp[12].xyz, src0.xyz, src1.xyz, src2.xyz 39: src0.xyz = temp[2], src1.xyz = temp[12] MAD temp[12].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[10], src1.xyz = const[7], src2.xyz = temp[12] MAD temp[12].xyz, src0.xyz, src1.xyz, src2.xyz 41: src0.xyz = const[8], src1.xyz = temp[12] MAD temp[1].xyz, src0.xyz, src0.111, -src1.xyz 42: src0.xyz = temp[0], src1.xyz = temp[1], src2.xyz = temp[12] MAD color[0].xyz, src0.xxx, src1.xyz, src2.xyz 43: src0.xyz = temp[5], src1.xyz = temp[9] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 44: src0.xyz = temp[5], src1.xyz = temp[2] MAD temp[5].xyz, src0.xyz, src1.xyz, src0.000 45: src0.xyz = temp[5], src1.xyz = const[10] DP3 temp[5].x, src0.xyz, src1.xyz 46: src0.xyz = temp[5], src1.xyz = temp[8] CMP color[0].w, src0.x, src0.1, src1.x pc=50************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 21, tex_end: 2 (code_addr: 00040540) TEX: TEX t13, t3, texture[4] (0000a343) TEX t9, t5, texture[2] (00009245) TEX t3, t2, texture[1] (000088c2) 0: xyz: t0 t0 t0 -> t3.x (008c0000) w: t3 t0 t0 -> (00000003) xyz: t3.www 1.0 0.0 op: 00050a8c w: t0.x t0.x t0.x op: 00000000 1: xyz: t3 c9 t0 -> t3.xy (018c0a43) w: t0 t0 t0 -> (00000000) xyz: t3.xyz c9.xxx -1.0 op: 000d4280 w: t3.x t3.x t3.x op: 00000000 2: xyz: t9 t0 t0 -> t10.xyz (03a80009) w: t0 t0 t0 -> (00000000) xyz: t9.xyz 1.0 0.0 op: 00050a80 w: t9.x t9.x t9.x op: 00000000 3: xyz: t9 c5 t0 -> t12.xyz (03b00949) w: t0 t0 t0 -> (00000000) xyz: t9.xyz c5.xyz 0.0 op: 00050200 w: t9.x t9.x t9.x op: 00000000 4: xyz: t0 t0 t0 -> t3.z (020c0000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 5: xyz: t3 t0 t0 -> t5.x (00940003) w: t0 t0 t0 -> (00000000) xyz: t3.xyz t3.xyz t3.xxx op: 00804000 w: t3.x t3.x t3.x op: 00000000 6: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t5.xyz op: 00080a95 w: t5.x t5.x t5.x op: 00000000 7: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: |t5.x| t5.x t5.x op: 05800040 8: xyz: t5 t0 t0 -> t3.z (020c0005) w: t0 t0 t0 -> (00000000) xyz: t5.xxx t5.xxx t5.xxx op: 05004081 w: t5.x t5.x t5.x op: 05000000 9: xyz: t1 t0 t0 -> t2.x (00880001) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t1.xyz t1.xxx op: 00804000 w: t1.x t1.x t1.x op: 00000000 10: xyz: t2 t0 t0 -> t2.x (00880002) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t2.xxx t2.xxx op: 05004081 w: |t2.x| t2.x t2.x op: 05800040 11: xyz: t2 t1 t0 -> t2.xyz (03880042) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t1.xyz 0.0 op: 00050201 w: t2.x t2.x t2.x op: 00000000 12: xyz: t2 t0 t0 -> t8.x (00a00002) w: t0 t0 t0 -> (00000000) xyz: t2.zzz 1.0 0.0 op: 00050a83 w: t2.x t2.x t2.x op: 00000000 13: xyz: t2 t3 t0 -> t1.x (008400c2) w: t0 t0 t0 -> (00000000) xyz: t2.xyz -t3.xyz t2.xxx op: 00805200 w: t2.x t2.x t2.x op: 00000000 14: xyz: t1 t0 t0 -> t1.x (00840001) w: t9 t0 t0 -> (00000009) xyz: t1.xyz t9.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 15: xyz: t1 t0 t0 -> t1.x (00840001) w: c4 t0 t0 -> (00000024) xyz: t1.xyz c4.www 0.0 op: 00050600 w: t1.x t1.x t1.x op: 00000000 16: xyz: t2 t3 t0 -> t11.x (00ac00c2) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t3.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 17: xyz: t11 t1 t8 -> t2.x (0088804b) w: t0 t0 t0 -> (00000000) xyz: t11.xyz t1.xyz t8.xyz op: 04020200 w: t11.x t11.x t11.x op: 00000000 18: xyz: t7 t0 t0 -> t1.x (00840007) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t7.xyz t7.xxx op: 00804000 w: t7.x t7.x t7.x op: 00000000 19: xyz: t1 t0 t0 -> t1.x (00840001) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t1.xxx t1.xxx op: 05004081 w: |t1.x| t1.x t1.x op: 05800040 20: xyz: t1 t7 t0 -> t1.xyz (038401c1) w: t0 t0 t0 -> (00000000) xyz: t1.xxx t7.xyz 0.0 op: 00050201 w: t1.x t1.x t1.x op: 00000000 21: xyz: t1 t3 t0 -> t1.x (008400c1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz t3.xyz t1.xxx op: 00804200 w: t1.x t1.x t1.x op: 00000000 NODE 1: alu_offset: 22, tex_offset: 3, alu_end: 17, tex_end: 1 (code_addr: 00423456) TEX: TXP t5, t4, texture[3] (00019944) TEX t9, t6, texture[5] (0000aa46) 22: xyz: t9 t0 t0 -> t9.xyz (03a40009) w: t0 t0 t0 -> (00000000) xyz: t9.xyz 1.0 t9.xyz op: 00000a80 w: t9.x t9.x t9.x op: 00000000 23: xyz: t2 t5 t0 -> t2.xyz (03880142) w: t0 t0 t0 -> (00000000) xyz: t2.xxx t5.xyz 0.0 op: 00050201 w: t2.x t2.x t2.x op: 00000000 24: xyz: t2 t13 t0 -> t2.xyz (03880342) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t13.xxx 0.0 op: 00050280 w: t2.x t2.x t2.x op: 00000000 25: xyz: t12 c4 t0 -> t5.xyz (0394090c) w: t0 t0 t0 -> (00000000) xyz: t12.xyz c4.xyz 0.0 op: 00050200 w: t12.x t12.x t12.x op: 00000000 26: xyz: t12 t5 t8 -> t12.xyz (03b0814c) w: t0 t0 t0 -> (00000000) xyz: t12.xyz t5.xyz t8.xxx op: 04024200 w: t12.x t12.x t12.x op: 00000000 27: xyz: t1 c11 t0 -> t5.x (00940ac1) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c11.yyy -c11.zzz op: 4009c300 w: t1.x t1.x t1.x op: 00000000 28: xyz: t5 t0 t0 -> t5.x (00940005) w: t0 t0 t0 -> (00000000) xyz: t5.xyz t5.xyz 0.0 op: 00050000 w: t5.x t5.x t5.x op: 00000000 29: xyz: t5 c6 t0 -> t5.xyz (03940985) w: t0 t0 t0 -> (00000000) xyz: t5.xxx c6.xyz 0.0 op: 00050201 w: t5.x t5.x t5.x op: 00000000 30: xyz: t5 t8 t0 -> t5.xyz (03940205) w: t0 t0 t0 -> (00000000) xyz: t5.xyz 0.0 t8.xxx op: 04014a00 w: t5.x t5.x t5.x op: 00000000 31: xyz: t5 t9 t12 -> t12.xyz (03b0c245) w: t0 t0 t0 -> (00000000) xyz: t5.xyz t9.xyz t12.xyz op: 00020200 w: t5.x t5.x t5.x op: 00000000 32: xyz: t2 t12 t0 -> t12.xyz (03b00302) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t12.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 33: xyz: t10 c7 t12 -> t12.xyz (03b0c9ca) w: t0 t0 t0 -> (00000000) xyz: t10.xyz c7.xyz t12.xyz op: 00020200 w: t10.x t10.x t10.x op: 00000000 34: xyz: c8 t12 t0 -> t1.xyz (03840328) w: t0 t0 t0 -> (00000000) xyz: c8.xyz 1.0 -t12.xyz op: 00090a80 w: c8.x c8.x c8.x op: 00000000 35: xyz: t0 t1 t12 -> o0.xyz (1c00c040) w: t0 t0 t0 -> (00000000) xyz: t0.xxx t1.xyz t12.xyz op: 00020201 w: t0.x t0.x t0.x op: 00000000 36: xyz: t5 t9 t0 -> t5.xyz (03940245) w: t0 t0 t0 -> (00000000) xyz: t5.xyz t9.xyz 0.0 op: 00050200 w: t5.x t5.x t5.x op: 00000000 37: xyz: t5 t2 t0 -> t5.xyz (03940085) w: t0 t0 t0 -> (00000000) xyz: t5.xyz t2.xyz 0.0 op: 00050200 w: t5.x t5.x t5.x op: 00000000 38: xyz: t5 c10 t0 -> t5.x (00940a85) w: t0 t0 t0 -> (00000000) xyz: t5.xyz c10.xyz t5.xxx op: 00804200 w: t5.x t5.x t5.x op: 00000000 39: xyz: t5 t8 t0 -> (00000205) w: t0 t0 t0 -> o0.w (01000000) xyz: t5.xxx t5.xxx t5.xxx op: 00004081 w: t5.x 1.0 t8.x op: 0300c880 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR, LINEAR DCL IN[2], GENERIC[0], 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[7..8] DCL CONST[1..6] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[8], IN[0] 2: TEX TEMP[1], IN[2], SAMP[0], 2D 3: MOV TEMP[1].x, TEMP[1].wwww 4: MAD TEMP[2], TEMP[1], IMM[0].xxxx, -IMM[0].yyyy 5: MUL TEMP[2].xy, TEMP[2], CONST[1].zzzz 6: MOV TEMP[2].z, IMM[0].zzzz 7: DP3 TEMP[3].x, TEMP[2], TEMP[2] 8: ADD TEMP[3].x, IMM[0].yyyy, -TEMP[3].xxxx 9: RSQ TEMP[3].x, TEMP[3].xxxx 10: RCP TEMP[2].z, TEMP[3].xxxx 11: TEX TEMP[4], IN[2], SAMP[1], 2D 12: DP3 TEMP[3].x, TEMP[2], IN[4] 13: DP3 TEMP[3].y, TEMP[2], IN[5] 14: DP3 TEMP[3].z, TEMP[2], IN[6] 15: MUL TEMP[5], CONST[1], CONST[2] 16: MAD TEMP[5], TEMP[5], TEMP[3], TEMP[0] 17: DP3 TEMP[6].w, IN[3], IN[3] 18: RSQ TEMP[6].w, TEMP[6].wwww 19: MUL TEMP[6], IN[3], TEMP[6].wwww 20: DP3 TEMP[2], TEMP[6], TEMP[3] 21: MUL TEMP[2], TEMP[2], IMM[0].xxxx 22: MAD TEMP[7], -TEMP[3], TEMP[2].xxxx, TEMP[6] 23: DP3_SAT TEMP[1], TEMP[7], CONST[3] 24: TEX TEMP[8], TEMP[1], SAMP[2], 2D 25: MUL TEMP[8], TEMP[8], CONST[4] 26: MUL TEMP[8], TEMP[8], CONST[5] 27: DP3 TEMP[3], -TEMP[6], TEMP[3] 28: ADD TEMP[3], TEMP[3], IMM[0].yyyy 29: POW TEMP[3], TEMP[3].xxxx, CONST[6].xxxx 30: RCP_SAT TEMP[9], TEMP[3].xxxx 31: TEX TEMP[3], TEMP[5], SAMP[3], RECT 32: MUL TEMP[3], TEMP[3], CONST[7] 33: TEX TEMP[2], TEMP[7], SAMP[4], CUBE 34: SUB TEMP[5], TEMP[2], TEMP[3] 35: MAD TEMP[5], TEMP[5], TEMP[9], TEMP[3] 36: ADD OUT[0], TEMP[5], TEMP[8] 37: MUL OUT[0].w, IN[1].wwww, TEMP[4].xxxx 38: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: ADD temp[0].y, const[8], -temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, |temp[6].wwww|; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: LG2 temp[11].w, temp[3].xxxx; 33: MUL temp[11].w, temp[11].wwww, const[6].xxxx; 34: EX2 temp[3], temp[11].wwww; 35: RCP_SAT temp[9], temp[3].xxxx; 36: TEX temp[3], temp[5], RECT[3]; 37: MUL temp[3], temp[3], const[7]; 38: TEX temp[2], temp[7], CUBE[4]; 39: ADD temp[5], temp[2], -temp[3]; 40: MAD temp[5], temp[5], temp[9], temp[3]; 41: ADD output[0], temp[5], temp[8]; 42: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: ADD temp[0].y, const[8], -temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, |temp[6].wwww|; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: MUL temp[12], temp[1], const[12]; 28: TEX temp[8], temp[12], 2D[2]; 29: MUL temp[8], temp[8], const[4]; 30: MUL temp[8], temp[8], const[5]; 31: DP3 temp[3], -temp[6], temp[3]; 32: ADD temp[3], temp[3], const[9].yyyy; 33: LG2 temp[11].w, temp[3].xxxx; 34: MUL temp[11].w, temp[11].wwww, const[6].xxxx; 35: EX2 temp[3], temp[11].wwww; 36: RCP_SAT temp[9], temp[3].xxxx; 37: MUL temp[13], temp[5], const[13]; 38: TEX temp[3], temp[13], 2D[3]; 39: MUL temp[3], temp[3], const[7]; 40: TEX temp[2], temp[7], CUBE[4]; 41: ADD temp[5], temp[2], -temp[3]; 42: MAD temp[5], temp[5], temp[9], temp[3]; 43: ADD output[0], temp[5], temp[8]; 44: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -const[9].yy__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, const[9].__z_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, const[9].y___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: MUL temp[12].xy, temp[1].xy__, const[12].xy__; 28: TEX temp[8].xyz, temp[12].xy__, 2D[2]; 29: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 30: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 31: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 32: ADD temp[3].x, temp[3].x___, const[9].y___; 33: LG2 temp[11].w, temp[3].x___; 34: MUL temp[11].w, temp[11].___w, const[6].___x; 35: EX2 temp[3].x, temp[11].w___; 36: RCP_SAT temp[9].xyz, temp[3].x___; 37: MUL temp[13].xy, temp[5].xy__, const[13].xy__; 38: TEX temp[3].xyz, temp[13].xy__, 2D[3]; 39: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 40: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 41: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 42: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 43: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 44: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -none.11__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: MUL temp[12].xy, temp[1].xy__, const[12].xy__; 28: TEX temp[8].xyz, temp[12].xy__, 2D[2]; 29: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 30: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 31: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 32: ADD temp[3].x, temp[3].x___, none.1___; 33: LG2 temp[11].w, temp[3].x___; 34: MUL temp[11].w, temp[11].___w, const[6].___x; 35: EX2 temp[3].x, temp[11].w___; 36: RCP_SAT temp[9].xyz, temp[3].x___; 37: MUL temp[13].xy, temp[5].xy__, const[13].xy__; 38: TEX temp[3].xyz, temp[13].xy__, 2D[3]; 39: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 40: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 41: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 42: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 43: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 44: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -none.11__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: MUL temp[12].xy, temp[1].xy__, const[12].xy__; 28: TEX temp[8].xyz, temp[12].xy__, 2D[2]; 29: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 30: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 31: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 32: ADD temp[3].x, temp[3].x___, none.1___; 33: LG2 temp[11].w, temp[3].x___; 34: MUL temp[11].w, temp[11].___w, const[6].___x; 35: EX2 temp[3].x, temp[11].w___; 36: RCP_SAT temp[9].xyz, temp[3].x___; 37: MUL temp[13].xy, temp[5].xy__, const[13].xy__; 38: TEX temp[3].xyz, temp[13].xy__, 2D[3]; 39: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 40: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 41: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 42: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 43: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 44: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[10].w, src0.w 1: src0.xyz = input[0], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[10], src1.xyz = const[10], src2.xyz = const[11] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[10] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[8], src1.xyz = temp[10] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: src0.w = temp[1] MAD temp[1].x, src0.w__, src0.111, src0.000 7: src0.xyz = temp[1], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 8: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 9: MAD temp[2].z, src0.__0, src0.111, src0.000 10: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 11: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 12: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 13: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: src0.xyz = temp[2], src1.xyz = input[4] DP3 temp[3].x, src0.xyz, src1.xyz 16: src0.xyz = temp[2], src1.xyz = input[5] DP3 temp[3].y, src0.xyz, src1.xyz 17: src0.xyz = temp[2], src1.xyz = input[6] DP3 temp[3].z, src0.xyz, src1.xyz 18: src0.xyz = const[1], src1.xyz = const[2] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 19: src0.xyz = temp[5], src1.xyz = temp[3], src2.xyz = temp[0] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 20: src0.xyz = input[3] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 21: src0.w = temp[6] RSQ temp[6].w, |src0.w| 22: src0.xyz = input[3], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 23: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[6] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[7], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[1], src1.xyz = const[12] MAD temp[12].xy, src0.xy_, src1.xy_, src0.000 28: TEX temp[8].xyz, temp[12].xy__, 2D[2]; 29: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[8], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 31: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[3].x, -src0.xyz, src1.xyz 32: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.1__ 33: src0.xyz = temp[3] LG2 temp[11].w, src0.x 34: src0.xyz = const[6], src0.w = temp[11] MAD temp[11].w, src0.w, src0.x, src0.0 35: src0.w = temp[11] REPL_ALPHA temp[3].x EX2, src0.w 36: src0.xyz = temp[3] REPL_ALPHA_SAT temp[9].xyz RCP_SAT, src0.x 37: src0.xyz = temp[5], src1.xyz = const[13] MAD temp[13].xy, src0.xy_, src1.xy_, src0.000 38: TEX temp[3].xyz, temp[13].xy__, 2D[3]; 39: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 40: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 41: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 42: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 43: src0.xyz = temp[5], src1.xyz = temp[8] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 44: src0.xyz = temp[4], src0.w = input[1] MAD color[0].w, src0.w, src0.x, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4].x, input[2].xy__, 2D[1]; 2: TEX temp[1].yw, input[2].xy__, 2D[0]; 3: src0.xyz = input[3] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 4: src0.w = temp[1], src1.w = temp[6] MAD temp[1].x, src0.w__, src0.111, src0.000 RSQ temp[6].w, |src1.w| 5: src0.xyz = input[3], src0.w = temp[6], src1.xyz = temp[4], src1.w = input[1] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 MAD color[0].w, src1.w, src1.x, src0.0 6: src0.xyz = temp[1], src0.w = input[0], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ RCP temp[10].w, src0.w 7: src0.xyz = input[0], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 8: src0.xyz = temp[10], src1.xyz = const[10], src2.xyz = const[11] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 9: src0.xyz = const[8], src1.xyz = temp[10] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 10: src0.xyz = temp[10] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[1], src1.xyz = const[2] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 13: MAD temp[2].z, src0.__0, src0.111, src0.000 14: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 15: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 16: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 17: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 18: src0.xyz = temp[2], src1.xyz = input[4] DP3 temp[3].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2], src1.xyz = input[5] DP3 temp[3].y, src0.xyz, src1.xyz 20: src0.xyz = temp[5], src1.xyz = temp[3], src2.xyz = temp[0] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 21: src0.xyz = temp[5], src1.xyz = const[13] MAD temp[13].xy, src0.xy_, src1.xy_, src0.000 22: src0.xyz = temp[2], src1.xyz = input[6] DP3 temp[3].z, src0.xyz, src1.xyz 23: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[6] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[7], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[1], src1.xyz = const[12] MAD temp[12].xy, src0.xy_, src1.xy_, src0.000 28: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[3].x, -src0.xyz, src1.xyz 29: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.1__ 30: src0.xyz = temp[3] LG2 temp[11].w, src0.x 31: src0.xyz = const[6], src0.w = temp[11] MAD temp[11].w, src0.w, src0.x, src0.0 32: src0.w = temp[11] REPL_ALPHA temp[3].x EX2, src0.w 33: src0.xyz = temp[3] REPL_ALPHA_SAT temp[9].xyz RCP_SAT, src0.x 34: BEGIN_TEX; 35: TEX temp[3].xyz, temp[13].xy__, 2D[3]; 36: TEX temp[8].xyz, temp[12].xy__, 2D[2]; 37: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 38: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 39: src0.xyz = temp[8], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 41: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 42: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 43: src0.xyz = temp[5], src1.xyz = temp[8] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[7].x, temp[1].xy__, 2D[1]; 2: TEX temp[1].yw, temp[1].xy__, 2D[0]; 3: src0.xyz = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0._, src0._ 4: src0.w = temp[1], src1.w = temp[8] MAD temp[1].x, src0.w__, src0.111, src0.000 RSQ temp[8].w, |src1.w| 5: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[0] MAD temp[8].xyz, src0.xyz, src0.www, src0.000 MAD color[0].w, src1.w, src1.x, src0.0 6: src0.xyz = temp[1], src0.w = temp[6], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ RCP temp[7].w, src0.w 7: src0.xyz = temp[6], src0.w = temp[7] MAD temp[7].xy, src0.xy_, src0.ww_, src0.000 8: src0.xyz = temp[7], src1.xyz = const[10], src2.xyz = const[11] MAD temp[7].xy, src0.xy_, src1.xy_, src2.xy_ 9: src0.xyz = const[8], src1.xyz = temp[7] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 10: src0.xyz = temp[7] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[1], src1.xyz = const[2] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 13: MAD temp[2].z, src0.__0, src0.111, src0.000 14: src0.xyz = temp[2] DP3 temp[6].x, src0.xyz, src0.xyz 15: src0.xyz = temp[6] MAD temp[6].x, src0.1__, src0.111, -src0.x__ 16: src0.xyz = temp[6] REPL_ALPHA temp[6].x RSQ, |src0.x| 17: src0.xyz = temp[6] REPL_ALPHA temp[2].z RCP, src0.x 18: src0.xyz = temp[2], src1.xyz = temp[3] DP3 temp[6].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2], src1.xyz = temp[4] DP3 temp[6].y, src0.xyz, src1.xyz 20: src0.xyz = temp[7], src1.xyz = temp[6], src2.xyz = temp[0] MAD temp[7].xy, src0.xy_, src1.xy_, src2.xy_ 21: src0.xyz = temp[7], src1.xyz = const[13] MAD temp[9].xy, src0.xy_, src1.xy_, src0.000 22: src0.xyz = temp[2], src1.xyz = temp[5] DP3 temp[6].z, src0.xyz, src1.xyz 23: src0.xyz = temp[8], src1.xyz = temp[6] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[6], src1.xyz = temp[2], src2.xyz = temp[8] MAD temp[0].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[0], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[1], src1.xyz = const[12] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 28: src0.xyz = temp[8], src1.xyz = temp[6] DP3 temp[6].x, -src0.xyz, src1.xyz 29: src0.xyz = temp[6] MAD temp[6].x, src0.x__, src0.111, src0.1__ 30: src0.xyz = temp[6] LG2 temp[1].w, src0.x 31: src0.xyz = const[6], src0.w = temp[1] MAD temp[1].w, src0.w, src0.x, src0.0 32: src0.w = temp[1] REPL_ALPHA temp[6].x EX2, src0.w 33: src0.xyz = temp[6] REPL_ALPHA_SAT temp[3].xyz RCP_SAT, src0.x 34: BEGIN_TEX; 35: TEX temp[6].xyz, temp[9].xy__, 2D[3]; 36: TEX temp[1].xyz, temp[4].xy__, 2D[2]; 37: TEX temp[2].xyz, temp[0].xyz_, CUBE[4]; 38: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 39: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[6], src1.xyz = const[7] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 41: src0.xyz = temp[2], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 42: src0.xyz = temp[7], src1.xyz = temp[3], src2.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 43: src0.xyz = temp[7], src1.xyz = temp[1] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz pc=51************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 30, tex_end: 1 (code_addr: 00420780) TEX: TEX t7, t1, texture[1] (000089c1) TEX t1, t1, texture[0] (00008041) 0: xyz: t2 t0 t0 -> (00000002) w: t0 t0 t0 -> t8.w (00a00000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: 1.0 1.0 t2.x op: 00800891 1: xyz: t0 t0 t0 -> t1.x (00840000) w: t1 t8 t0 -> t8.w (00a00201) xyz: t1.www 1.0 0.0 op: 00050a8c w: |t8.w| t0.x t0.x op: 0580004a 2: xyz: t2 t7 t0 -> t8.xyz (03a001c2) w: t8 t0 t0 -> o0.w (01000008) xyz: t2.xyz t8.www 0.0 op: 00050600 w: t0.w t7.x 0.0 op: 0004018a 3: xyz: t1 c9 t0 -> t2.xy (01880a41) w: t6 t0 t0 -> t7.w (009c0006) xyz: t1.xyz c9.xxx -1.0 op: 000d4280 w: t6.w t1.x t1.x op: 05000009 4: xyz: t6 t0 t0 -> t7.xy (019c0006) w: t7 t0 t0 -> (00000007) xyz: t6.xyz t7.www 0.0 op: 00050600 w: t6.x t6.x t6.x op: 00000000 5: xyz: t7 c10 c11 -> t7.xy (019eba87) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c10.xyz c11.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 6: xyz: c8 t7 t0 -> t0.y (010001e8) w: t0 t0 t0 -> (00000000) xyz: c8.xyz 1.0 -t7.xyz op: 00090a80 w: c8.x c8.x c8.x op: 00000000 7: xyz: t7 t0 t0 -> t0.x (00800007) w: t0 t0 t0 -> (00000000) xyz: t7.xyz 1.0 0.0 op: 00050a80 w: t7.x t7.x t7.x op: 00000000 8: xyz: t2 c1 t0 -> t2.xy (01880842) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c1.zzz 0.0 op: 00050380 w: t2.x t2.x t2.x op: 00000000 9: xyz: c1 c2 t0 -> t7.xy (019c08a1) w: t0 t0 t0 -> (00000000) xyz: c1.xyz c2.xyz 0.0 op: 00050200 w: c1.x c1.x c1.x op: 00000000 10: xyz: t0 t0 t0 -> t2.z (02080000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 11: xyz: t2 t0 t0 -> t6.x (00980002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: t2.x t2.x t2.x op: 00000000 12: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t6.xyz op: 00080a95 w: t6.x t6.x t6.x op: 00000000 13: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 05004081 w: |t6.x| t6.x t6.x op: 05800040 14: xyz: t6 t0 t0 -> t2.z (02080006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 05004081 w: t6.x t6.x t6.x op: 05000000 15: xyz: t2 t3 t0 -> t6.x (009800c2) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t3.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 16: xyz: t2 t4 t0 -> t6.y (01180102) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t4.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 17: xyz: t7 t6 t0 -> t7.xy (019c0187) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t6.xyz t0.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 18: xyz: t7 c13 t0 -> t9.xy (01a40b47) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c13.xyz 0.0 op: 00050200 w: t7.x t7.x t7.x op: 00000000 19: xyz: t2 t5 t0 -> t6.z (02180142) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t5.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 20: xyz: t8 t6 t0 -> t2.x (00880188) w: t0 t0 t0 -> (00000000) xyz: t8.xyz t6.xyz t8.xxx op: 00804200 w: t8.x t8.x t8.x op: 00000000 21: xyz: t2 c9 t0 -> t2.x (00880a42) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c9.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 22: xyz: t6 t2 t8 -> t0.xyz (03808086) w: t0 t0 t0 -> (00000000) xyz: -t6.xyz t2.xxx t8.xyz op: 000202a0 w: t6.x t6.x t6.x op: 00000000 23: xyz: t0 c3 t0 -> t1.xy (018408c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c3.xyz t0.xxx op: 40804200 w: t0.x t0.x t0.x op: 00000000 24: xyz: t1 c12 t0 -> t4.xy (01900b01) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c12.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 25: xyz: t8 t6 t0 -> t6.x (00980188) w: t0 t0 t0 -> (00000000) xyz: -t8.xyz t6.xyz t8.xxx op: 00804220 w: t8.x t8.x t8.x op: 00000000 26: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz 1.0 1.0 op: 00054a80 w: t6.x t6.x t6.x op: 00000000 27: xyz: t6 t0 t0 -> (00000006) w: t0 t0 t0 -> t1.w (00840000) xyz: t6.xxx t6.xxx t6.xxx op: 00004081 w: t6.x t6.x t6.x op: 04800000 28: xyz: c6 t0 t0 -> (00000026) w: t1 t0 t0 -> t1.w (00840001) xyz: c6.xxx c6.xxx c6.xxx op: 00004081 w: t1.w c6.x 0.0 op: 00040009 29: xyz: t0 t0 t0 -> t6.x (00980000) w: t1 t0 t0 -> (00000001) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: t1.w t0.x t0.x op: 04000009 30: xyz: t6 t0 t0 -> t3.xyz (038c0006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 45004081 w: t6.x t6.x t6.x op: 45000000 NODE 1: alu_offset: 31, tex_offset: 2, alu_end: 5, tex_end: 2 (code_addr: 0044215f) TEX: TEX t6, t9, texture[3] (00009989) TEX t1, t4, texture[2] (00009044) TEX t2, t0, texture[4] (0000a080) 31: xyz: t1 c4 t0 -> t1.xyz (03840901) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c4.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 32: xyz: t1 c5 t0 -> t1.xyz (03840941) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c5.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 33: xyz: t6 c7 t0 -> t6.xyz (039809c6) w: t0 t0 t0 -> (00000000) xyz: t6.xyz c7.xyz 0.0 op: 00050200 w: t6.x t6.x t6.x op: 00000000 34: xyz: t2 t6 t0 -> t7.xyz (039c0182) w: t0 t0 t0 -> (00000000) xyz: t2.xyz 1.0 -t6.xyz op: 00090a80 w: t2.x t2.x t2.x op: 00000000 35: xyz: t7 t3 t6 -> t7.xyz (039c60c7) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t3.xyz t6.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 36: xyz: t7 t1 t0 -> o0.xyz (1c000047) w: t0 t0 t0 -> (00000000) xyz: t7.xyz 1.0 t1.xyz op: 00010a80 w: t7.x t7.x t7.x op: 00000000 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR, LINEAR DCL IN[2], GENERIC[0], 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[7..8] DCL CONST[1..6] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[8], IN[0] 2: TEX TEMP[1], IN[2], SAMP[0], 2D 3: MOV TEMP[1].x, TEMP[1].wwww 4: MAD TEMP[2], TEMP[1], IMM[0].xxxx, -IMM[0].yyyy 5: MUL TEMP[2].xy, TEMP[2], CONST[1].zzzz 6: MOV TEMP[2].z, IMM[0].zzzz 7: DP3 TEMP[3].x, TEMP[2], TEMP[2] 8: ADD TEMP[3].x, IMM[0].yyyy, -TEMP[3].xxxx 9: RSQ TEMP[3].x, TEMP[3].xxxx 10: RCP TEMP[2].z, TEMP[3].xxxx 11: TEX TEMP[4], IN[2], SAMP[1], 2D 12: DP3 TEMP[3].x, TEMP[2], IN[4] 13: DP3 TEMP[3].y, TEMP[2], IN[5] 14: DP3 TEMP[3].z, TEMP[2], IN[6] 15: MUL TEMP[5], CONST[1], CONST[2] 16: MAD TEMP[5], TEMP[5], TEMP[3], TEMP[0] 17: DP3 TEMP[6].w, IN[3], IN[3] 18: RSQ TEMP[6].w, TEMP[6].wwww 19: MUL TEMP[6], IN[3], TEMP[6].wwww 20: DP3 TEMP[2], TEMP[6], TEMP[3] 21: MUL TEMP[2], TEMP[2], IMM[0].xxxx 22: MAD TEMP[7], -TEMP[3], TEMP[2].xxxx, TEMP[6] 23: DP3_SAT TEMP[1], TEMP[7], CONST[3] 24: TEX TEMP[8], TEMP[1], SAMP[2], 2D 25: MUL TEMP[8], TEMP[8], CONST[4] 26: MUL TEMP[8], TEMP[8], CONST[5] 27: DP3 TEMP[3], -TEMP[6], TEMP[3] 28: ADD TEMP[3], TEMP[3], IMM[0].yyyy 29: POW TEMP[3], TEMP[3].xxxx, CONST[6].xxxx 30: RCP_SAT TEMP[9], TEMP[3].xxxx 31: TEX TEMP[3], TEMP[5], SAMP[3], RECT 32: MUL TEMP[3], TEMP[3], CONST[7] 33: TEX TEMP[2], TEMP[7], SAMP[4], CUBE 34: SUB TEMP[5], TEMP[2], TEMP[3] 35: MAD TEMP[5], TEMP[5], TEMP[9], TEMP[3] 36: ADD OUT[0], TEMP[5], TEMP[8] 37: MUL OUT[0].w, IN[1].wwww, TEMP[4].xxxx 38: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: ADD temp[0].y, const[8], -temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, |temp[6].wwww|; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: LG2 temp[11].w, temp[3].xxxx; 33: MUL temp[11].w, temp[11].wwww, const[6].xxxx; 34: EX2 temp[3], temp[11].wwww; 35: RCP_SAT temp[9], temp[3].xxxx; 36: TEX temp[3], temp[5], RECT[3]; 37: MUL temp[3], temp[3], const[7]; 38: TEX temp[2], temp[7], CUBE[4]; 39: ADD temp[5], temp[2], -temp[3]; 40: MAD temp[5], temp[5], temp[9], temp[3]; 41: ADD output[0], temp[5], temp[8]; 42: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: ADD temp[0].y, const[8], -temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, |temp[6].wwww|; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: LG2 temp[11].w, temp[3].xxxx; 33: MUL temp[11].w, temp[11].wwww, const[6].xxxx; 34: EX2 temp[3], temp[11].wwww; 35: RCP_SAT temp[9], temp[3].xxxx; 36: MUL temp[12], temp[5], const[12]; 37: TEX temp[3], temp[12], 2D[3]; 38: MUL temp[3], temp[3], const[7]; 39: TEX temp[2], temp[7], CUBE[4]; 40: ADD temp[5], temp[2], -temp[3]; 41: MAD temp[5], temp[5], temp[9], temp[3]; 42: ADD output[0], temp[5], temp[8]; 43: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -const[9].yy__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, const[9].__z_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, const[9].y___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 29: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 30: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 31: ADD temp[3].x, temp[3].x___, const[9].y___; 32: LG2 temp[11].w, temp[3].x___; 33: MUL temp[11].w, temp[11].___w, const[6].___x; 34: EX2 temp[3].x, temp[11].w___; 35: RCP_SAT temp[9].xyz, temp[3].x___; 36: MUL temp[12].xy, temp[5].xy__, const[12].xy__; 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 41: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 42: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 43: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -none.11__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 29: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 30: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 31: ADD temp[3].x, temp[3].x___, none.1___; 32: LG2 temp[11].w, temp[3].x___; 33: MUL temp[11].w, temp[11].___w, const[6].___x; 34: EX2 temp[3].x, temp[11].w___; 35: RCP_SAT temp[9].xyz, temp[3].x___; 36: MUL temp[12].xy, temp[5].xy__, const[12].xy__; 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 41: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 42: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 43: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -none.11__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 29: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 30: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 31: ADD temp[3].x, temp[3].x___, none.1___; 32: LG2 temp[11].w, temp[3].x___; 33: MUL temp[11].w, temp[11].___w, const[6].___x; 34: EX2 temp[3].x, temp[11].w___; 35: RCP_SAT temp[9].xyz, temp[3].x___; 36: MUL temp[12].xy, temp[5].xy__, const[12].xy__; 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 41: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 42: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 43: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[10].w, src0.w 1: src0.xyz = input[0], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[10], src1.xyz = const[10], src2.xyz = const[11] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[10] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[8], src1.xyz = temp[10] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: src0.w = temp[1] MAD temp[1].x, src0.w__, src0.111, src0.000 7: src0.xyz = temp[1], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 8: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 9: MAD temp[2].z, src0.__0, src0.111, src0.000 10: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 11: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 12: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 13: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: src0.xyz = temp[2], src1.xyz = input[4] DP3 temp[3].x, src0.xyz, src1.xyz 16: src0.xyz = temp[2], src1.xyz = input[5] DP3 temp[3].y, src0.xyz, src1.xyz 17: src0.xyz = temp[2], src1.xyz = input[6] DP3 temp[3].z, src0.xyz, src1.xyz 18: src0.xyz = const[1], src1.xyz = const[2] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 19: src0.xyz = temp[5], src1.xyz = temp[3], src2.xyz = temp[0] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 20: src0.xyz = input[3] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 21: src0.w = temp[6] RSQ temp[6].w, |src0.w| 22: src0.xyz = input[3], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 23: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[6] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[7], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[8], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[3].x, -src0.xyz, src1.xyz 31: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.1__ 32: src0.xyz = temp[3] LG2 temp[11].w, src0.x 33: src0.xyz = const[6], src0.w = temp[11] MAD temp[11].w, src0.w, src0.x, src0.0 34: src0.w = temp[11] REPL_ALPHA temp[3].x EX2, src0.w 35: src0.xyz = temp[3] REPL_ALPHA_SAT temp[9].xyz RCP_SAT, src0.x 36: src0.xyz = temp[5], src1.xyz = const[12] MAD temp[12].xy, src0.xy_, src1.xy_, src0.000 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 41: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 42: src0.xyz = temp[5], src1.xyz = temp[8] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 43: src0.xyz = temp[4], src0.w = input[1] MAD color[0].w, src0.w, src0.x, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4].x, input[2].xy__, 2D[1]; 2: TEX temp[1].yw, input[2].xy__, 2D[0]; 3: src0.xyz = input[3] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 4: src0.w = temp[1], src1.w = temp[6] MAD temp[1].x, src0.w__, src0.111, src0.000 RSQ temp[6].w, |src1.w| 5: src0.xyz = input[3], src0.w = temp[6], src1.xyz = temp[4], src1.w = input[1] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 MAD color[0].w, src1.w, src1.x, src0.0 6: src0.xyz = temp[1], src0.w = input[0], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ RCP temp[10].w, src0.w 7: src0.xyz = input[0], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 8: src0.xyz = temp[10], src1.xyz = const[10], src2.xyz = const[11] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 9: src0.xyz = const[8], src1.xyz = temp[10] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 10: src0.xyz = temp[10] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[1], src1.xyz = const[2] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 13: MAD temp[2].z, src0.__0, src0.111, src0.000 14: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 15: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 16: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 17: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 18: src0.xyz = temp[2], src1.xyz = input[4] DP3 temp[3].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2], src1.xyz = input[5] DP3 temp[3].y, src0.xyz, src1.xyz 20: src0.xyz = temp[5], src1.xyz = temp[3], src2.xyz = temp[0] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 21: src0.xyz = temp[5], src1.xyz = const[12] MAD temp[12].xy, src0.xy_, src1.xy_, src0.000 22: src0.xyz = temp[2], src1.xyz = input[6] DP3 temp[3].z, src0.xyz, src1.xyz 23: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[6] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[7], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[3].x, -src0.xyz, src1.xyz 28: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.1__ 29: src0.xyz = temp[3] LG2 temp[11].w, src0.x 30: src0.xyz = const[6], src0.w = temp[11] MAD temp[11].w, src0.w, src0.x, src0.0 31: src0.w = temp[11] REPL_ALPHA temp[3].x EX2, src0.w 32: src0.xyz = temp[3] REPL_ALPHA_SAT temp[9].xyz RCP_SAT, src0.x 33: BEGIN_TEX; 34: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 35: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 36: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 37: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 38: src0.xyz = temp[8], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 39: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 41: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 42: src0.xyz = temp[5], src1.xyz = temp[8] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[7].x, temp[1].xy__, 2D[1]; 2: TEX temp[1].yw, temp[1].xy__, 2D[0]; 3: src0.xyz = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0._, src0._ 4: src0.w = temp[1], src1.w = temp[8] MAD temp[1].x, src0.w__, src0.111, src0.000 RSQ temp[8].w, |src1.w| 5: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[0] MAD temp[8].xyz, src0.xyz, src0.www, src0.000 MAD color[0].w, src1.w, src1.x, src0.0 6: src0.xyz = temp[1], src0.w = temp[6], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ RCP temp[7].w, src0.w 7: src0.xyz = temp[6], src0.w = temp[7] MAD temp[7].xy, src0.xy_, src0.ww_, src0.000 8: src0.xyz = temp[7], src1.xyz = const[10], src2.xyz = const[11] MAD temp[7].xy, src0.xy_, src1.xy_, src2.xy_ 9: src0.xyz = const[8], src1.xyz = temp[7] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 10: src0.xyz = temp[7] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[1], src1.xyz = const[2] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 13: MAD temp[2].z, src0.__0, src0.111, src0.000 14: src0.xyz = temp[2] DP3 temp[6].x, src0.xyz, src0.xyz 15: src0.xyz = temp[6] MAD temp[6].x, src0.1__, src0.111, -src0.x__ 16: src0.xyz = temp[6] REPL_ALPHA temp[6].x RSQ, |src0.x| 17: src0.xyz = temp[6] REPL_ALPHA temp[2].z RCP, src0.x 18: src0.xyz = temp[2], src1.xyz = temp[3] DP3 temp[6].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2], src1.xyz = temp[4] DP3 temp[6].y, src0.xyz, src1.xyz 20: src0.xyz = temp[7], src1.xyz = temp[6], src2.xyz = temp[0] MAD temp[7].xy, src0.xy_, src1.xy_, src2.xy_ 21: src0.xyz = temp[7], src1.xyz = const[12] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 22: src0.xyz = temp[2], src1.xyz = temp[5] DP3 temp[6].z, src0.xyz, src1.xyz 23: src0.xyz = temp[8], src1.xyz = temp[6] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[6], src1.xyz = temp[2], src2.xyz = temp[8] MAD temp[0].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[0], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[8], src1.xyz = temp[6] DP3 temp[6].x, -src0.xyz, src1.xyz 28: src0.xyz = temp[6] MAD temp[6].x, src0.x__, src0.111, src0.1__ 29: src0.xyz = temp[6] LG2 temp[3].w, src0.x 30: src0.xyz = const[6], src0.w = temp[3] MAD temp[3].w, src0.w, src0.x, src0.0 31: src0.w = temp[3] REPL_ALPHA temp[6].x EX2, src0.w 32: src0.xyz = temp[6] REPL_ALPHA_SAT temp[3].xyz RCP_SAT, src0.x 33: BEGIN_TEX; 34: TEX temp[6].xyz, temp[4].xy__, 2D[3]; 35: TEX temp[1].xyz, temp[1].xy__, 2D[2]; 36: TEX temp[2].xyz, temp[0].xyz_, CUBE[4]; 37: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 38: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 39: src0.xyz = temp[6], src1.xyz = const[7] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[2], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 41: src0.xyz = temp[7], src1.xyz = temp[3], src2.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 42: src0.xyz = temp[7], src1.xyz = temp[1] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz pc=52************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 29, tex_end: 1 (code_addr: 00420740) TEX: TEX t7, t1, texture[1] (000089c1) TEX t1, t1, texture[0] (00008041) 0: xyz: t2 t0 t0 -> (00000002) w: t0 t0 t0 -> t8.w (00a00000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: 1.0 1.0 t2.x op: 00800891 1: xyz: t0 t0 t0 -> t1.x (00840000) w: t1 t8 t0 -> t8.w (00a00201) xyz: t1.www 1.0 0.0 op: 00050a8c w: |t8.w| t0.x t0.x op: 0580004a 2: xyz: t2 t7 t0 -> t8.xyz (03a001c2) w: t8 t0 t0 -> o0.w (01000008) xyz: t2.xyz t8.www 0.0 op: 00050600 w: t0.w t7.x 0.0 op: 0004018a 3: xyz: t1 c9 t0 -> t2.xy (01880a41) w: t6 t0 t0 -> t7.w (009c0006) xyz: t1.xyz c9.xxx -1.0 op: 000d4280 w: t6.w t1.x t1.x op: 05000009 4: xyz: t6 t0 t0 -> t7.xy (019c0006) w: t7 t0 t0 -> (00000007) xyz: t6.xyz t7.www 0.0 op: 00050600 w: t6.x t6.x t6.x op: 00000000 5: xyz: t7 c10 c11 -> t7.xy (019eba87) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c10.xyz c11.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 6: xyz: c8 t7 t0 -> t0.y (010001e8) w: t0 t0 t0 -> (00000000) xyz: c8.xyz 1.0 -t7.xyz op: 00090a80 w: c8.x c8.x c8.x op: 00000000 7: xyz: t7 t0 t0 -> t0.x (00800007) w: t0 t0 t0 -> (00000000) xyz: t7.xyz 1.0 0.0 op: 00050a80 w: t7.x t7.x t7.x op: 00000000 8: xyz: t2 c1 t0 -> t2.xy (01880842) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c1.zzz 0.0 op: 00050380 w: t2.x t2.x t2.x op: 00000000 9: xyz: c1 c2 t0 -> t7.xy (019c08a1) w: t0 t0 t0 -> (00000000) xyz: c1.xyz c2.xyz 0.0 op: 00050200 w: c1.x c1.x c1.x op: 00000000 10: xyz: t0 t0 t0 -> t2.z (02080000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 11: xyz: t2 t0 t0 -> t6.x (00980002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: t2.x t2.x t2.x op: 00000000 12: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t6.xyz op: 00080a95 w: t6.x t6.x t6.x op: 00000000 13: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 05004081 w: |t6.x| t6.x t6.x op: 05800040 14: xyz: t6 t0 t0 -> t2.z (02080006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 05004081 w: t6.x t6.x t6.x op: 05000000 15: xyz: t2 t3 t0 -> t6.x (009800c2) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t3.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 16: xyz: t2 t4 t0 -> t6.y (01180102) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t4.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 17: xyz: t7 t6 t0 -> t7.xy (019c0187) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t6.xyz t0.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 18: xyz: t7 c12 t0 -> t4.xy (01900b07) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c12.xyz 0.0 op: 00050200 w: t7.x t7.x t7.x op: 00000000 19: xyz: t2 t5 t0 -> t6.z (02180142) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t5.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 20: xyz: t8 t6 t0 -> t2.x (00880188) w: t0 t0 t0 -> (00000000) xyz: t8.xyz t6.xyz t8.xxx op: 00804200 w: t8.x t8.x t8.x op: 00000000 21: xyz: t2 c9 t0 -> t2.x (00880a42) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c9.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 22: xyz: t6 t2 t8 -> t0.xyz (03808086) w: t0 t0 t0 -> (00000000) xyz: -t6.xyz t2.xxx t8.xyz op: 000202a0 w: t6.x t6.x t6.x op: 00000000 23: xyz: t0 c3 t0 -> t1.xy (018408c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c3.xyz t0.xxx op: 40804200 w: t0.x t0.x t0.x op: 00000000 24: xyz: t8 t6 t0 -> t6.x (00980188) w: t0 t0 t0 -> (00000000) xyz: -t8.xyz t6.xyz t8.xxx op: 00804220 w: t8.x t8.x t8.x op: 00000000 25: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz 1.0 1.0 op: 00054a80 w: t6.x t6.x t6.x op: 00000000 26: xyz: t6 t0 t0 -> (00000006) w: t0 t0 t0 -> t3.w (008c0000) xyz: t6.xxx t6.xxx t6.xxx op: 00004081 w: t6.x t6.x t6.x op: 04800000 27: xyz: c6 t0 t0 -> (00000026) w: t3 t0 t0 -> t3.w (008c0003) xyz: c6.xxx c6.xxx c6.xxx op: 00004081 w: t3.w c6.x 0.0 op: 00040009 28: xyz: t0 t0 t0 -> t6.x (00980000) w: t3 t0 t0 -> (00000003) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: t3.w t0.x t0.x op: 04000009 29: xyz: t6 t0 t0 -> t3.xyz (038c0006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 45004081 w: t6.x t6.x t6.x op: 45000000 NODE 1: alu_offset: 30, tex_offset: 2, alu_end: 5, tex_end: 2 (code_addr: 0044215e) TEX: TEX t6, t4, texture[3] (00009984) TEX t1, t1, texture[2] (00009041) TEX t2, t0, texture[4] (0000a080) 30: xyz: t1 c4 t0 -> t1.xyz (03840901) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c4.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 31: xyz: t1 c5 t0 -> t1.xyz (03840941) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c5.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 32: xyz: t6 c7 t0 -> t6.xyz (039809c6) w: t0 t0 t0 -> (00000000) xyz: t6.xyz c7.xyz 0.0 op: 00050200 w: t6.x t6.x t6.x op: 00000000 33: xyz: t2 t6 t0 -> t7.xyz (039c0182) w: t0 t0 t0 -> (00000000) xyz: t2.xyz 1.0 -t6.xyz op: 00090a80 w: t2.x t2.x t2.x op: 00000000 34: xyz: t7 t3 t6 -> t7.xyz (039c60c7) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t3.xyz t6.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 35: xyz: t7 t1 t0 -> o0.xyz (1c000047) w: t0 t0 t0 -> (00000000) xyz: t7.xyz 1.0 t1.xyz op: 00010a80 w: t7.x t7.x t7.x op: 00000000 r300: Initial fragment program 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], TEMP[0], IN[0] 2: END Fragment Program: before compilation # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after emulate loops # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after emulate branches # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: TEX temp[0], input[1], 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after deadcode # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after dataflow passes # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: MUL output[0], temp[0], input[0]; Fragment Program: after pair translate # Radeon Compiler Program 0: TEX temp[0], input[1].xy__, 2D[0]; 1: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[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].xy__, 2D[0]; 2: src0.xyz = temp[0], src0.w = temp[0], src1.xyz = input[0], src1.w = input[0] MAD color[0].xyz, src0.xyz, src1.xyz, src0.000 MAD color[0].w, src0.w, src1.w, src0.0 Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[1], temp[1].xy__, 2D[0]; 2: src0.xyz = temp[1], src0.w = temp[1], 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 pc=53************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 0, tex_end: 0 (code_addr: 00400000) TEX: TEX t1, t1, texture[0] (00008041) 0: xyz: t1 t0 t0 -> o0.xyz (1c000001) w: t1 t0 t0 -> o0.w (01000001) xyz: t1.xyz t0.xyz 0.0 op: 00050200 w: t1.w t0.w 0.0 op: 00040509 r300: Initial fragment program FRAG DCL IN[0], POSITION, LINEAR DCL IN[1], COLOR, LINEAR DCL IN[2], GENERIC[0], 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[7..8] DCL CONST[1..6] DCL TEMP[0..9] IMM FLT32 { 2.0000, 1.0000, 0.0000, 0.0000} 0: MOV TEMP[0], IN[0] 1: SUB TEMP[0].y, CONST[8], IN[0] 2: TEX TEMP[1], IN[2], SAMP[0], 2D 3: MOV TEMP[1].x, TEMP[1].wwww 4: MAD TEMP[2], TEMP[1], IMM[0].xxxx, -IMM[0].yyyy 5: MUL TEMP[2].xy, TEMP[2], CONST[1].zzzz 6: MOV TEMP[2].z, IMM[0].zzzz 7: DP3 TEMP[3].x, TEMP[2], TEMP[2] 8: ADD TEMP[3].x, IMM[0].yyyy, -TEMP[3].xxxx 9: RSQ TEMP[3].x, TEMP[3].xxxx 10: RCP TEMP[2].z, TEMP[3].xxxx 11: TEX TEMP[4], IN[2], SAMP[1], 2D 12: DP3 TEMP[3].x, TEMP[2], IN[4] 13: DP3 TEMP[3].y, TEMP[2], IN[5] 14: DP3 TEMP[3].z, TEMP[2], IN[6] 15: MUL TEMP[5], CONST[1], CONST[2] 16: MAD TEMP[5], TEMP[5], TEMP[3], TEMP[0] 17: DP3 TEMP[6].w, IN[3], IN[3] 18: RSQ TEMP[6].w, TEMP[6].wwww 19: MUL TEMP[6], IN[3], TEMP[6].wwww 20: DP3 TEMP[2], TEMP[6], TEMP[3] 21: MUL TEMP[2], TEMP[2], IMM[0].xxxx 22: MAD TEMP[7], -TEMP[3], TEMP[2].xxxx, TEMP[6] 23: DP3_SAT TEMP[1], TEMP[7], CONST[3] 24: TEX TEMP[8], TEMP[1], SAMP[2], 2D 25: MUL TEMP[8], TEMP[8], CONST[4] 26: MUL TEMP[8], TEMP[8], CONST[5] 27: DP3 TEMP[3], -TEMP[6], TEMP[3] 28: ADD TEMP[3], TEMP[3], IMM[0].yyyy 29: POW TEMP[3], TEMP[3].xxxx, CONST[6].xxxx 30: RCP_SAT TEMP[9], TEMP[3].xxxx 31: TEX TEMP[3], TEMP[5], SAMP[3], RECT 32: MUL TEMP[3], TEMP[3], CONST[7] 33: TEX TEMP[2], TEMP[7], SAMP[4], CUBE 34: SUB TEMP[5], TEMP[2], TEMP[3] 35: MAD TEMP[5], TEMP[5], TEMP[9], TEMP[3] 36: ADD OUT[0], TEMP[5], TEMP[8] 37: MUL OUT[0].w, IN[1].wwww, TEMP[4].xxxx 38: END Fragment Program: before compilation # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after emulate loops # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after emulate branches # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: SUB temp[0].y, const[8], temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, temp[3].xxxx; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, temp[6].wwww; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: POW temp[3], temp[3].xxxx, const[6].xxxx; 33: RCP_SAT temp[9], temp[3].xxxx; 34: TEX temp[3], temp[5], RECT[3]; 35: MUL temp[3], temp[3], const[7]; 36: TEX temp[2], temp[7], CUBE[4]; 37: SUB temp[5], temp[2], temp[3]; 38: MAD temp[5], temp[5], temp[9], temp[3]; 39: ADD output[0], temp[5], temp[8]; 40: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after native rewrite part 1 # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: ADD temp[0].y, const[8], -temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, |temp[6].wwww|; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: LG2 temp[11].w, temp[3].xxxx; 33: MUL temp[11].w, temp[11].wwww, const[6].xxxx; 34: EX2 temp[3], temp[11].wwww; 35: RCP_SAT temp[9], temp[3].xxxx; 36: TEX temp[3], temp[5], RECT[3]; 37: MUL temp[3], temp[3], const[7]; 38: TEX temp[2], temp[7], CUBE[4]; 39: ADD temp[5], temp[2], -temp[3]; 40: MAD temp[5], temp[5], temp[9], temp[3]; 41: ADD output[0], temp[5], temp[8]; 42: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after native rewrite part 2 # Radeon Compiler Program 0: RCP temp[10].w, input[0].wwww; 1: MUL temp[10].xyz, input[0], temp[10].wwww; 2: MAD temp[10].xyz, temp[10].xyz0, const[10].xyz0, const[11].xyz0; 3: MOV temp[0], temp[10]; 4: ADD temp[0].y, const[8], -temp[10]; 5: TEX temp[1], input[2], 2D[0]; 6: MOV temp[1].x, temp[1].wwww; 7: MAD temp[2], temp[1], const[9].xxxx, -const[9].yyyy; 8: MUL temp[2].xy, temp[2], const[1].zzzz; 9: MOV temp[2].z, const[9].zzzz; 10: DP3 temp[3].x, temp[2], temp[2]; 11: ADD temp[3].x, const[9].yyyy, -temp[3].xxxx; 12: RSQ temp[3].x, |temp[3].xxxx|; 13: RCP temp[2].z, temp[3].xxxx; 14: TEX temp[4], input[2], 2D[1]; 15: DP3 temp[3].x, temp[2], input[4]; 16: DP3 temp[3].y, temp[2], input[5]; 17: DP3 temp[3].z, temp[2], input[6]; 18: MUL temp[5], const[1], const[2]; 19: MAD temp[5], temp[5], temp[3], temp[0]; 20: DP3 temp[6].w, input[3], input[3]; 21: RSQ temp[6].w, |temp[6].wwww|; 22: MUL temp[6], input[3], temp[6].wwww; 23: DP3 temp[2], temp[6], temp[3]; 24: MUL temp[2], temp[2], const[9].xxxx; 25: MAD temp[7], -temp[3], temp[2].xxxx, temp[6]; 26: DP3_SAT temp[1], temp[7], const[3]; 27: TEX temp[8], temp[1], 2D[2]; 28: MUL temp[8], temp[8], const[4]; 29: MUL temp[8], temp[8], const[5]; 30: DP3 temp[3], -temp[6], temp[3]; 31: ADD temp[3], temp[3], const[9].yyyy; 32: LG2 temp[11].w, temp[3].xxxx; 33: MUL temp[11].w, temp[11].wwww, const[6].xxxx; 34: EX2 temp[3], temp[11].wwww; 35: RCP_SAT temp[9], temp[3].xxxx; 36: MUL temp[12], temp[5], const[12]; 37: TEX temp[3], temp[12], 2D[3]; 38: MUL temp[3], temp[3], const[7]; 39: TEX temp[2], temp[7], CUBE[4]; 40: ADD temp[5], temp[2], -temp[3]; 41: MAD temp[5], temp[5], temp[9], temp[3]; 42: ADD output[0], temp[5], temp[8]; 43: MUL output[0].w, input[1].wwww, temp[4].xxxx; Fragment Program: after deadcode # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -const[9].yy__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, const[9].__z_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, const[9].y___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 29: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 30: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 31: ADD temp[3].x, temp[3].x___, const[9].y___; 32: LG2 temp[11].w, temp[3].x___; 33: MUL temp[11].w, temp[11].___w, const[6].___x; 34: EX2 temp[3].x, temp[11].w___; 35: RCP_SAT temp[9].xyz, temp[3].x___; 36: MUL temp[12].xy, temp[5].xy__, const[12].xy__; 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 41: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 42: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 43: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after dataflow optimize # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -none.11__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 29: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 30: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 31: ADD temp[3].x, temp[3].x___, none.1___; 32: LG2 temp[11].w, temp[3].x___; 33: MUL temp[11].w, temp[11].___w, const[6].___x; 34: EX2 temp[3].x, temp[11].w___; 35: RCP_SAT temp[9].xyz, temp[3].x___; 36: MUL temp[12].xy, temp[5].xy__, const[12].xy__; 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 41: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 42: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 43: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after dataflow passes # Radeon Compiler Program 0: RCP temp[10].w, input[0].w___; 1: MUL temp[10].xy, input[0].xy__, temp[10].ww__; 2: MAD temp[10].xy, temp[10].xy__, const[10].xy__, const[11].xy__; 3: MOV temp[0].x, temp[10].x___; 4: ADD temp[0].y, const[8]._y__, -temp[10]._y__; 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: MOV temp[1].x, temp[1].w___; 7: MAD temp[2].xy, temp[1].xy__, const[9].xx__, -none.11__; 8: MUL temp[2].xy, temp[2].xy__, const[1].zz__; 9: MOV temp[2].z, none.__0_; 10: DP3 temp[3].x, temp[2].xyz_, temp[2].xyz_; 11: ADD temp[3].x, none.1___, -temp[3].x___; 12: RSQ temp[3].x, |temp[3].x___|; 13: RCP temp[2].z, temp[3].x___; 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: DP3 temp[3].x, temp[2].xyz_, input[4].xyz_; 16: DP3 temp[3].y, temp[2].xyz_, input[5].xyz_; 17: DP3 temp[3].z, temp[2].xyz_, input[6].xyz_; 18: MUL temp[5].xy, const[1].xy__, const[2].xy__; 19: MAD temp[5].xy, temp[5].xy__, temp[3].xy__, temp[0].xy__; 20: DP3 temp[6].w, input[3].xyz_, input[3].xyz_; 21: RSQ temp[6].w, |temp[6].w___|; 22: MUL temp[6].xyz, input[3].xyz_, temp[6].www_; 23: DP3 temp[2].x, temp[6].xyz_, temp[3].xyz_; 24: MUL temp[2].x, temp[2].x___, const[9].x___; 25: MAD temp[7].xyz, -temp[3].xyz_, temp[2].xxx_, temp[6].xyz_; 26: DP3_SAT temp[1].xy, temp[7].xyz_, const[3].xyz_; 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: MUL temp[8].xyz, temp[8].xyz_, const[4].xyz_; 29: MUL temp[8].xyz, temp[8].xyz_, const[5].xyz_; 30: DP3 temp[3].x, -temp[6].xyz_, temp[3].xyz_; 31: ADD temp[3].x, temp[3].x___, none.1___; 32: LG2 temp[11].w, temp[3].x___; 33: MUL temp[11].w, temp[11].___w, const[6].___x; 34: EX2 temp[3].x, temp[11].w___; 35: RCP_SAT temp[9].xyz, temp[3].x___; 36: MUL temp[12].xy, temp[5].xy__, const[12].xy__; 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: MUL temp[3].xyz, temp[3].xyz_, const[7].xyz_; 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: ADD temp[5].xyz, temp[2].xyz_, -temp[3].xyz_; 41: MAD temp[5].xyz, temp[5].xyz_, temp[9].xyz_, temp[3].xyz_; 42: ADD output[0].xyz, temp[5].xyz_, temp[8].xyz_; 43: MUL output[0].w, input[1].___w, temp[4].___x; Fragment Program: after pair translate # Radeon Compiler Program 0: src0.w = input[0] RCP temp[10].w, src0.w 1: src0.xyz = input[0], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 2: src0.xyz = temp[10], src1.xyz = const[10], src2.xyz = const[11] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 3: src0.xyz = temp[10] MAD temp[0].x, src0.x__, src0.111, src0.000 4: src0.xyz = const[8], src1.xyz = temp[10] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 5: TEX temp[1].yw, input[2].xy__, 2D[0]; 6: src0.w = temp[1] MAD temp[1].x, src0.w__, src0.111, src0.000 7: src0.xyz = temp[1], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ 8: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 9: MAD temp[2].z, src0.__0, src0.111, src0.000 10: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 11: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 12: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 13: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 14: TEX temp[4].x, input[2].xy__, 2D[1]; 15: src0.xyz = temp[2], src1.xyz = input[4] DP3 temp[3].x, src0.xyz, src1.xyz 16: src0.xyz = temp[2], src1.xyz = input[5] DP3 temp[3].y, src0.xyz, src1.xyz 17: src0.xyz = temp[2], src1.xyz = input[6] DP3 temp[3].z, src0.xyz, src1.xyz 18: src0.xyz = const[1], src1.xyz = const[2] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 19: src0.xyz = temp[5], src1.xyz = temp[3], src2.xyz = temp[0] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 20: src0.xyz = input[3] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 21: src0.w = temp[6] RSQ temp[6].w, |src0.w| 22: src0.xyz = input[3], src0.w = temp[6] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 23: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[6] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[7], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 28: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 29: src0.xyz = temp[8], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 30: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[3].x, -src0.xyz, src1.xyz 31: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.1__ 32: src0.xyz = temp[3] LG2 temp[11].w, src0.x 33: src0.xyz = const[6], src0.w = temp[11] MAD temp[11].w, src0.w, src0.x, src0.0 34: src0.w = temp[11] REPL_ALPHA temp[3].x EX2, src0.w 35: src0.xyz = temp[3] REPL_ALPHA_SAT temp[9].xyz RCP_SAT, src0.x 36: src0.xyz = temp[5], src1.xyz = const[12] MAD temp[12].xy, src0.xy_, src1.xy_, src0.000 37: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 38: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 39: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 40: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 41: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 42: src0.xyz = temp[5], src1.xyz = temp[8] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz 43: src0.xyz = temp[4], src0.w = input[1] MAD color[0].w, src0.w, src0.x, src0.0 Fragment Program: after pair scheduling # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[4].x, input[2].xy__, 2D[1]; 2: TEX temp[1].yw, input[2].xy__, 2D[0]; 3: src0.xyz = input[3] DP3, src0.xyz, src0.xyz DP3 temp[6].w, src0._, src0._ 4: src0.w = temp[1], src1.w = temp[6] MAD temp[1].x, src0.w__, src0.111, src0.000 RSQ temp[6].w, |src1.w| 5: src0.xyz = input[3], src0.w = temp[6], src1.xyz = temp[4], src1.w = input[1] MAD temp[6].xyz, src0.xyz, src0.www, src0.000 MAD color[0].w, src1.w, src1.x, src0.0 6: src0.xyz = temp[1], src0.w = input[0], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ RCP temp[10].w, src0.w 7: src0.xyz = input[0], src0.w = temp[10] MAD temp[10].xy, src0.xy_, src0.ww_, src0.000 8: src0.xyz = temp[10], src1.xyz = const[10], src2.xyz = const[11] MAD temp[10].xy, src0.xy_, src1.xy_, src2.xy_ 9: src0.xyz = const[8], src1.xyz = temp[10] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 10: src0.xyz = temp[10] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[1], src1.xyz = const[2] MAD temp[5].xy, src0.xy_, src1.xy_, src0.000 13: MAD temp[2].z, src0.__0, src0.111, src0.000 14: src0.xyz = temp[2] DP3 temp[3].x, src0.xyz, src0.xyz 15: src0.xyz = temp[3] MAD temp[3].x, src0.1__, src0.111, -src0.x__ 16: src0.xyz = temp[3] REPL_ALPHA temp[3].x RSQ, |src0.x| 17: src0.xyz = temp[3] REPL_ALPHA temp[2].z RCP, src0.x 18: src0.xyz = temp[2], src1.xyz = input[4] DP3 temp[3].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2], src1.xyz = input[5] DP3 temp[3].y, src0.xyz, src1.xyz 20: src0.xyz = temp[5], src1.xyz = temp[3], src2.xyz = temp[0] MAD temp[5].xy, src0.xy_, src1.xy_, src2.xy_ 21: src0.xyz = temp[5], src1.xyz = const[12] MAD temp[12].xy, src0.xy_, src1.xy_, src0.000 22: src0.xyz = temp[2], src1.xyz = input[6] DP3 temp[3].z, src0.xyz, src1.xyz 23: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[3], src1.xyz = temp[2], src2.xyz = temp[6] MAD temp[7].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[7], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[6], src1.xyz = temp[3] DP3 temp[3].x, -src0.xyz, src1.xyz 28: src0.xyz = temp[3] MAD temp[3].x, src0.x__, src0.111, src0.1__ 29: src0.xyz = temp[3] LG2 temp[11].w, src0.x 30: src0.xyz = const[6], src0.w = temp[11] MAD temp[11].w, src0.w, src0.x, src0.0 31: src0.w = temp[11] REPL_ALPHA temp[3].x EX2, src0.w 32: src0.xyz = temp[3] REPL_ALPHA_SAT temp[9].xyz RCP_SAT, src0.x 33: BEGIN_TEX; 34: TEX temp[3].xyz, temp[12].xy__, 2D[3]; 35: TEX temp[8].xyz, temp[1].xy__, 2D[2]; 36: TEX temp[2].xyz, temp[7].xyz_, CUBE[4]; 37: src0.xyz = temp[8], src1.xyz = const[4] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 38: src0.xyz = temp[8], src1.xyz = const[5] MAD temp[8].xyz, src0.xyz, src1.xyz, src0.000 39: src0.xyz = temp[3], src1.xyz = const[7] MAD temp[3].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[2], src1.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src0.111, -src1.xyz 41: src0.xyz = temp[5], src1.xyz = temp[9], src2.xyz = temp[3] MAD temp[5].xyz, src0.xyz, src1.xyz, src2.xyz 42: src0.xyz = temp[5], src1.xyz = temp[8] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz Fragment Program: after register allocation # Radeon Compiler Program 0: BEGIN_TEX; 1: TEX temp[7].x, temp[1].xy__, 2D[1]; 2: TEX temp[1].yw, temp[1].xy__, 2D[0]; 3: src0.xyz = temp[2] DP3, src0.xyz, src0.xyz DP3 temp[8].w, src0._, src0._ 4: src0.w = temp[1], src1.w = temp[8] MAD temp[1].x, src0.w__, src0.111, src0.000 RSQ temp[8].w, |src1.w| 5: src0.xyz = temp[2], src0.w = temp[8], src1.xyz = temp[7], src1.w = temp[0] MAD temp[8].xyz, src0.xyz, src0.www, src0.000 MAD color[0].w, src1.w, src1.x, src0.0 6: src0.xyz = temp[1], src0.w = temp[6], src1.xyz = const[9] MAD temp[2].xy, src0.xy_, src1.xx_, -src0.11_ RCP temp[7].w, src0.w 7: src0.xyz = temp[6], src0.w = temp[7] MAD temp[7].xy, src0.xy_, src0.ww_, src0.000 8: src0.xyz = temp[7], src1.xyz = const[10], src2.xyz = const[11] MAD temp[7].xy, src0.xy_, src1.xy_, src2.xy_ 9: src0.xyz = const[8], src1.xyz = temp[7] MAD temp[0].y, src0._y_, src0.111, -src1._y_ 10: src0.xyz = temp[7] MAD temp[0].x, src0.x__, src0.111, src0.000 11: src0.xyz = temp[2], src1.xyz = const[1] MAD temp[2].xy, src0.xy_, src1.zz_, src0.000 12: src0.xyz = const[1], src1.xyz = const[2] MAD temp[7].xy, src0.xy_, src1.xy_, src0.000 13: MAD temp[2].z, src0.__0, src0.111, src0.000 14: src0.xyz = temp[2] DP3 temp[6].x, src0.xyz, src0.xyz 15: src0.xyz = temp[6] MAD temp[6].x, src0.1__, src0.111, -src0.x__ 16: src0.xyz = temp[6] REPL_ALPHA temp[6].x RSQ, |src0.x| 17: src0.xyz = temp[6] REPL_ALPHA temp[2].z RCP, src0.x 18: src0.xyz = temp[2], src1.xyz = temp[3] DP3 temp[6].x, src0.xyz, src1.xyz 19: src0.xyz = temp[2], src1.xyz = temp[4] DP3 temp[6].y, src0.xyz, src1.xyz 20: src0.xyz = temp[7], src1.xyz = temp[6], src2.xyz = temp[0] MAD temp[7].xy, src0.xy_, src1.xy_, src2.xy_ 21: src0.xyz = temp[7], src1.xyz = const[12] MAD temp[4].xy, src0.xy_, src1.xy_, src0.000 22: src0.xyz = temp[2], src1.xyz = temp[5] DP3 temp[6].z, src0.xyz, src1.xyz 23: src0.xyz = temp[8], src1.xyz = temp[6] DP3 temp[2].x, src0.xyz, src1.xyz 24: src0.xyz = temp[2], src1.xyz = const[9] MAD temp[2].x, src0.x__, src1.x__, src0.000 25: src0.xyz = temp[6], src1.xyz = temp[2], src2.xyz = temp[8] MAD temp[0].xyz, -src0.xyz, src1.xxx, src2.xyz 26: src0.xyz = temp[0], src1.xyz = const[3] DP3_SAT temp[1].xy, src0.xyz, src1.xyz 27: src0.xyz = temp[8], src1.xyz = temp[6] DP3 temp[6].x, -src0.xyz, src1.xyz 28: src0.xyz = temp[6] MAD temp[6].x, src0.x__, src0.111, src0.1__ 29: src0.xyz = temp[6] LG2 temp[3].w, src0.x 30: src0.xyz = const[6], src0.w = temp[3] MAD temp[3].w, src0.w, src0.x, src0.0 31: src0.w = temp[3] REPL_ALPHA temp[6].x EX2, src0.w 32: src0.xyz = temp[6] REPL_ALPHA_SAT temp[3].xyz RCP_SAT, src0.x 33: BEGIN_TEX; 34: TEX temp[6].xyz, temp[4].xy__, 2D[3]; 35: TEX temp[1].xyz, temp[1].xy__, 2D[2]; 36: TEX temp[2].xyz, temp[0].xyz_, CUBE[4]; 37: src0.xyz = temp[1], src1.xyz = const[4] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 38: src0.xyz = temp[1], src1.xyz = const[5] MAD temp[1].xyz, src0.xyz, src1.xyz, src0.000 39: src0.xyz = temp[6], src1.xyz = const[7] MAD temp[6].xyz, src0.xyz, src1.xyz, src0.000 40: src0.xyz = temp[2], src1.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src0.111, -src1.xyz 41: src0.xyz = temp[7], src1.xyz = temp[3], src2.xyz = temp[6] MAD temp[7].xyz, src0.xyz, src1.xyz, src2.xyz 42: src0.xyz = temp[7], src1.xyz = temp[1] MAD color[0].xyz, src0.xyz, src0.111, src1.xyz pc=54************************************* Hardware program ---------------- NODE 0: alu_offset: 0, tex_offset: 0, alu_end: 29, tex_end: 1 (code_addr: 00420740) TEX: TEX t7, t1, texture[1] (000089c1) TEX t1, t1, texture[0] (00008041) 0: xyz: t2 t0 t0 -> (00000002) w: t0 t0 t0 -> t8.w (00a00000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: 1.0 1.0 t2.x op: 00800891 1: xyz: t0 t0 t0 -> t1.x (00840000) w: t1 t8 t0 -> t8.w (00a00201) xyz: t1.www 1.0 0.0 op: 00050a8c w: |t8.w| t0.x t0.x op: 0580004a 2: xyz: t2 t7 t0 -> t8.xyz (03a001c2) w: t8 t0 t0 -> o0.w (01000008) xyz: t2.xyz t8.www 0.0 op: 00050600 w: t0.w t7.x 0.0 op: 0004018a 3: xyz: t1 c9 t0 -> t2.xy (01880a41) w: t6 t0 t0 -> t7.w (009c0006) xyz: t1.xyz c9.xxx -1.0 op: 000d4280 w: t6.w t1.x t1.x op: 05000009 4: xyz: t6 t0 t0 -> t7.xy (019c0006) w: t7 t0 t0 -> (00000007) xyz: t6.xyz t7.www 0.0 op: 00050600 w: t6.x t6.x t6.x op: 00000000 5: xyz: t7 c10 c11 -> t7.xy (019eba87) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c10.xyz c11.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 6: xyz: c8 t7 t0 -> t0.y (010001e8) w: t0 t0 t0 -> (00000000) xyz: c8.xyz 1.0 -t7.xyz op: 00090a80 w: c8.x c8.x c8.x op: 00000000 7: xyz: t7 t0 t0 -> t0.x (00800007) w: t0 t0 t0 -> (00000000) xyz: t7.xyz 1.0 0.0 op: 00050a80 w: t7.x t7.x t7.x op: 00000000 8: xyz: t2 c1 t0 -> t2.xy (01880842) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c1.zzz 0.0 op: 00050380 w: t2.x t2.x t2.x op: 00000000 9: xyz: c1 c2 t0 -> t7.xy (019c08a1) w: t0 t0 t0 -> (00000000) xyz: c1.xyz c2.xyz 0.0 op: 00050200 w: c1.x c1.x c1.x op: 00000000 10: xyz: t0 t0 t0 -> t2.z (02080000) w: t0 t0 t0 -> (00000000) xyz: 0.0 1.0 0.0 op: 00050a94 w: t0.x t0.x t0.x op: 00000000 11: xyz: t2 t0 t0 -> t6.x (00980002) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t2.xyz t2.xxx op: 00804000 w: t2.x t2.x t2.x op: 00000000 12: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: 1.0 1.0 -t6.xyz op: 00080a95 w: t6.x t6.x t6.x op: 00000000 13: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 05004081 w: |t6.x| t6.x t6.x op: 05800040 14: xyz: t6 t0 t0 -> t2.z (02080006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 05004081 w: t6.x t6.x t6.x op: 05000000 15: xyz: t2 t3 t0 -> t6.x (009800c2) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t3.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 16: xyz: t2 t4 t0 -> t6.y (01180102) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t4.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 17: xyz: t7 t6 t0 -> t7.xy (019c0187) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t6.xyz t0.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 18: xyz: t7 c12 t0 -> t4.xy (01900b07) w: t0 t0 t0 -> (00000000) xyz: t7.xyz c12.xyz 0.0 op: 00050200 w: t7.x t7.x t7.x op: 00000000 19: xyz: t2 t5 t0 -> t6.z (02180142) w: t0 t0 t0 -> (00000000) xyz: t2.xyz t5.xyz t2.xxx op: 00804200 w: t2.x t2.x t2.x op: 00000000 20: xyz: t8 t6 t0 -> t2.x (00880188) w: t0 t0 t0 -> (00000000) xyz: t8.xyz t6.xyz t8.xxx op: 00804200 w: t8.x t8.x t8.x op: 00000000 21: xyz: t2 c9 t0 -> t2.x (00880a42) w: t0 t0 t0 -> (00000000) xyz: t2.xyz c9.xyz 0.0 op: 00050200 w: t2.x t2.x t2.x op: 00000000 22: xyz: t6 t2 t8 -> t0.xyz (03808086) w: t0 t0 t0 -> (00000000) xyz: -t6.xyz t2.xxx t8.xyz op: 000202a0 w: t6.x t6.x t6.x op: 00000000 23: xyz: t0 c3 t0 -> t1.xy (018408c0) w: t0 t0 t0 -> (00000000) xyz: t0.xyz c3.xyz t0.xxx op: 40804200 w: t0.x t0.x t0.x op: 00000000 24: xyz: t8 t6 t0 -> t6.x (00980188) w: t0 t0 t0 -> (00000000) xyz: -t8.xyz t6.xyz t8.xxx op: 00804220 w: t8.x t8.x t8.x op: 00000000 25: xyz: t6 t0 t0 -> t6.x (00980006) w: t0 t0 t0 -> (00000000) xyz: t6.xyz 1.0 1.0 op: 00054a80 w: t6.x t6.x t6.x op: 00000000 26: xyz: t6 t0 t0 -> (00000006) w: t0 t0 t0 -> t3.w (008c0000) xyz: t6.xxx t6.xxx t6.xxx op: 00004081 w: t6.x t6.x t6.x op: 04800000 27: xyz: c6 t0 t0 -> (00000026) w: t3 t0 t0 -> t3.w (008c0003) xyz: c6.xxx c6.xxx c6.xxx op: 00004081 w: t3.w c6.x 0.0 op: 00040009 28: xyz: t0 t0 t0 -> t6.x (00980000) w: t3 t0 t0 -> (00000003) xyz: t0.xxx t0.xxx t0.xxx op: 05004081 w: t3.w t0.x t0.x op: 04000009 29: xyz: t6 t0 t0 -> t3.xyz (038c0006) w: t0 t0 t0 -> (00000000) xyz: t6.xxx t6.xxx t6.xxx op: 45004081 w: t6.x t6.x t6.x op: 45000000 NODE 1: alu_offset: 30, tex_offset: 2, alu_end: 5, tex_end: 2 (code_addr: 0044215e) TEX: TEX t6, t4, texture[3] (00009984) TEX t1, t1, texture[2] (00009041) TEX t2, t0, texture[4] (0000a080) 30: xyz: t1 c4 t0 -> t1.xyz (03840901) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c4.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 31: xyz: t1 c5 t0 -> t1.xyz (03840941) w: t0 t0 t0 -> (00000000) xyz: t1.xyz c5.xyz 0.0 op: 00050200 w: t1.x t1.x t1.x op: 00000000 32: xyz: t6 c7 t0 -> t6.xyz (039809c6) w: t0 t0 t0 -> (00000000) xyz: t6.xyz c7.xyz 0.0 op: 00050200 w: t6.x t6.x t6.x op: 00000000 33: xyz: t2 t6 t0 -> t7.xyz (039c0182) w: t0 t0 t0 -> (00000000) xyz: t2.xyz 1.0 -t6.xyz op: 00090a80 w: t2.x t2.x t2.x op: 00000000 34: xyz: t7 t3 t6 -> t7.xyz (039c60c7) w: t0 t0 t0 -> (00000000) xyz: t7.xyz t3.xyz t6.xyz op: 00020200 w: t7.x t7.x t7.x op: 00000000 35: xyz: t7 t1 t0 -> o0.xyz (1c000047) w: t0 t0 t0 -> (00000000) xyz: t7.xyz 1.0 t1.xyz op: 00010a80 w: t7.x t7.x t7.x op: 00000000