AMD ATI CTM Technical Reference Manual page 32

Table of Contents

Advertisement

28 ALU Instructions
OP_RGB_SOP / OP_ALPHA_DP
• Get results from the other unit's unique ops. In the case of RGB_SOP, the result is replicated to all three
channels. RGB's unique ops all have scalar results, so ALPHA_DP simply copies that scalar result to its alpha
destination.
• RGB_SOP is only valid if the alpha operation is a transcendental operation: EX2, LN2, RCP, RSQ, SIN, COS.
ALPHA_DP is only valid if the RGB operation is a dot product: DP3, DP4, D2A.
OP_RGB_MAD / OP_ALPHA_MAD
• A * B + C
OP_RGB_MIN / OP_ALPHA_MIN
• A < B ? A : B
• Minimum of A and B.
OP_RGB_MAX / OP_ALPHA_MAX
• A >= B ? A : B
• Maximum of A and B.
OP_RGB_CND / OP_ALPHA_CND
• C > 0.5 ? A : B
OP_RGB_CMP / OP_ALPHA_CMP
• C >= 0 ? A : B
OP_RGB_FRC / OP_ALPHA_FRC
• A - floor(A)
• floor(A) is the largest integer value less than or equal to A.
OP_RGB_DP3
• A.r*B.r + A.g*B.g + A.b*B.b
• Results are broadcast to all 3 channels.
• Use OP_ALPHA_DP to get result into Alpha.
OP_RGB_DP4
• A.r*B.r + A.g*B.g + A.b*B.b + A.a*B.a
• Results are broadcast to all 3 channels.
• Use OP_ALPHA_DP to get result into Alpha.
• Note that ".a" actually comes from the alpha instruction's swizzle and select (see the section on swizzle above).
OP_RGB_D2A
• A.r*B.r + A.g*B.g + C.b
• Results are broadcast to all 3 channels.
• Use OP_ALPHA_DP to get result into Alpha.
OP_ALPHA_EX2
• 2 ^ A
• Use OP_RGB_SOP to get result into RGB.
OP_ALPHA_LN2
• log2(A)
• Use OP_RGB_SOP to get result into RGB.
ATI CTM Guide v. 1.01
© 2006 Advanced Micro Devices, Inc.

Advertisement

Table of Contents
loading

Table of Contents