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

Method LowLevelContextData

Source/Falcor/Core/API/LowLevelContextData.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace Falcor
40{
41LowLevelContextData::LowLevelContextData(Device* pDevice, gfx::ICommandQueue* pQueue) : mpDevice(pDevice), mpGfxCommandQueue(pQueue)
42{
43 mpFence = mpDevice->createFence();
44 mpFence->breakStrongReferenceToDevice();
45
46#if FALCOR_HAS_CUDA
47 // GFX currently doesn't support shared fences on Vulkan.
48 if (mpDevice->getType() == Device::Type::D3D12)
49 {
50 mpDevice->initCudaDevice();
51 mpCudaFence = mpDevice->createFence(true);
52 mpCudaFence->breakStrongReferenceToDevice();
53 mpCudaSemaphore = make_ref<cuda_utils::ExternalSemaphore>(mpCudaFence);
54 }
55#endif
56
57 openCommandBuffer();
58}
59
60LowLevelContextData::~LowLevelContextData()
61{

Callers

nothing calls this directly

Calls 4

createFenceMethod · 0.80
initCudaDeviceMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected