Optix Code/Optix7.3.0LightFIeldViewer/SDK/lib/DemandLoading/DemandLoaderImpl.cpp
// Returns false if the device doesn't support sparse textures.
Returns false if the device doesn't support sparse textures.
Returns false if the device doesn ' t support sparse textures .
bool DemandLoaderImpl::launchPrepare( unsigned int deviceIndex, CUstream stream, DeviceContext& context )
{
    SCOPED_NVTX_RANGE_FUNCTION_NAME();
    std::unique_lock<std::mutex> lock( m_mutex );
    PagingSystem* pagingSystem = m_pagingSystems.at( deviceIndex ).get();
    if( pagingSystem == nullptr )
        return false;
    context = *m_deviceMemoryManagers[deviceIndex]->getDeviceContextPool()->allocate();
    pagingSystem->pushMappings( context, stream );
    return true;
}
bool DemandLoaderImpl :: launchPrepare ( unsigned int deviceIndex , CUstream stream , DeviceContext & context ) { SCOPED_NVTX_RANGE_FUNCTION_NAME ( ) ; std :: unique_lock < std :: mutex > lock ( m_mutex ) ; PagingSystem * pagingSystem = m_pagingSystems . at ( deviceIndex ) . get ( ) ; if ( pagingSystem == nullptr ) return false ; context = * m_deviceMemoryManagers [ deviceIndex ] -> getDeviceContextPool ( ) -> allocate ( ) ; pagingSystem -> pushMappings ( context , stream ) ; return true ; }
Returns false if the device doesn't support sparse textures.
Returns false if the device doesn ' t support sparse textures .
// Get DeviceContext from pool and copy it to output parameter.