- 
                Notifications
    
You must be signed in to change notification settings  - Fork 67
 
Cuda interop vk13 #637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            devshgraphicsprogramming
  wants to merge
  64
  commits into
  master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
cuda-interop-vk13
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Cuda interop vk13 #637
Changes from 56 commits
      Commits
    
    
            Show all changes
          
          
            64 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      d293b9b
              
                create exportable buffers to import into cuda
              
              
                atkurtul f5f1017
              
                add missing cuda fn and update submodule
              
              
                atkurtul 6689b33
              
                add missing cuda export functions
              
              
                atkurtul 9ade1c6
              
                move boilerplates to CCUDADevice
              
              
                atkurtul bfa7afc
              
                correct chained cleanup desctruction order
              
              
                atkurtul ddb861e
              
                add safety checks
              
              
                atkurtul f380398
              
                semaphore interop
              
              
                atkurtul 2f7b517
              
                get cuda interop working in vulkan_1_3 branch
              
              
                atkurtul bd32f36
              
                point jitify to the right hash
              
              
                atkurtul b1c5a46
              
                update examples && use non KHR version of vk functions
              
              
                atkurtul 0d36581
              
                correct bad validations, KHR  instead of coe func usage etc.
              
              
                devshgraphicsprogramming 725a984
              
                revert a dangerous api change
              
              
                devshgraphicsprogramming d2c9382
              
                update examples_tests
              
              
                devshgraphicsprogramming 2d24604
              
                Disabled CSPIRVIntrospector
              
              
                Przemog1 2114e50
              
                small fixes
              
              
                Przemog1 f6320ce
              
                remove unused cruft
              
              
                devshgraphicsprogramming f749ab8
              
                draft
              
              
                devshgraphicsprogramming ad1e6ff
              
                move the TimelineEventHandlers to their own header, simplifying every…
              
              
                devshgraphicsprogramming a1afcc8
              
                Made the TimelineEventHandlerST use a const ISemaphore, almost all of…
              
              
                devshgraphicsprogramming 262281f
              
                implement MultiTimelineEventHandlerST and correct TimelineEventHandlerST
              
              
                devshgraphicsprogramming d7690be
              
                fix KHR function loading bugs
              
              
                devshgraphicsprogramming 13ff02a
              
                fix some nasty bug in TimelineEventHandlerST
              
              
                devshgraphicsprogramming fabc999
              
                Take the TimelineEventHandlerST for a first spin with ICommandPoolCache
              
              
                devshgraphicsprogramming 0eb8e9a
              
                turns out its quite easy to port the other utilities to the new Multi…
              
              
                devshgraphicsprogramming e59408d
              
                remove more unused stuff
              
              
                devshgraphicsprogramming 3f41a81
              
                fix one liner huge bug
              
              
                devshgraphicsprogramming fb1f50d
              
                fix a smal bug and introduce a base class for TimelineEventHandler, a…
              
              
                devshgraphicsprogramming 94ee680
              
                fix one more KHR function pointer bug and remove unused class
              
              
                devshgraphicsprogramming c761d42
              
                bring back bits of IUtilities needed for ex 05
              
              
                devshgraphicsprogramming 04689b9
              
                device cap traits
              
              
                atkurtul 4a17eaf
              
                port macros to boost pp
              
              
                atkurtul 5fcad02
              
                has_member_x_with_type
              
              
                atkurtul 3c97ef1
              
                make e_member_presence bitflags
              
              
                atkurtul 06b43af
              
                Use new inline SPIR-V builtin syntax from DXC
              
              
                devshgraphicsprogramming fd73e28
              
                const correctness on surface capabilities
              
              
                devshgraphicsprogramming 153dd21
              
                3D Blit test case was failing because of unimplemented functions for …
              
              
                devshgraphicsprogramming bc7e24d
              
                Make the SPhysicalDeviceFilter use spans for requirement arrays.
              
              
                devshgraphicsprogramming b234d3b
              
                ok so I found out that renderdoc hates External memory
              
              
                devshgraphicsprogramming b5a633a
              
                fix typos causing issues
              
              
                devshgraphicsprogramming 2ab33ed
              
                API draft
              
              
                devshgraphicsprogramming bbc5aa9
              
                think about the other 3 utility functions
              
              
                devshgraphicsprogramming d41f279
              
                design clearing up
              
              
                devshgraphicsprogramming 04d05da
              
                Ok we're done here with the Streaming Buffer upload port (removed the…
              
              
                devshgraphicsprogramming 3d034c5
              
                move the SIntendedSubmitInfo struct out of IUtilities
              
              
                devshgraphicsprogramming 3160a46
              
                going to sleep, next TODO is to implement the IUtilities::downloadBuf…
              
              
                devshgraphicsprogramming 8670d42
              
                outline the TODO for @theoreticalphysicsftw
              
              
                devshgraphicsprogramming 2d86373
              
                fix debugmessenger not being created
              
              
                atkurtul ca2593c
              
                fix a validation error
              
              
                devshgraphicsprogramming 461cb4a
              
                rework pipeline barriers and events to use std::spans
              
              
                devshgraphicsprogramming d96fd1d
              
                Port `downloadBufferRangeViaStagingBuffer
              
              
                devshgraphicsprogramming 2d2acc9
              
                fix bug in CRAIISpanPatch
              
              
                devshgraphicsprogramming 60c1c39
              
                Ported Example 23, and fixed a few bugs here and there
              
              
                devshgraphicsprogramming 3faf1fb
              
                merge conflicts
              
              
                atkurtul fd4f733
              
                add missing external resource property queries
              
              
                atkurtul 5b1940c
              
                add more stuff
              
              
                atkurtul 7074256
              
                Merge branch 'vulkan_1_3' into cuda-interop-vk13
              
              
                atkurtul 6449b2f
              
                Merge branch 'vulkan_1_3' into cuda-interop-vk13
              
              
                atkurtul 3d9a530
              
                address pr comments
              
              
                atkurtul 4d174e5
              
                last commit part 2
              
              
                atkurtul cbd18f4
              
                add missing cuda fn & map queue indices to vk
              
              
                atkurtul 23fe8d4
              
                update submodule
              
              
                atkurtul c32fd79
              
                cache cuda devices
              
              
                atkurtul 4e2185c
              
                ifdef platform code
              
              
                atkurtul bd0b76a
              
                log queue validation warning
              
              
                atkurtul File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
  Submodule jitify
    updated
      
        5 files
      
      
          
    | +10 −5 | Makefile | |
| +137 −65 | jitify.hpp | |
| +72 −0 | jitify_test.cu | |
| +586 −0 | nvrtc_cli.cpp | |
| +58 −0 | nvrtc_cli_test.sh | 
  
  Submodule examples_tests
    updated
      
        6 files
      
      
          
    | +17 −0 | 63_CUDAInterop/CMakeLists.txt | |
| +310 −0 | 63_CUDAInterop/main.cpp | |
| +50 −0 | 63_CUDAInterop/pipeline.groovy | |
| +42 −0 | 63_CUDAInterop/vectorAdd_kernel.cu | |
| +1 −0 | CMakeLists.txt | |
| +1 −1 | common/MonoDeviceApplication.hpp | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -6,7 +6,8 @@ | |
| 
     | 
||
| 
     | 
||
| #include "nbl/video/IPhysicalDevice.h" | ||
| 
     | 
||
| #include "nbl/video/CCUDASharedMemory.h" | ||
| #include "nbl/video/CCUDASharedSemaphore.h" | ||
| 
     | 
||
| #ifdef _NBL_COMPILE_WITH_CUDA_ | ||
| 
     | 
||
| 
        
          
        
         | 
    @@ -23,10 +24,20 @@ | |
| namespace nbl::video | ||
| { | ||
| class CCUDAHandler; | ||
| class CCUDASharedMemory; | ||
| class CCUDASharedSemaphore; | ||
| 
     | 
||
| class CCUDADevice : public core::IReferenceCounted | ||
| { | ||
| public: | ||
| #ifdef _WIN32 | ||
| static constexpr IDeviceMemoryAllocation::E_EXTERNAL_HANDLE_TYPE EXTERNAL_MEMORY_HANDLE_TYPE = IDeviceMemoryAllocation::EHT_OPAQUE_WIN32; | ||
| static constexpr CUmemAllocationHandleType ALLOCATION_HANDLE_TYPE = CU_MEM_HANDLE_TYPE_WIN32; | ||
| #else | ||
| static constexpr IDeviceMemoryBacked::E_EXTERNAL_HANDLE_TYPE EXTERNAL_MEMORY_HANDLE_TYPE = IDeviceMemoryBacked::EHT_OPAQUE_FD; | ||
| static constexpr CUmemAllocationHandleType ALLOCATION_TYPE = CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR; | ||
| #endif | ||
| 
     | 
||
| enum E_VIRTUAL_ARCHITECTURE | ||
| { | ||
| EVA_30, | ||
| 
          
            
          
           | 
    @@ -72,127 +83,45 @@ class CCUDADevice : public core::IReferenceCounted | |
| // https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#vulkan-interoperability | ||
| // Watch out, use Driver API (`cu` functions) NOT the Runtime API (`cuda` functions) | ||
| // Also maybe separate this out into its own `CCUDA` class instead of nesting it here? | ||
| #if 0 | ||
| template<typename ObjType> | ||
| struct GraphicsAPIObjLink | ||
| { | ||
| GraphicsAPIObjLink() : obj(nullptr), cudaHandle(nullptr), acquired(false) | ||
| { | ||
| asImage = {nullptr}; | ||
| } | ||
| GraphicsAPIObjLink(core::smart_refctd_ptr<ObjType>&& _obj) : GraphicsAPIObjLink() | ||
| { | ||
| obj = std::move(_obj); | ||
| } | ||
| GraphicsAPIObjLink(GraphicsAPIObjLink&& other) : GraphicsAPIObjLink() | ||
| { | ||
| operator=(std::move(other)); | ||
| } | ||
| 
     | 
||
| GraphicsAPIObjLink(const GraphicsAPIObjLink& other) = delete; | ||
| GraphicsAPIObjLink& operator=(const GraphicsAPIObjLink& other) = delete; | ||
| GraphicsAPIObjLink& operator=(GraphicsAPIObjLink&& other) | ||
| { | ||
| std::swap(obj,other.obj); | ||
| std::swap(cudaHandle,other.cudaHandle); | ||
| std::swap(acquired,other.acquired); | ||
| std::swap(asImage,other.asImage); | ||
| return *this; | ||
| } | ||
| 
     | 
||
| ~GraphicsAPIObjLink() | ||
| { | ||
| assert(!acquired); // you've fucked up, there's no way for us to fix it, you need to release the objects on a proper stream | ||
| if (obj) | ||
| CCUDAHandler::cuda.pcuGraphicsUnregisterResource(cudaHandle); | ||
| } | ||
| 
     | 
||
| // | ||
| auto* getObject() const {return obj.get();} | ||
| 
     | 
||
| private: | ||
| core::smart_refctd_ptr<ObjType> obj; | ||
| CUgraphicsResource cudaHandle; | ||
| bool acquired; | ||
| 
     | 
||
| friend class CCUDAHandler; | ||
| public: | ||
| union | ||
| { | ||
| struct | ||
| { | ||
| CUdeviceptr pointer; | ||
| } asBuffer; | ||
| struct | ||
| { | ||
| CUmipmappedArray mipmappedArray; | ||
| CUarray array; | ||
| } asImage; | ||
| }; | ||
| }; | ||
| 
     | 
||
| // | ||
| static CUresult registerBuffer(GraphicsAPIObjLink<video::IGPUBuffer>* link, uint32_t flags = CU_GRAPHICS_REGISTER_FLAGS_NONE); | ||
| static CUresult registerImage(GraphicsAPIObjLink<video::IGPUImage>* link, uint32_t flags = CU_GRAPHICS_REGISTER_FLAGS_NONE); | ||
| CUdevice getInternalObject() const { return m_handle; } | ||
| const CCUDAHandler* getHandler() const { return m_handler.get(); } | ||
| CUresult importGPUSemaphore(core::smart_refctd_ptr<CCUDASharedSemaphore>* outPtr, ISemaphore* sem); | ||
| CUresult createSharedMemory(core::smart_refctd_ptr<CCUDASharedMemory>* outMem, struct CCUDASharedMemory::SCreationParams&& inParams); | ||
| bool isMatchingDevice(const IPhysicalDevice* device) { return device && !memcmp(device->getProperties().deviceUUID, m_vulkanDevice->getProperties().deviceUUID, 16); } | ||
| 
     | 
||
| 
     | 
||
| template<typename ObjType> | ||
| static CUresult acquireResourcesFromGraphics(void* tmpStorage, GraphicsAPIObjLink<ObjType>* linksBegin, GraphicsAPIObjLink<ObjType>* linksEnd, CUstream stream) | ||
| { | ||
| auto count = std::distance(linksBegin,linksEnd); | ||
| 
     | 
||
| auto resources = reinterpret_cast<CUgraphicsResource*>(tmpStorage); | ||
| auto rit = resources; | ||
| for (auto iit=linksBegin; iit!=linksEnd; iit++,rit++) | ||
| { | ||
| if (iit->acquired) | ||
| return CUDA_ERROR_UNKNOWN; | ||
| *rit = iit->cudaHandle; | ||
| } | ||
| 
     | 
||
| auto retval = cuda.pcuGraphicsMapResources(count,resources,stream); | ||
| for (auto iit=linksBegin; iit!=linksEnd; iit++) | ||
| iit->acquired = true; | ||
| return retval; | ||
| } | ||
| template<typename ObjType> | ||
| static CUresult releaseResourcesToGraphics(void* tmpStorage, GraphicsAPIObjLink<ObjType>* linksBegin, GraphicsAPIObjLink<ObjType>* linksEnd, CUstream stream) | ||
| { | ||
| auto count = std::distance(linksBegin,linksEnd); | ||
| 
     | 
||
| auto resources = reinterpret_cast<CUgraphicsResource*>(tmpStorage); | ||
| auto rit = resources; | ||
| for (auto iit=linksBegin; iit!=linksEnd; iit++,rit++) | ||
| { | ||
| if (!iit->acquired) | ||
| return CUDA_ERROR_UNKNOWN; | ||
| *rit = iit->cudaHandle; | ||
| } | ||
| 
     | 
||
| auto retval = cuda.pcuGraphicsUnmapResources(count,resources,stream); | ||
| for (auto iit=linksBegin; iit!=linksEnd; iit++) | ||
| iit->acquired = false; | ||
| return retval; | ||
| } | ||
| 
     | 
||
| static CUresult acquireAndGetPointers(GraphicsAPIObjLink<video::IGPUBuffer>* linksBegin, GraphicsAPIObjLink<video::IGPUBuffer>* linksEnd, CUstream stream, size_t* outbufferSizes = nullptr); | ||
| static CUresult acquireAndGetMipmappedArray(GraphicsAPIObjLink<video::IGPUImage>* linksBegin, GraphicsAPIObjLink<video::IGPUImage>* linksEnd, CUstream stream); | ||
| static CUresult acquireAndGetArray(GraphicsAPIObjLink<video::IGPUImage>* linksBegin, GraphicsAPIObjLink<video::IGPUImage>* linksEnd, uint32_t* arrayIndices, uint32_t* mipLevels, CUstream stream); | ||
| #endif | ||
| size_t roundToGranularity(CUmemLocationType location, size_t size) const; | ||
| 
     | 
||
| protected: | ||
| CUresult reserveAdrressAndMapMemory(CUdeviceptr* outPtr, size_t size, size_t alignment, CUmemLocationType location, CUmemGenericAllocationHandle memory); | ||
| 
     | 
||
| friend class CCUDAHandler; | ||
| CCUDADevice(core::smart_refctd_ptr<CVulkanConnection>&& _vulkanConnection, IPhysicalDevice* const _vulkanDevice, const E_VIRTUAL_ARCHITECTURE _virtualArchitecture); | ||
| ~CCUDADevice() = default; | ||
| friend class CCUDASharedMemory; | ||
| friend class CCUDASharedSemaphore; | ||
| 
     | 
||
| struct SCUDACleaner : video::ICleanup | ||
| { | ||
| core::smart_refctd_ptr<const core::IReferenceCounted> resource; | ||
| SCUDACleaner(core::smart_refctd_ptr<const core::IReferenceCounted> resource) | ||
| : resource(std::move(resource)) | ||
| { } | ||
| }; | ||
                
       | 
||
| 
     | 
||
| CCUDADevice(core::smart_refctd_ptr<CVulkanConnection>&& _vulkanConnection, IPhysicalDevice* const _vulkanDevice, const E_VIRTUAL_ARCHITECTURE _virtualArchitecture, CUdevice _handle, core::smart_refctd_ptr<CCUDAHandler>&& _handler); | ||
| ~CCUDADevice(); | ||
| 
     | 
||
| std::vector<const char*> m_defaultCompileOptions; | ||
| core::smart_refctd_ptr<CVulkanConnection> m_vulkanConnection; | ||
| IPhysicalDevice* const m_vulkanDevice; | ||
| E_VIRTUAL_ARCHITECTURE m_virtualArchitecture; | ||
| core::smart_refctd_ptr<CCUDAHandler> m_handler; | ||
| CUdevice m_handle; | ||
| CUcontext m_context; | ||
| size_t m_allocationGranularity[4]; | ||
| }; | ||
| 
     | 
||
| } | ||
| 
     | 
||
| #endif // _NBL_COMPILE_WITH_CUDA_ | ||
| 
     | 
||
| #endif | ||
| #endif | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| // Copyright (C) 2018-2020 - DevSH Graphics Programming Sp. z O.O. | ||
| // This file is part of the "Nabla Engine". | ||
| // For conditions of distribution and use, see copyright notice in nabla.h | ||
| #ifndef _NBL_VIDEO_C_CUDA_SHARED_MEMORY_H_ | ||
| #define _NBL_VIDEO_C_CUDA_SHARED_MEMORY_H_ | ||
| 
     | 
||
| 
     | 
||
| #ifdef _NBL_COMPILE_WITH_CUDA_ | ||
| 
     | 
||
| #include "cuda.h" | ||
| #include "nvrtc.h" | ||
| #if CUDA_VERSION < 9000 | ||
| #error "Need CUDA 9.0 SDK or higher." | ||
| #endif | ||
| 
     | 
||
| // useful includes in the future | ||
| //#include "cudaEGL.h" | ||
| //#include "cudaVDPAU.h" | ||
| 
     | 
||
| namespace nbl::video | ||
| { | ||
| 
     | 
||
| class CCUDASharedMemory : public core::IReferenceCounted | ||
| { | ||
| public: | ||
| friend class CCUDADevice; | ||
                
      
                  atkurtul marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| 
     | 
||
| CUdeviceptr getDeviceptr() const { return m_params.ptr; } | ||
| 
     | 
||
| struct SCreationParams | ||
| { | ||
| size_t size; | ||
| uint32_t alignment; | ||
| CUmemLocationType location; | ||
| }; | ||
| 
     | 
||
| struct SCachedCreationParams : SCreationParams | ||
| { | ||
| size_t granularSize; | ||
| CUdeviceptr ptr; | ||
| union | ||
| { | ||
| void* osHandle; | ||
| int fd; | ||
| }; | ||
| }; | ||
| 
     | 
||
| const SCreationParams& getCreationParams() const { return m_params; } | ||
| 
     | 
||
| core::smart_refctd_ptr<IDeviceMemoryAllocation> exportAsMemory(ILogicalDevice* device, IDeviceMemoryBacked* dedication = nullptr) const; | ||
| 
     | 
||
| core::smart_refctd_ptr<IGPUImage> createAndBindImage(ILogicalDevice* device, IGPUImage::SCreationParams&& params) const; | ||
| 
     | 
||
| protected: | ||
| 
     | 
||
| CCUDASharedMemory(core::smart_refctd_ptr<CCUDADevice> device, SCachedCreationParams&& params) | ||
| : m_device(std::move(device)) | ||
| , m_params(std::move(params)) | ||
| {} | ||
| ~CCUDASharedMemory() override; | ||
| 
     | 
||
| core::smart_refctd_ptr<CCUDADevice> m_device; | ||
| SCachedCreationParams m_params; | ||
| }; | ||
| 
     | 
||
| } | ||
| 
     | 
||
| #endif // _NBL_COMPILE_WITH_CUDA_ | ||
| 
     | 
||
| #endif | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| // Copyright (C) 2018-2020 - DevSH Graphics Programming Sp. z O.O. | ||
| // This file is part of the "Nabla Engine". | ||
| // For conditions of distribution and use, see copyright notice in nabla.h | ||
| #ifndef _NBL_VIDEO_C_CUDA_SHARED_SEMAPHORE_H_ | ||
| #define _NBL_VIDEO_C_CUDA_SHARED_SEMAPHORE_H_ | ||
| 
     | 
||
| #ifdef _NBL_COMPILE_WITH_CUDA_ | ||
| 
     | 
||
| #include "cuda.h" | ||
| #include "nvrtc.h" | ||
| #if CUDA_VERSION < 9000 | ||
| #error "Need CUDA 9.0 SDK or higher." | ||
| #endif | ||
| 
     | 
||
| // useful includes in the future | ||
| //#include "cudaEGL.h" | ||
| //#include "cudaVDPAU.h" | ||
| 
     | 
||
| namespace nbl::video | ||
| { | ||
| 
     | 
||
| class CCUDASharedSemaphore : public core::IReferenceCounted | ||
| { | ||
| public: | ||
| friend class CCUDADevice; | ||
| 
     | 
||
| CUexternalSemaphore getInternalObject() const { return m_handle; } | ||
| 
     | 
||
| protected: | ||
| 
     | 
||
| CCUDASharedSemaphore(core::smart_refctd_ptr<CCUDADevice> device, core::smart_refctd_ptr<ISemaphore> src, CUexternalSemaphore semaphore, void* osHandle) | ||
| : m_device(std::move(device)) | ||
| , m_src(std::move(m_src)) | ||
| , m_handle(semaphore) | ||
| , m_osHandle(osHandle) | ||
| {} | ||
| ~CCUDASharedSemaphore() override; | ||
| 
     | 
||
| core::smart_refctd_ptr<CCUDADevice> m_device; | ||
| core::smart_refctd_ptr<ISemaphore> m_src; | ||
| CUexternalSemaphore m_handle; | ||
| void* m_osHandle; | ||
| }; | ||
| 
     | 
||
| } | ||
| 
     | 
||
| #endif // _NBL_COMPILE_WITH_CUDA_ | ||
| 
     | 
||
| #endif | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.