nCine/Graphics/RHI/GX2/Gx2Memory.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::GX2
Nintendo Wii U backend driving the Latte GPU through GX2 natively, selected by WITH_RHI_GX2.
namespace nCine::RHI::GX2::Gx2Memory
GPU-visible memory of the GX2 backend.

Classes

struct nCine::RHI::GX2::Gx2Memory::Block
One allocation; Base is both the CPU and the GPU address.

Functions

auto Alloc(std::uint32_t size, std::uint32_t alignment) -> Block
Allocates GPU-visible memory from MEM2.
auto AllocColorSurfaceMem1(const GX2Surface& surface) -> Block
Allocates the image of a colour surface in MEM1, or returns an invalid block if it doesn't fit.
void Free(Block& block)
Releases a block and resets it; the caller must know the GPU is done with it.
void FlushCpuWrites(const void* base, std::uint32_t size, std::uint32_t mode)
Flushes CPU writes to a range out of the data cache and invalidates the GPU caches given by mode.
auto GetAllocatedBytes() -> std::uint32_t
Bytes currently allocated through Alloc().
auto GetMem1Bytes() -> std::uint32_t
Bytes currently allocated through AllocColorSurfaceMem1().