MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Structured

Function Structured

Source/Engine/Graphics/GPUBufferDescription.h:297–303  ·  view source on GitHub ↗

Creates structured buffer description. The element count. Size of the element (in bytes). if set to true [is unordered access]. The buffer description. Example in HLSL: StructuredBuffer<float4> or RWStructuredBuffer<float4&gt

Source from the content-addressed store, hash-verified

295 /// Example in HLSL: StructuredBuffer<float4> or RWStructuredBuffer<float4> for structured buffers supporting unordered access.
296 /// </remarks>
297 static GPUBufferDescription Structured(int32 elementCount, int32 elementSize, bool isUnorderedAccess = false)
298 {
299 auto bufferFlags = GPUBufferFlags::Structured | GPUBufferFlags::ShaderResource;
300 if (isUnorderedAccess)
301 bufferFlags |= GPUBufferFlags::UnorderedAccess;
302 return Buffer(elementCount * elementSize, bufferFlags, PixelFormat::Unknown, nullptr, elementSize);
303 }
304
305 /// <summary>
306 /// Creates append buffer description (structured buffer).

Callers 2

InitDescMethod · 0.85
ToGPUMethod · 0.85

Calls 1

BufferClass · 0.50

Tested by

no test coverage detected