3 #include "renderer/d3d12_includes.h" 4 #include "renderer/device.h" 5 #include "renderer/buffers/gpu_buffer.h" 6 #include "renderer/buffers/byte_address_buffer.h" 8 #include "util/string.h" 29 void Create(
const WString& name, UINT num_elements, UINT element_size,
void* initial_data =
nullptr);
35 virtual void Destroy()
override;
bool is_mapped_
Is the buffer currently mapped to CPU memory?
Definition: upload_buffer.h:79
BYTE * GetMappedData()
Definition: upload_buffer.cc:130
void ClearDataByBuffer()
Clear all data that resides in the entire buffer and set it to 0x0.
Definition: upload_buffer.cc:115
void Unmap()
"Unmaps" the resource from CPU memory to GPU memory, making it non-writable & non-readable ...
Definition: upload_buffer.cc:81
void InsertDataByBuffer(void *data, UINT size_of_data_in_bytes)
Set ALL data in the UploadBuffer to what you pass in. Throws an error when (size_of_data_in_bytes != ...
Definition: upload_buffer.cc:109
virtual void CreateDerivedViews() override
Creates any views that this buffer type may have.
Definition: upload_buffer.cc:47
Wraps buffer-type GpuResource's.
Definition: gpu_buffer.h:17
eastl::wstring WString
Typedef for wrapping the EASTL wstring.
Definition: string.h:20
The main Blowbox namespace.
Definition: image.cc:8
void Create(const WString &name, UINT num_elements, UINT element_size, void *initial_data=nullptr)
Creates the upload buffer.
Definition: upload_buffer.cc:10
Wraps upload buffer types, which allow you to upload data to the GPU.
Definition: upload_buffer.h:19
void ClearDataByElement(UINT element_id)
Clear all data that resides in an element and set it to 0x0.
Definition: upload_buffer.cc:103
void Map()
"Maps" the resource from GPU memory to CPU memory, making it writable & readable (although reading is...
Definition: upload_buffer.cc:71
D3D12_GPU_VIRTUAL_ADDRESS GetAddressByElement(UINT element_id)
Query for the GPU memory address of an element in the UploadBuffer.
Definition: upload_buffer.cc:121
virtual void Destroy() override
Destroys this resource and clears it from GPU memory.
Definition: upload_buffer.cc:64
void InsertDataByElement(UINT element_id, void *data)
Insert data into the buffer by a certain element index. Make sure the resource has been Map()-ed to C...
Definition: upload_buffer.cc:91
BYTE * mapped_data_
The data that is mapped to CPU memory - can be freely written to and read from when it is mapped...
Definition: upload_buffer.h:80