The Operation 27
© 2006 Advanced Micro Devices, Inc.
ATI CTM Guide v. 1.01
Select
Each input selects from src0, src1, src2, or the presubtract result ("srcp"). One can conceive of the selects assembling
a 4-component vector as seen below. The swizzle selects (see next section) determine which of the four values are
chosen to actually take part in the computations.
The RGB and alpha units each take three operands, A, B, and C. These operands are selected with the RGB_SEL_x
and ALPHA_SEL_x fields. Note that src0, src1 and src2 are fetched from a combination of the RGB and alpha source
addresses. If the RGB unit swizzles in an alpha component, the alpha component will always come from alpha_addr*.
Similarly, if the alpha unit swizzles in an RGB component, it will always come from rgb_addr*.
Swizzle
Each component of each input can specify one of seven values. Each component can select R, G, B, or A from the
selected source, or it can choose 0, 0.5, or 1. The RGB unit has 3 components, so there are three swizzle select fields
per input. The Alpha unit only has 1 swizzle select per input.
The RGB unit always uses the RGB selectors (RGB_SEL_x) and, except for one case noted below, the red
(RED_SWIZ_x), green (GREEN_SWIZ_x), and blue (BLUE_SWIZ_x) swizzle selects. The alpha unit always uses
the alpha selectors (ALPHA_SEL_x) and the alpha (ALPHA_SWIZ_x) swizzle selects.
DP4 is a special case in that it is an RGB operation which operates on 4 components instead of 3. The fourth input
component is configured with the Alpha's select (ALPHA_SEL_x) and swizzle (ALPHA_SWIZ_x). This is the only
case where the Alpha's swizzle has an effect on the RGB computation's input.
Input Modifier
Each input has a modifier applied to it. The modifier can be one of:
• IMOD_OFF - No modification
• IMOD_NEG - Negate
• IMOD_ABS - Take absolute value
• IMOD_NAB - Take negative of absolute value
3.3.4
The Operation
Following are the possible math operations the ALU can perform. The three inputs are denoted by A, B, and C.
Input Select/
Presubtract
4-component Vector
src0 =
{ rgb_addr0->r
{ rgb_addr0->g
{ rgb_addr0->b
{ alpha_addr0->a
src1 =
{ rgb_addr1->r
{ rgb_addr1->g
{ rgb_addr1->b
{ alpha_addr1->a
src2 =
{ rgb_addr2->r
{ rgb_addr2->g
{ rgb_addr2->b
{ alpha_addr2->a
srcp =
{ rgb_srcp_result.r = rgb_srcp_op(rgb_addr0->r, rgb_addr1->r)
{ rgb_srcp_result.g = rgb_srcp_op(rgb_addr0->g, rgb_addr1->g)
{ rgb_srcp_result.b = rgb_srcp_op(rgb_addr0->b, rgb_addr1->b)
{ alpha_srcp_result.a = alpha_srcp_op(alpha_addr0->a, alpha_addr1->a)
Содержание ATI CTM
Страница 1: ...ATI CTM Guide Technical Reference Manual Version 1 01...
Страница 6: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 2 Related Documents...
Страница 48: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 44 Errata...
Страница 54: ...ATI CTM Guide v 1 01 2006 Advanced Micro Devices Inc 50 Executable Files...