MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / UpdateData

Method UpdateData

SampleFramework12/v1.00/Graphics/GraphicsTypes.cpp:306–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void Buffer::UpdateData(const void* srcData, uint64 srcSize, uint64 dstOffset)
307{
308 Assert_(Dynamic == false);
309 Assert_(dstOffset + srcSize <= Size);
310
311 UploadContext uploadContext = DX12::ResourceUploadBegin(srcSize);
312
313 memcpy(uploadContext.CPUAddress, srcData, srcSize);
314
315 uploadContext.CmdList->CopyBufferRegion(Resource, dstOffset, uploadContext.Resource, uploadContext.ResourceOffset, srcSize);
316
317 DX12::ResourceUploadEnd(uploadContext);
318}
319
320void Buffer::Transition(ID3D12GraphicsCommandList* cmdList, D3D12_RESOURCE_STATES before, D3D12_RESOURCE_STATES after) const
321{

Callers 1

UpdateDecalsMethod · 0.80

Calls 2

ResourceUploadBeginFunction · 0.85
ResourceUploadEndFunction · 0.85

Tested by

no test coverage detected