MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / getData

Method getData

Source/Falcor/Core/API/CopyContext.cpp:379–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void CopyContext::ReadTextureTask::getData(void* pData, size_t size) const
380{
381 FALCOR_ASSERT(size == size_t(mRowCount) * mActualRowSize * mDepth);
382
383 mpFence->wait();
384
385 uint8_t* pDst = reinterpret_cast<uint8_t*>(pData);
386 const uint8_t* pSrc = reinterpret_cast<const uint8_t*>(mpBuffer->map());
387
388 for (uint32_t z = 0; z < mDepth; z++)
389 {
390 const uint8_t* pSrcZ = pSrc + z * (size_t)mRowSize * mRowCount;
391 uint8_t* pDstZ = pDst + z * (size_t)mActualRowSize * mRowCount;
392 for (uint32_t y = 0; y < mRowCount; y++)
393 {
394 const uint8_t* pSrcY = pSrcZ + y * (size_t)mRowSize;
395 uint8_t* pDstY = pDstZ + y * (size_t)mActualRowSize;
396 std::memcpy(pDstY, pSrcY, mActualRowSize);
397 }
398 }
399
400 mpBuffer->unmap();
401}
402
403std::vector<uint8_t> CopyContext::ReadTextureTask::getData() const
404{

Callers 15

handlePickingMethod · 0.45
executeInternalMethod · 0.45
loadTextureMethod · 0.45
OpenExrStreamMethod · 0.45
createFromFileMethod · 0.45
loadDDSFunction · 0.45
saveToDDSMethod · 0.45
updateLightsMethod · 0.45
updateGridVolumesMethod · 0.45
MERLMixMaterialMethod · 0.45
initMethod · 0.45
MERLFile.cppFile · 0.45

Calls 6

mapMethod · 0.80
unmapMethod · 0.80
getDataFunction · 0.50
waitMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected