MCPcopy Create free account
hub / github.com/NVIDIA-RTX/NVRHI / writeBuffer

Method writeBuffer

src/validation/validation-commandlist.cpp:425–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423 }
424
425 void CommandListWrapper::writeBuffer(IBuffer* b, const void* data, size_t dataSize, uint64_t destOffsetBytes)
426 {
427 if (!requireOpenState())
428 return;
429
430 if (dataSize + destOffsetBytes > b->getDesc().byteSize)
431 {
432 error("writeBuffer: dataSize + destOffsetBytes is greater than the buffer size");
433 return;
434 }
435
436 if (destOffsetBytes > 0 && b->getDesc().isVolatile)
437 {
438 error("writeBuffer: cannot write into volatile buffers with an offset");
439 return;
440 }
441
442 if (dataSize > 0x10000 && b->getDesc().isVolatile)
443 {
444 error("writeBuffer: cannot write more than 65535 bytes into volatile buffers");
445 return;
446 }
447
448 m_CommandList->writeBuffer(b, data, dataSize, destOffsetBytes);
449 }
450
451 void CommandListWrapper::clearBufferUInt(IBuffer* b, uint32_t clearValue)
452 {

Callers

nothing calls this directly

Calls 1

getDescMethod · 0.45

Tested by

no test coverage detected