Boxis R700 Manuel d'utilisateur Page 54

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 392
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 53
ATI R700 Technology
3-18 Branch and Loop Instructions
Copyright © 2009 Advanced Micro Devices, Inc. All rights reserved.
it performs POP_COUNT number of pops (may be zero), then jumps to a
specified address if all pixels fail the test.
POP - pops per-pixel state from the stack to hardware-maintained registers; it
pops the POP_COUNT number of entries (can be zero). POP can apply the
condition test to the result of the POP, this is useful for disabling pixels that
are killed within a conditional block. To disable such pixels, set the POP
instruction’s VALID_PIXEL_MODE bit, and set the condition to
CF_COND_ACTIVE. If POP_COUNT is zero, the POP instruction simply modifies
the current per-pixel state based on the result of the condition test. Pop
instructions never jump.
ELSE - performs a conceptual else operation. It starts by popping
POP_COUNT entries (can be zero) from the stack. Then, it inverts the sense
of active and branch-inactive pixels for pixels that are both active (as of the
last surviving PUSH operation) and pass the condition test. The ELSE
operation will then jump to the specified address if all pixels are inactive.
JUMP - is used to jump over blocks of code that no pixel wants to execute.
JUMP first pops POP_COUNT entries (may be zero) from the stack. It then
applies the condition test to all pixels. If all pixels fail the test, it jumps to the
specified address; otherwise, it continues execution on the next instruction.
3.7.3 DirectX9 Loops
DirectX9-style loops are implemented with the LOOP_START and LOOP_END
instructions. Both instructions specify the DirectX9 integer constant using the
CF_CONST microcode field. This field specifies the integer constant to use for the
loop’s trip count (maximum number of loops), beginning value (loop index
initializer), and increment (step). The constant is a host-written vector, and the
three loop parameters are stored as three elements of the vector. The COND field
also can refer to the CF_CONST field for its boolean value. It is not be possible to
conditionally enter a loop based on a boolean constant unless the boolean
constant and integer constant have the same numerical address.
The LOOP_START instruction jumps to the address specified in the instruction’s
ADDR field if the initial loop count is zero. Software normally sets the ADDR field to
the CF instruction following the matching LOOP_END instruction. If LOOP_START
does not jump, hardware sets up the internal loop state. Loop-index-relative
addressing (as specified by the INDEX_MODE field of the ALU_DWORD0 microcode
format) is well-defined only within the loop. If multiple loops are nested, relative
addressing refers to the loop register of the innermost loop. The loop register of
the next-outer loop is automatically restored when the innermost loop exits.
The LOOP_END instruction jumps to the address specified in the instruction’s ADDR
field if the loop count is nonzero after it is decremented, and at least one pixel
has not been deactivated by a LOOP_BREAK instruction. Normally, software sets
the ADDR field to the CF instruction following the matching LOOP_START. The
LOOP_END instruction continues to the next CF instruction when the processor
exits the loop.
Vue de la page 53
1 2 ... 49 50 51 52 53 54 55 56 57 58 59 ... 391 392

Commentaires sur ces manuels

Pas de commentaire