PSPSDK 2024-12-16
Loading...
Searching...
No Matches
pspvfpu.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define VMAT0   (1<<0)
 
#define VMAT1   (1<<1)
 
#define VMAT2   (1<<2)
 
#define VMAT3   (1<<3)
 
#define VMAT4   (1<<4)
 
#define VMAT5   (1<<5)
 
#define VMAT6   (1<<6)
 
#define VMAT7   (1<<7)
 
#define VFPU_ALIGNMENT   (sizeof(float) * 4) /* alignment required for VFPU matrix loads and stores */
 

Typedefs

typedef unsigned char vfpumatrixset_t
 

Functions

struct pspvfpu_contextpspvfpu_initcontext (void)
 Prepare to use the VFPU.
 
void pspvfpu_deletecontext (struct pspvfpu_context *context)
 Delete a VFPU context.
 
void pspvfpu_use_matrices (struct pspvfpu_context *context, vfpumatrixset_t keepset, vfpumatrixset_t tempset)
 Use a set of VFPU matrices.
 

Macro Definition Documentation

◆ VFPU_ALIGNMENT

#define VFPU_ALIGNMENT   (sizeof(float) * 4) /* alignment required for VFPU matrix loads and stores */

◆ VMAT0

#define VMAT0   (1<<0)

◆ VMAT1

#define VMAT1   (1<<1)

◆ VMAT2

#define VMAT2   (1<<2)

◆ VMAT3

#define VMAT3   (1<<3)

◆ VMAT4

#define VMAT4   (1<<4)

◆ VMAT5

#define VMAT5   (1<<5)

◆ VMAT6

#define VMAT6   (1<<6)

◆ VMAT7

#define VMAT7   (1<<7)

Typedef Documentation

◆ vfpumatrixset_t

Function Documentation

◆ pspvfpu_deletecontext()

void pspvfpu_deletecontext ( struct pspvfpu_context context)

Delete a VFPU context.

This frees the resources used by the VFPU context.

Parameters
contextThe VFPU context to be deleted.

References c, i, NMAT, and NULL.

◆ pspvfpu_initcontext()

struct pspvfpu_context * pspvfpu_initcontext ( void  )

Prepare to use the VFPU.

This set's the calling thread's VFPU attribute, and returns a pointer to some VFPU state storage. The initial value all all VFPU matrix registers is undefined.

Returns
A VFPU context

References c, NULL, PSP_THREAD_ATTR_VFPU, sceKernelChangeCurrentThreadAttr(), VFPU_ALIGNMENT, and x.

◆ pspvfpu_use_matrices()

void pspvfpu_use_matrices ( struct pspvfpu_context context,
vfpumatrixset_t  keepset,
vfpumatrixset_t  tempset 
)

Use a set of VFPU matrices.

This restores the parts of the VFPU state the caller wants restored (if necessary). If the caller was the previous user of the the matrix set, then this call is effectively a no-op. If a matrix has never been used by this context before, then it will initially have an undefined value.

Parameters
contextThe VFPU context the caller wants to restore from. It is valid to pass NULL as a context. This means the caller wants to reserve a temporary matrix without affecting other VFPU users, but doesn't want any long-term matrices itself.
keepsetThe set of matrices the caller wants to use, and keep the values persistently.
tempsetA set of matrices the callers wants to use temporarily, but doesn't care about the values in the long-term.

References c, NULL, and x.