Sources 25
© 2006 Advanced Micro Devices, Inc.
ATI CTM Guide v. 1.01
• ALU instruction dependent on TEX for lookup result. Synchronized using the texture semaphore.
A texture or FC instruction that uses a result computed by a prior ALU instruction should set the ALU_WAIT bit.
This forces processing for the thread to stall until pending ALU instructions are complete.
Note that a static FC instruction never needs to set ALU_WAIT, since it never depends on a result computed within
the program. Also, an ALU instruction never needs to set ALU_WAIT—dependencies amongst ALU instructions
are resolved internally.
The texture semaphore is used to synchronize the output of a texture instruction with a subsequent ALU or texture
instruction that uses that result. It is also used to synchronize uncached writes. The texture semaphore is described
in more detail below.
3.3
ALU Instructions
An ALU instruction actually consists of an RGB vector instruction and an Alpha scalar instruction.
There are only a few operations that only one or the other unit can compute, but in each case there is a special
instruction the other engine can use to copy the result.
3.3.1
Sources
Each instruction can specify the addresses for 6 different sources -- 3 RGB vectors and 3 Alpha scalars. Each source
can either come from one of 128 temporary registers (which can be modified during the program, and be different for
each processor), or from one of 256 constant registers (which can only be changed when a program is not running).
In addition, a source can be an inline constant. The loop variable (aL) may be added to any combination of source
addresses, but may not be added to an inline constant.
Each color register (temporary and constant) consists of a 3-component RGB vector and a scalar Alpha value.
Inline constants are unsigned floating-point values with 4 bits of exponent (with bias 7) and 3 bits mantissa. Inline
constants represent finite values only—there is no representation for NaN or infinity. Inline constants can express
denormal values though. Also, the bit pattern 0x0 represents 2^-10, rather than zero. Example values are shown
below:
You can obtain negative inline constants and the value zero using the input modifiers and swizzles, described below.
EXPONENT
MANTISSA
2^-10
0x0
0x0
2^-9
0x0
0x1
2^-8
0x0
0x2
2^-7
0x0
0x4
2^-6
0x1
0x0
1
0x7
0x0
256
0xf
0x0
480
0xf
0x7
Содержание 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...