KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Direct Rendering

API for using direct rendering with the PVR More...

Macros

#define pvr_dr_target(vtx_buf_ptr)
 Obtain the target address for Direct Rendering.
 
#define pvr_dr_commit(addr)
 Commit a primitive written into the Direct Rendering target address.
 

Typedefs

typedef uint32_t pvr_dr_state_t
 Direct Rendering state variable type.
 

Functions

void pvr_dr_init (pvr_dr_state_t *vtx_buf_ptr)
 Initialize a state variable for Direct Rendering.
 
void pvr_dr_finish (void)
 Finish work with Direct Rendering.
 
void pvr_send_to_ta (void *data)
 Upload a 32-byte payload to the Tile Accelerator.
 

Detailed Description

API for using direct rendering with the PVR

Macro Definition Documentation

◆ pvr_dr_commit

#define pvr_dr_commit ( addr)
Value:
sq_flush(addr)
#define sq_flush(dest)
Write-back one Store Queue.
Definition sq.h:114

Commit a primitive written into the Direct Rendering target address.

Parameters
addrThe address returned by pvr_dr_target(), after you have written the primitive to it.

◆ pvr_dr_target

#define pvr_dr_target ( vtx_buf_ptr)
Value:
({ (vtx_buf_ptr) ^= 32; \
(pvr_vertex_t *)(MEM_AREA_SQ_BASE | (vtx_buf_ptr)); \
})
#define MEM_AREA_SQ_BASE
Store Queue (SQ) memory base.
Definition memory.h:119
Generic PVR vertex type.
Definition pvr.h:833

Obtain the target address for Direct Rendering.

Parameters
vtx_buf_ptrState variable for Direct Rendering. Should be of type pvr_dr_state_t, and must have been initialized previously in the scene with pvr_dr_init().
Returns
A write-only destination address where a primitive should be written to get ready to submit it to the TA in DR mode.

Typedef Documentation

◆ pvr_dr_state_t

typedef uint32_t pvr_dr_state_t

Direct Rendering state variable type.

Function Documentation

◆ pvr_dr_finish()

void pvr_dr_finish ( void )

Finish work with Direct Rendering.

Called atomatically in pvr_scene_finish(). Use it manually if you want to release Store Queues earlier.

◆ pvr_dr_init()

void pvr_dr_init ( pvr_dr_state_t * vtx_buf_ptr)

Initialize a state variable for Direct Rendering.

Store Queues are used.

Parameters
vtx_buf_ptrA variable of type pvr_dr_state_t to init.

◆ pvr_send_to_ta()

void pvr_send_to_ta ( void * data)

Upload a 32-byte payload to the Tile Accelerator.

Upload the given payload to the Tile Accelerator. The difference with the Direct Rendering approach above is that the Store Queues are not used, and therefore can be used for anything else.

Parameters
dataA pointer to the 32-byte payload. The pointer must be aligned to 8 bytes.