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

Method adjustSizeOffsetParams

Source/Falcor/Core/API/Buffer.cpp:356–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356bool Buffer::adjustSizeOffsetParams(size_t& size, size_t& offset) const
357{
358 if (offset >= mSize)
359 {
360 logWarning("Buffer::adjustSizeOffsetParams() - offset is larger than the buffer size.");
361 return false;
362 }
363
364 if (offset + size > mSize)
365 {
366 logWarning("Buffer::adjustSizeOffsetParams() - offset + size will cause an OOB access. Clamping size");
367 size = mSize - offset;
368 }
369 return true;
370}
371
372uint64_t Buffer::getGpuAddress() const
373{

Callers 2

updateBufferMethod · 0.80
readBufferMethod · 0.80

Calls 1

logWarningFunction · 0.50

Tested by

no test coverage detected