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>
| 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). |