nCine/Graphics/RHI/GXM/GxmMemory.h file

Namespaces

namespace nCine
Root namespace of nCine game engine.
namespace nCine::RHI
Render Hardware Interface — compile-time-selectable graphics backend abstraction.
namespace nCine::RHI::GXM
namespace nCine::RHI::GXM::GxmMemory
GPU-visible memory of the sceGxm backend.

Classes

struct nCine::RHI::GXM::GxmMemory::Block
A GPU-visible allocation: the kernel block that owns it and its CPU-side base address.

Enums

enum class Kind { Mapped, VertexUsse, FragmentUsse }
Which address space a block was mapped into (it decides the unmap call Free() has to issue).

Functions

auto Alloc(const char* name, std::uint32_t size, SceGxmMemoryAttribFlags attribs) -> Block
Allocates GPU-visible memory from main LPDDR and maps it for the GPU.
auto AllocCdram(const char* name, std::uint32_t size, SceGxmMemoryAttribFlags attribs) -> Block
Allocates GPU-visible memory from CDRAM and maps it for the GPU.
auto AcquireSurface(const char* name, std::uint32_t stride, std::uint32_t height) -> Block
Acquires CDRAM for a render target's texels, at an address reserved for that exact geometry.
void ReleaseSurface(Block& block)
Retires a block from AcquireSurface(), keeping its address reserved for the same geometry.
auto AllocVertexUsse(const char* name, std::uint32_t size) -> Block
Allocates memory in the vertex USSE window (for the shader patcher's compiled vertex programs).
auto AllocFragmentUsse(const char* name, std::uint32_t size) -> Block
Allocates memory in the fragment USSE window (for the shader patcher's compiled fragment programs).
void Free(Block& block)
Unmaps and releases a block obtained from any of the allocators above.
auto GetAllocatedBytes() -> std::uint32_t
Returns the total number of bytes currently reserved through this allocator (for the memory report).

Variables

SceUID InvalidUid constexpr
Value Block::Uid carries when an allocation failed (the SDK has no SCE_UID_INVALID_UID macro).