psl1ght
A free SDK for Sony's PS3 console
rsx.h
Go to the documentation of this file.
1 
77 #ifndef __RSX_H__
78 #define __RSX_H__
79 
80 #include <rsx/mm.h>
81 #include <rsx/gcm_sys.h>
82 #include <rsx/rsx_program.h>
83 #include <rsx/commands.h>
84 
85 #ifdef __cplusplus
86 extern "C" {
87 #endif
88 
102 gcmContextData* rsxInit(const u32 cmdSize,const u32 ioSize,const void *ioAddress);
103 
110 void rsxFlushBuffer(gcmContextData *context);
111 
116 void rsxFinish(gcmContextData *context,u32 ref_value);
117 void rsxSetupContextData(gcmContextData *context,const u32 *addr,const u32 size,gcmContextCallback cb);
118 
124 static inline s32 rsxAddressToOffset(void *ptr,u32 *offset)
125 {
126  return gcmAddressToOffset(ptr,offset);
127 }
128 
130 static inline s32 rsxGetFixedSint32(const f32 f)
131 {
132  return (s32)(f*1048576.0f);
133 }
134 
136 static inline u16 rsxGetFixedUint16(const f32 f)
137 {
138  return (u16)(f*16.0f);
139 }
140 
141 #ifdef __cplusplus
142  }
143 #endif
144 
145 #endif
static s32 rsxGetFixedSint32(const f32 f)
Convert a floating point coordinate into 32-bit signed fixed point format.
Definition: rsx.h:130
static s32 rsxAddressToOffset(void *ptr, u32 *offset)
Converts a pointer value in RSX memory to an offset.
Definition: rsx.h:124
RSX shader programming management.
RSX memory management.
RSX commands.
static u16 rsxGetFixedUint16(const f32 f)
Convert a floating point coordinate into 16-bit unsigned fixed point format.
Definition: rsx.h:136
RSX Context data structure.
Definition: gcm_sys.h:412
void rsxFlushBuffer(gcmContextData *context)
Flushes the RSX command buffer.
void rsxResetCommandBuffer(gcmContextData *context)
Reset the RSX command buffer.
gcmContextData * rsxInit(const u32 cmdSize, const u32 ioSize, const void *ioAddress)
Initialize the RSX context and the RSX memory manager.
s32 gcmAddressToOffset(void *address, u32 *offset)
Converts an effective address in RSX memory to an offset.
RSX low level management.