====== Pick ====== Pick records whether drawing passed visibility tests. [[registers:pixel-engine:pixel_pick|spr Pick]] writes PickValid at bit 16 and PickHit at bit 17. The current bits are readable in [[registers:risc-special:risc_37|Flag]]. Both are unspecified after reset. PickHit becomes set when a pixel passes scissor, pattern, Z and alpha tests. This happens before PMask, so a zero plane mask does not prevent a visibility hit. The specification's sequence sets PickValid, draws the test primitives, waits for PixelBusy to clear, reads PickHit, then clears PickValid. Clear PickHit when starting a new test. Read the final result after the drawing engines are idle. spr Pick, if1_0 ; PickValid = 1, PickHit = 0 ... draw test primitives ... ... wait until Flag.PixelBusy = 0 ... ... read Flag.PickHit ... spr Pick, zero The notation above follows the operation sequence; it is not a complete dispatch-loop routine. Source: [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=36|Technical Spec, p.36]]