Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
structured_buffer.h
1 #pragma once
2 
3 #include "gpu_buffer.h"
4 #include "byte_address_buffer.h"
5 
6 namespace blowbox
7 {
8  class CommandContext;
9 
18  class StructuredBuffer : public GpuBuffer
19  {
20  public:
22  virtual void Destroy() override;
23 
25  virtual void CreateDerivedViews() override;
26 
29 
32 
37  const UINT& GetCounterSRV(CommandContext& context);
38 
43  const UINT& GetCounterUAV(CommandContext& context);
44 
45  private:
47  };
48 }
ByteAddressBuffer & GetCounterBuffer()
Definition: structured_buffer.h:28
Wrapper around D3D12 command lists.
Definition: command_context.h:77
const UINT & GetCounterSRV(CommandContext &context)
Definition: structured_buffer.cc:49
ByteAddressBuffer counter_buffer_
The counter buffer for this StructuredBuffer, used to keep track of how large the StructuredBuffer is...
Definition: structured_buffer.h:46
virtual void CreateDerivedViews() override
Creates the necessary descriptors (views) for this StructuredBuffer.
Definition: structured_buffer.cc:18
Wrapper for random access buffers.
Definition: byte_address_buffer.h:13
const UINT & GetCounterUAV(CommandContext &context)
Definition: structured_buffer.cc:56
Wraps buffer-type GpuResource's.
Definition: gpu_buffer.h:17
The main Blowbox namespace.
Definition: image.cc:8
const ByteAddressBuffer & GetCounterBuffer() const
Definition: structured_buffer.h:31
Wrapper for StructuredBuffer types.
Definition: structured_buffer.h:18
virtual void Destroy() override
Destroys the StructuredBuffer.
Definition: structured_buffer.cc:11