FGuardedTripleBuffer::FGuardedTripleBuffer

This class implements a circular buffer access pattern, such that during normal serial operation each buffer will be used.

Windows
MacOS
Linux

References

Module

Chaos

Header

/Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/MultiBufferResource.h

Include

#include "Chaos/Framework/MultiBufferResource.h"

Syntax

FGuardedTripleBuffer()

Remarks

This class implements a circular buffer access pattern, such that during normal serial operation each buffer will be used. However, we can alter how we use the API to use only 2 or 1 buffer:

SERIAL ACCESS BUFFER USE - NORMAL OPERATION: P C I Init: 0, 1, 2

AccP: *0, 1, 2 - *write access Flip: 2, 1, 0 Cons: 2, 0, 1 - read access

AccP: *2, 0, 1 Flip: 1, 0, 2 Cons: 1, ^2, 0

AccP: *1, 2, 0 Flip: 0, 2, 1 Cons: 0, ^1, 2

SERIAL ACCESS BUFFER USE - DOUBLE BUFFER EMULATION: Init: 0, 1, 2

AccP: *0, 1, 2 - *write access Flip: 2, 1, 0 Cons: 2, 0, 1 - read access Flip: 1, 0, 2 <- Add an extra flip and only use 2 buffers.

AccP: *1, 0, 2 Flip: 2, 0, 1 Cons: 2, ^1, 0 Flip: 0, 1, 2

SERIAL ACCESS BUFFER USE - SINGLE BUFFER EMULATION: Init: 0, 1, 2

AccP: *0, 1, 2 - *write access Flip: 2, 1, 0 Cons: 2, 0, 1 - read access Cons: 2, 1, 0 <- Add an extra consume... Flip: 0, 1, 2 <- and an extra flip and only use 1 buffer.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss