psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
rsx.h File Reference

RSX library. More...

#include <rsx/mm.h>
#include <rsx/gcm_sys.h>
#include <rsx/rsx_program.h>
#include <rsx/commands.h>

Go to the source code of this file.

Functions

s32 rsxInit (gcmContextData **context, u32 cmdSize, u32 ioSize, const void *ioAddress)
 Initialize the RSX context and the RSX memory manager.
 
void rsxSetupContextData (gcmContextData *context, const u32 *addr, u32 size, gcmContextCallback cb)
 
void rsxSetCurrentBuffer (gcmContextData **context, const u32 *addr, u32 size)
 
void rsxSetDefaultCommandBuffer (gcmContextData **context)
 
void rsxSetUserCallback (gcmContextCallback cb)
 
u32 * rsxGetCurrentBuffer ()
 
static s32 rsxAddressToOffset (const void *ptr, u32 *offset)
 Converts a pointer value in RSX memory to an offset.
 
static s32 rsxGetFixedSint32 (f32 f)
 Convert a floating point coordinate into 32-bit signed fixed point format.
 
static u16 rsxGetFixedUint16 (f32 f)
 Convert a floating point coordinate into 16-bit unsigned fixed point format.
 
static u32 rsxAlign (u32 alignment, u32 value)
 

Variables

gcmContextData *gGcmContext ATTRIBUTE_PRXPTR
 Pointer to default command buffer context.
 

Detailed Description

RSX library.

This library contains the necessary functions for handling the RSX, the accelerated 3D chip of the PS3.

Definition in file rsx.h.

Function Documentation

◆ rsxAddressToOffset()

static s32 rsxAddressToOffset ( const void *  ptr,
u32 *  offset 
)
inlinestatic

Converts a pointer value in RSX memory to an offset.

Parameters
ptrThe pointer whose value is to be converted.
offsetA pointer to the returned offset value.
Returns
zero if no error occured, nonzero otherwise.

Definition at line 121 of file rsx.h.

◆ rsxAlign()

static u32 rsxAlign ( u32  alignment,
u32  value 
)
inlinestatic

Definition at line 138 of file rsx.h.

◆ rsxGetCurrentBuffer()

u32 * rsxGetCurrentBuffer ( )

◆ rsxGetFixedSint32()

static s32 rsxGetFixedSint32 ( f32  f)
inlinestatic

Convert a floating point coordinate into 32-bit signed fixed point format.

Definition at line 127 of file rsx.h.

◆ rsxGetFixedUint16()

static u16 rsxGetFixedUint16 ( f32  f)
inlinestatic

Convert a floating point coordinate into 16-bit unsigned fixed point format.

Definition at line 133 of file rsx.h.

◆ rsxInit()

s32 rsxInit ( gcmContextData **  context,
u32  cmdSize,
u32  ioSize,
const void *  ioAddress 
)

Initialize the RSX context and the RSX memory manager.

The user must provide a 1 MB-aligned IO buffer allocated in main memory, which size is a multiple of 1 megabyte.

This function initializes a heap structure in RSX memory space, allowing dynamic memory allocation using rsxMalloc, rsxMemalign and rsxFree.

Parameters
contextPointer to receive the address of the default command buffer
cmdSizeThe command buffer size.
ioSizeThe allocated IO buffer size.
ioAddressPointer to an allocated buffer of ioSize bytes.
Returns
zero if no error occured, nonzero otherwise.

◆ rsxSetCurrentBuffer()

void rsxSetCurrentBuffer ( gcmContextData **  context,
const u32 *  addr,
u32  size 
)

◆ rsxSetDefaultCommandBuffer()

void rsxSetDefaultCommandBuffer ( gcmContextData **  context)

◆ rsxSetupContextData()

void rsxSetupContextData ( gcmContextData context,
const u32 *  addr,
u32  size,
gcmContextCallback  cb 
)

◆ rsxSetUserCallback()

void rsxSetUserCallback ( gcmContextCallback  cb)

Variable Documentation

◆ ATTRIBUTE_PRXPTR

gcmContextData* gGcmContext ATTRIBUTE_PRXPTR
extern

Pointer to default command buffer context.