psl1ght
A free SDK for Sony's PS3 console
|
RSX library. More...
Go to the source code of this file.
Functions | |
gcmContextData * | rsxInit (const u32 cmdSize, const u32 ioSize, const void *ioAddress) |
Initialize the RSX context and the RSX memory manager. More... | |
void | rsxFlushBuffer (gcmContextData *context) |
Flushes the RSX command buffer. More... | |
void | rsxResetCommandBuffer (gcmContextData *context) |
Reset the RSX command buffer. More... | |
void | rsxFinish (gcmContextData *context, u32 ref_value) |
void | rsxSetupContextData (gcmContextData *context, const u32 *addr, const u32 size, gcmContextCallback cb) |
static s32 | rsxAddressToOffset (void *ptr, u32 *offset) |
Converts a pointer value in RSX memory to an offset. More... | |
static s32 | rsxGetFixedSint32 (const f32 f) |
Convert a floating point coordinate into 32-bit signed fixed point format. | |
static u16 | rsxGetFixedUint16 (const f32 f) |
Convert a floating point coordinate into 16-bit unsigned fixed point format. | |
RSX library.
This library contains the necessary functions for handling the RSX, the accelerated 3D chip of the PS3.
|
inlinestatic |
Converts a pointer value in RSX memory to an offset.
ptr | The pointer whose value is to be converted. |
offset | A pointer to the returned offset value. |
void rsxFlushBuffer | ( | gcmContextData * | context | ) |
Flushes the RSX command buffer.
This ensures all remaining commands in the command buffer are executed, and that the buffer is empty when that function returns.
context | Pointer to the context object. |
gcmContextData* rsxInit | ( | const u32 | cmdSize, |
const 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.
cmdSize | The command buffer size. |
ioSize | The allocated IO buffer size. |
ioAddress | Pointer to an allocated buffer of ioSize bytes. |
void rsxResetCommandBuffer | ( | gcmContextData * | context | ) |
Reset the RSX command buffer.
context | Pointer to the context object. |