N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

## gDPPipelineMode [macro]

Syntax

    #include <ultra64.h> /* gbi.h */
    gDPPipelineMode(Gfx *gdl, u32 mode)
    gsDPPipelineMode(u32 mode)

Arguments

- gdl is the display list pointer.

- mode is the RDP pipeline mode:
  G_PM_1PRIMITIVE (Coherency)
  G_PM_NPRIMITIVE (No coherency -- higher performance)

Explanation
Sets the pipeline mode for span buffer coherency. The RDP has span buffers in order to perform rendering more efficiently.

The different RDP pipeline modes are explained below:

G_PM_1PRIMITIVE
  This mode provides for span buffer coherency.
  When two consecutive spans are rendered in the same screen coordinates, the second span will use as its frame buffer pixel source the frame buffer values of the first span which have not been written to the frame buffer yet. When this mode is executed there will be a slight drop in performance. However, because the second span process waits for the result of the RMW (read-modify-write) operation of the first span, the second span will correctly reflect the results of the first span.
G_PM_NPRIMITIVE
  In this mode there is not span buffer coherency, but you can obtain higher performance. However, in anti-alias rendering mode the drawing will look unnatural and there will be a drop in quality.
  When two consecutive span buffers are rendered in the same screen coordinates, they become shared. Because the second span does not wait for the result of the first span process, it may read a value from the frame buffer that does not reflect the result of the first span buffer (and then afterward write the wrong value to the frame buffer).

For details, see Section 12.2.3, "Span Buffer Coherency," in the N64 Online Programming Manual.

Notes
There is usually no problem with the G_PM_NPRIMITIVE setting, but if the span buffer causes problems with rendering, it is best to set the mode to G_PM_1PRIMITIVE.

Cautions
Idle cycles are needed in order to maintain span buffer coherency with G_PM_1PRIMITIVE mode, and this can lead to a loss in fill rate. This loss will be no greater than 1.5M pixels per second, but because on rare occasions visual abnormalities can arise in the real game due to overlapping of primitives, higher performance can be achieved by using G_PM_NPRIMITIVE mode.

See Also
gDPSetRenderMode

Revision History
2/1/99 Completely rewritten.

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999