Epok Engine

PSYQO SDK

psyqo::GTE::read

Function · 5 overloads

Function

Reads read as part of Geometry Transformation Engine math and register operations.

Belongs to
psyqo::GTE
Header
gte-registers.hh
Overloads
5

Declaration 1 of 5

template
Declaration
template <> [[deprecated("Use the reference version instead")]] inline void read<PseudoRegister::LV>(Vec3* ptr)

Reads read as part of Geometry Transformation Engine math and register operations.

ParameterTypeMeaning
ptrVec3 *Value supplied for ptr. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Assume these named values have been initialized with valid data:
// Vec3 * ptr

psyqo::GTE::read(ptr);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:967

Declaration 2 of 5

template
Declaration
template <> inline void read<PseudoRegister::LV>(Vec3& ptr)

Reads read as part of Geometry Transformation Engine math and register operations.

ParameterTypeMeaning
ptrVec3 &Value supplied for ptr. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Assume these named values have been initialized with valid data:
// Vec3 & ptr

psyqo::GTE::read(ptr);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:974

Declaration 3 of 5

static · template
Declaration
template <PseudoRegister reg, bool valid = false> [[deprecated("Use the reference version instead")]] static inline void read(Vec3* ptr)

Reads read as part of Geometry Transformation Engine math and register operations.

ParameterTypeMeaning
ptrVec3 *Value supplied for ptr. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Replace these template arguments with types or values accepted by the declaration:
// reg, valid

// Assume these named values have been initialized with valid data:
// Vec3 * ptr

psyqo::GTE::read<reg, valid>(ptr);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:440

Declaration 4 of 5

static · template
Declaration
template <PseudoRegister reg, bool valid = false> static inline void read(Vec3& vec)

Reads read as part of Geometry Transformation Engine math and register operations.

ParameterTypeMeaning
vecVec3 &Value supplied for vec. Keep referenced or pointed-to data valid for the complete call.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Replace these template arguments with types or values accepted by the declaration:
// reg, valid

// Assume these named values have been initialized with valid data:
// Vec3 & vec

psyqo::GTE::read<reg, valid>(vec);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:448

Declaration 5 of 5

static · template
Declaration
template <Register reg> static inline void read(uint32_t* ptr)

Read a 32-bits value from a GTE register to memory.

ParameterTypeMeaning
ptruint32_t *The pointer to the memory location to write to.

Returns: Nothing (void).

Example

C++ example
#include "psyqo/gte-registers.hh"

// Replace these template arguments with types or values accepted by the declaration:
// reg

// Assume these named values have been initialized with valid data:
// uint32_t * ptr

psyqo::GTE::read<reg>(ptr);

Why use it

Template dispatch is resolved at compile time and normally adds no runtime indirection.

Trade-offs and warnings

Every instantiated type must satisfy the header's compile-time requirements; extra instantiations can increase code size. Pointer/reference arguments are borrowed unless the source contract says otherwise; keep them valid for the complete operation and never assume null is accepted.

Declared in https://github.com/pcsx-redux/nugget/blob/6186b131aacc5853a9161fb076ed34ffe504552d/psyqo/gte-registers.hh:396

Related members