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

Function createBufferResource

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

TODO: This is also used in GpuMemoryHeap

Source from the content-addressed store, hash-verified

81
82// TODO: This is also used in GpuMemoryHeap
83Slang::ComPtr<gfx::IBufferResource> createBufferResource(
84 ref<Device> pDevice,
85 Buffer::State initState,
86 size_t size,
87 size_t elementSize,
88 ResourceFormat format,
89 ResourceBindFlags bindFlags,
90 MemoryType memoryType
91)
92{
93 FALCOR_ASSERT(pDevice);
94
95 // Create the buffer
96 gfx::IBufferResource::Desc bufDesc = {};
97 prepareGFXBufferDesc(bufDesc, size, elementSize, format, bindFlags, memoryType);
98
99 Slang::ComPtr<gfx::IBufferResource> pApiHandle;
100 FALCOR_GFX_CALL(pDevice->getGfxDevice()->createBufferResource(bufDesc, nullptr, pApiHandle.writeRef()));
101 FALCOR_ASSERT(pApiHandle);
102
103 return pApiHandle;
104}
105
106Buffer::Buffer(
107 ref<Device> pDevice,

Callers 2

BufferMethod · 0.85
initBasePageDataMethod · 0.85

Calls 2

prepareGFXBufferDescFunction · 0.85
writeRefMethod · 0.80

Tested by

no test coverage detected