class

FGpuWorld

Component arrays in GPU buffers (structure of arrays: one buffer per field) and the kernels that step them, in registration order with a compute barrier between each. A step is recorded into the frame being built (Record) so a draw later in the same frame reads its output, or run on its own and waited for (RunImmediate), which tests and readbacks use.

Module
GpuEcs
Header
#include "GpuEcs/GpuWorld.h"
Namespace
Mowo

Constructors

SignatureNameDescription
FGpuWorld()FGpuWorld
~FGpuWorld()~FGpuWorld
FGpuWorld(const FGpuWorld&) = deleteFGpuWorld

Public functions

ReturnsNameDescription
FGpuWorld&operator=
boolAddBuffer
boolAddKernel
voidSetDomainSize
boolRepeatLastThe last kernels kernels run times times in a row each step — an iterative solver's sweep.
boolUpload
boolSyncToCpu
boolReadLatched
boolRecordRecords every kernel into the open frame (barriers between, and a compute-to-graphics barrier after the last).
boolRunImmediateThe same step in its own frame, waited for: Begin/EndFrame, Present, WaitIdle.
Ref<StorageBuffer>Buffer
uint64_tStepCount
size_tKernelCount
uint64_tBufferBytes

Function details

FGpuWorld

C++
FGpuWorld()

~FGpuWorld

C++
~FGpuWorld()

FGpuWorld

C++
FGpuWorld(const FGpuWorld&) = delete

operator=

C++
FGpuWorld& operator=(const FGpuWorld&) = delete

AddBuffer

C++
bool AddBuffer(const FGpuBufferDesc& desc)

AddKernel

C++
bool AddKernel(const FGpuKernelDesc& desc, std::string* error = nullptr)

SetDomainSize

C++
void SetDomainSize(EGpuDomain domain, uint32_t elements)

RepeatLast

C++
bool RepeatLast(uint32_t kernels, uint32_t times)

The last kernels kernels run times times in a row each step — an iterative solver's sweep.

Upload

C++
bool Upload(const std::string& buffer, const void* data, uint64_t bytes)

SyncToCpu

C++
bool SyncToCpu(const std::string& buffer, void* out, uint64_t bytes)

ReadLatched

C++
bool ReadLatched(const std::string& buffer, void* out, uint64_t bytes)

Record

C++
bool Record(const void* params, uint32_t paramBytes)

Records every kernel into the open frame (barriers between, and a compute-to-graphics barrier after the last). False without a frame.

RunImmediate

C++
bool RunImmediate(const void* params, uint32_t paramBytes)

The same step in its own frame, waited for: Begin/EndFrame, Present, WaitIdle. Use it outside the engine's frame loop only.

Buffer

C++
Ref<StorageBuffer> Buffer(const std::string& name) const

StepCount

C++
uint64_t StepCount() const

KernelCount

C++
size_t KernelCount() const

BufferBytes

C++
uint64_t BufferBytes() const
Generated from GpuEcs/GpuWorld.h via gpuecs.json · Oct 31, 2026Version 1.0.0