Click or drag to resize
Ab4d.SharpEngine logo

VulkanDevice Methods

The VulkanDevice type exposes the following members.

Methods
 NameDescription
Public methodAddCopyImageCommands(CommandBuffer, GpuImage, GpuImage, Boolean, ImageLayout, Int32) 
Public methodAddCopyImageCommands(CommandBuffer, Image, ImageLayout, AccessFlags, PipelineStageFlags, Image, ImageCopy, ImageLayout, AccessFlags, PipelineStageFlags, Boolean, ImageLayout, AccessFlags, PipelineStageFlags) 
Public methodAddCopyImageCommands(CommandBuffer, Image, ImageLayout, AccessFlags, PipelineStageFlags, Image, Int32, Int32, AccessFlags, ImageLayout, PipelineStageFlags, Boolean, ImageLayout, Int32) 
Public methodAddFullPipelineBarrier 
Public methodAllocateMemory(Buffer, MemoryPropertyFlags, Boolean, String) 
Public methodAllocateMemory(Image, MemoryPropertyFlags, Boolean, String) 
Public methodAllocateMemory(MemoryRequirements, MemoryPropertyFlags, Boolean, Boolean, String) 
Public methodAllocateMemory(UInt32, UInt32, Int32, MemoryPropertyFlags, Boolean, Boolean, String) 
Public methodAllocateShaderSpecializationInfoT(T, Int32, String) 
Public methodAllocateShaderSpecializationInfoT(T, Int32, String) 
Public methodBeginCommandsBuffer 
Public methodBeginGraphicsCommands 
Public methodCacheObject CacheObject sets the specified objectToCache to the specified key in the dictionary used by this VulkanDevice. The cached object can be retrieved by GetCachedObjectT(String) or removed by RemoveCachedObject(String) method. This method is thread safe and can be called from any thread.
Public methodCalculateMipLevelsCount 
Public methodStatic memberCheckDeviceMinimumRequirements(VulkanInstance, PhysicalDevice, Boolean) Returns true if the specified physicalDevice is supported to run Ab4d.SharpEngine.
Public methodStatic memberCheckDeviceMinimumRequirements(PhysicalDeviceDetails, SurfaceDetails, Boolean, Boolean) Returns true if the physicalDevice (specified in physicalDeviceDetails) is supported to run SharpEngine. When isSurfaceSupportRequired is true, then also the vulkanSurface is checked.
Public methodStatic memberCheckDeviceMinimumRequirements(VulkanInstance, PhysicalDevice, SurfaceKHR, Boolean, Boolean) Returns true if the specified physicalDevice is supported to run Ab4d.SharpEngine. When isSurfaceSupportRequired is true, then also the vulkanSurface is checked.
Public methodCheckIsOnMainThread CheckIsOnMainThread method thrown an exception when the current thread is not main thread.
Public methodCopyBuffer CopyBuffer copies the sourceBuffer to the destinationBuffer and waits for the copy operation to finish. When size is not defined (is zero), then size of the smaller buffer is used.
Public methodCopyDataToGpuImage(GpuImage, GpuBuffer, Boolean, ImageLayout, AccessFlags, PipelineStageFlags) 
Public methodCopyDataToGpuImage(GpuImage, Int32, Int32, Int32, DeviceMemory, Int32, Byte, ImageLayout, AccessFlags, PipelineStageFlags) 
Public methodCopyDataToGpuImage(Image, Int32, Int32, Int32, AccessFlags, ImageLayout, PipelineStageFlags, DeviceMemory, Int32, Byte, ImageLayout, AccessFlags, PipelineStageFlags, Int32) 
Public methodCopyDataToImage(Image, Int32, Int32, Int32, AccessFlags, ImageLayout, PipelineStageFlags, GpuBuffer, ImageLayout, AccessFlags, PipelineStageFlags, Int32) 
Public methodCopyDataToImage(CommandBuffer, Image, Int32, Int32, Int32, AccessFlags, ImageLayout, PipelineStageFlags, GpuBuffer, ImageLayout, AccessFlags, PipelineStageFlags, UInt32, UInt32, Int32) 
Public methodCopyDataToImage3D 
Public methodCopyGpuImage 
Public methodCopyImage(Image, ImageLayout, AccessFlags, PipelineStageFlags, Image, ImageCopy, ImageLayout, AccessFlags, PipelineStageFlags, Boolean, ImageLayout, AccessFlags, PipelineStageFlags, NullableSemaphore, NullableSemaphore) 
Public methodCopyImage(Image, ImageLayout, AccessFlags, PipelineStageFlags, Image, Int32, Int32, AccessFlags, ImageLayout, PipelineStageFlags, Boolean, ImageLayout, Int32, NullableSemaphore, NullableSemaphore) 
Public methodCopyToGpuImage 
Public methodStatic memberCreate(ActionEngineCreateOptions, String) Creates an instance of VulkanDevice by using an action that defines the EngineCreateOptions. This method will also create a VulkanInstance if it was not created before.
Public methodStatic memberCreate(EngineCreateOptions, String) Creates an instance of VulkanDevice. Optionally the EngineCreateOptions can be used to specify the creation options. This method will also create a VulkanInstance if it was not created before.
Public methodStatic memberCreate(SurfaceKHR, EngineCreateOptions, String) Creates an instance of VulkanDevice that will use the Vulkan surface that is defined by the SurfaceKHR. Optionally the EngineCreateOptions can be used to specify the creation options. This method will also create a VulkanInstance if it was not created before.
Public methodStatic memberCreate(SurfaceKHR, ActionEngineCreateOptions, String) Creates an instance of VulkanDevice that will use the Vulkan surface that is defined by the SurfaceKHR and will configure the EngineCreateOptions by using the specified configure action. This method will also create a VulkanInstance if it was not created before.
Public methodStatic memberCreate(VulkanSurfaceProvider, EngineCreateOptions, String) Creates an instance of VulkanDevice that will use the Vulkan surface that is defined by the VulkanSurfaceProvider. Optionally the EngineCreateOptions can be used to specify the creation options. This method will also create a VulkanInstance if it was not created before.
Public methodStatic memberCreate(VulkanSurfaceProvider, ActionEngineCreateOptions, String) Creates an instance of VulkanDevice that will use the Vulkan surface that is defined by the VulkanSurfaceProvider and will configure the EngineCreateOptions by using the specified configure action. This method will also create a VulkanInstance if it was not created before.
Public methodStatic memberCreate(VulkanInstance, PhysicalDeviceDetails, EngineCreateOptions, SurfaceKHR, String) Creates a new VulkanDevice with specified VulkanInstance, PhysicalDeviceDetails, EngineCreateOptions and optional surface and name.
Public methodStatic memberCreate(VulkanInstance, PhysicalDevice, EngineCreateOptions, SurfaceKHR, String) Creates a new VulkanDevice with specified VulkanInstance, PhysicalDevice, EngineCreateOptions and optional surface and name.
Public methodCreateBufferT(ReadOnlySpan, Void, T, BufferCreateInfo) 
Public methodCreateBufferT(Span, Void, T, BufferCreateInfo) 
Public methodCreateBufferT(ReadOnlySpan, Void, T, BufferUsageFlags, Boolean) 
Public methodCreateBufferT(Span, Void, T, BufferUsageFlags, Boolean) 
Public methodCreateBufferT(T, BufferUsageFlags, QueueFlags, MemoryPropertyFlags, String) 
Public methodCreateBufferT(T, BufferUsageFlags, Boolean, Boolean, String) 
Public methodCreateBufferT(Int32, BufferUsageFlags, Boolean, Boolean, Boolean, String) 
Public methodCreateBufferT(ReadOnlySpan, Void, T, BufferUsageFlags, Boolean, Boolean) 
Public methodCreateBufferT(Span, Void, T, BufferUsageFlags, Boolean, Boolean) 
Public methodCreateBufferT(T, BufferUsageFlags, Boolean, Boolean, Boolean, String) 
Public methodCreateBufferT(T, Int32, BufferUsageFlags, QueueFlags, MemoryPropertyFlags, String) 
Public methodCreateBufferT(T, Int32, BufferUsageFlags, Boolean, Boolean, String) 
Public methodCreateBufferT(T, Int32, BufferUsageFlags, Boolean, Boolean, Boolean, String) 
Public methodCreateBufferAsyncT(T, BufferUsageFlags, Boolean, Boolean, String) CreateBufferAsync method creates the GpuBuffer and uploads the specified data in the background thread.
Public methodCreateBufferAsyncT(T, Int32, BufferUsageFlags, Boolean, Boolean, String) CreateBufferAsync method creates the GpuBuffer and uploads the specified data in the background thread.
Public methodCreateBuffers(Int32, Int32, BufferUsageFlags, Type, Int32, String) 
Public methodCreateBuffers(Int32, Int32, BufferUsageFlags, Type, Int32, Boolean, String) 
Public methodCreateCommandBuffer 
Public methodCreateCommandBuffers 
Public methodCreateCommandPool 
Public methodCreateDescriptorPool(DescriptorType, Int32, Boolean, String) 
Public methodCreateDescriptorPool(DescriptorType, Int32, Boolean, String) 
Public methodCreateDescriptorPool(DescriptorType, Int32, Boolean, String) 
Public methodCreateDescriptorSetLayout(DescriptorType, ShaderStageFlags, String) 
Public methodCreateDescriptorSetLayout(DescriptorType, ShaderStageFlags, Int32, String) 
Public methodCreateDescriptorSetLayout(DescriptorType, ShaderStageFlags, Int32, String) 
Public methodCreateDescriptorSets 
Public methodCreateDynamicUniformBuffers 
Public methodCreateFence 
Public methodCreateFrameBuffers(ImageView, ImageView, Int32, Int32, RenderPass, String) 
Public methodCreateFrameBuffers(ImageView, ImageView, Int32, Int32, RenderPass, Framebuffer, String) 
Public methodCreateGraphicsCommandPool 
Public methodCreateImageViews(Image, Format, ImageAspectFlags, String) 
Public methodCreateImageViews(Image, Format, ImageView, ImageAspectFlags, String) 
Public methodCreateMultiSampledFrameBuffers 
Public methodCreateMultiSampledRenderPass 
Public methodCreatePipelineLayout(DescriptorSetLayout, PushConstantRange, String) 
Public methodCreatePipelineLayout(DescriptorSetLayout, Int32, Int32, String) 
Public methodCreatePostProcessRenderPass 
Public methodCreateSampler 
Public methodCreateSemaphore 
Public methodCreateStagingBuffer(Int32, Boolean, QueueFlags, String) Creates a GpuBuffer that can be used for transferring data to the GPU (isTransferSource: true) or from the GPU (isTransferSource: false). To use staging buffer with batch update, use the StagingGpuBuffer from this device or create a new GpuStagingBuffer.
Public methodCreateStagingBufferT(Int32, Boolean, QueueFlags, String) Creates a GpuBuffer that can be used for transferring data to the GPU (isTransferSource: true) or from the GPU (isTransferSource: false). To use staging buffer with batch update, use the StagingGpuBuffer from this device or create a new GpuStagingBuffer.
Public methodCreateStandardRenderPass 
Public methodCreateSwapChain 
Public methodCreateSwapChainImages(SwapchainKHR, String) 
Public methodCreateSwapChainImages(SwapchainKHR, Image, String) 
Public methodCreateUniformBuffers 
Public methodDisableBackgroundUpload DisableBackgroundUpload disables background upload of images and buffer even if it is supported by the graphics card.
Public methodDispose Dispose
Protected methodDispose(Boolean) Dispose
(Overrides ComponentBaseDispose(Boolean))
Public methodDisposeVulkanResourceOnMainThreadAfterFrameRendered DisposeVulkanResourceOnMainThreadAfterFrameRendered method disposes the Vulkan resources with the specified type and handle on the main thread and after the rendering of the current frame is complete and the GPU resources for that frame are no longer used. If this is called on the main thread and if the current frame is already fully rendered (for example after calling WaitUntilIdle, then the specified Vulkan resource is immediately disposed. This method can be called from any thread.
Public methodDumpMemoryReport Writes string that contains details memory usage of this device.
Public methodDumpResources Writes string that contains details tracked resources (objected derived from ComponentBase) to the console (when the application is debugged in Visual Studio the result is written to Output window or Immediate Window if started from there; in Rider the result is written to Debug Output window). To get a meaningful result, enable tracking resource on application startup. This can be done by setting static ComponentBase.ResourcesTracker.IsTrackingResources to true.
Public methodDumpResourcesForDelayedDisposal Writes string that contains details about resources that are scheduled to be disposed when the background rendering of frames is completed.
Public methodEnableBackgroundUpload EnableBackgroundUpload can be called after calling DisableBackgroundUpload to re-enable the background upload of images and buffer. Note that if the graphics card does not support background upload, then calling this method will not actually enable background upload (it will just prevent disabling it).
Public methodEndCommandBuffer(CommandBuffer, Queue, Boolean, Boolean) 
Public methodEndCommandBuffer(CommandBuffer, Queue, Boolean, Boolean, Semaphore, Semaphore) 
Public methodEndCommandBuffer(CommandBuffer, Queue, Boolean, Boolean, Semaphore, Semaphore, Fence) 
Public methodEndGraphicsCommands(Boolean, Boolean) 
Public methodEndGraphicsCommands(Semaphore, Semaphore) 
Public methodExecuteOnMainThread ExecuteOnMainThread executes the specified action on the main thread (the same thread the VulkanDevice was created on). If this is called on the main thread, then the action is immediately executed, otherwise the action is saved and it will be executed when the RunAllUpdateActions method will be called (usually at the beginning of the update render phase). This method can be called from any thread.
Public methodExecuteOnMainThreadAfterFrameRendered ExecuteOnMainThreadAfterFrameRendered executes the specified action on the main thread (the same thread the VulkanDevice was created on) and after the rendering of the current frame is complete and the GPU resources for that frame are no longer used. If this is called on the main thread and if the current frame is already fully rendered (for example after calling WaitUntilIdle, then the action is immediately executed, otherwise the action is saved and it will be executed when on the main thread and after the frame is rendered. This method can be called from any thread.
Public methodFlushStagingCommandBuffers FlushStagingCommandBuffers start writing all the data that were added to StagingGpuBuffer. When waitUntilFinished is true, then the method waits until all the copy operations are finished. If waitUntilFinished is false, then user can call WaitForStagingCommandBuffers at some later stage.
Public methodFreeMemory 
Public methodFreeMemoryBlockOnMainThreadAfterFrameRendered(VulkanMemoryInfo) 
Public methodFreeMemoryBlockOnMainThreadAfterFrameRendered(IDynamicMemoryBlock, Int32) 
Public methodGetCachedObjectT GetCachedObject gets the object that was previously stored by the to CacheObject(String, Object) method. If the key is not found a default value of T (null for reference types) is returned. This method is thread safe and can be called from any thread.
Public methodGetCachedObjectsReportString Returns a string that shows which objects are cached by this VulkanDevice.
Public methodGetDeviceLocalMemoryBudget Returns the MemoryHeapBudget that defines the memory budged and current usage for GPU's device local memory. If the memory budget is not available (IsMemoryBudgetInfoAvailable is false), then the returned object will have all values set to 0.
Public methodGetHostVisibleMemoryBudget Returns the MemoryHeapBudget that defines the memory budged and current usage for main CPU's memory that can be used for graphics objects. If the memory budget is not available (IsMemoryBudgetInfoAvailable is false), then the returned object will have all values set to 0.
Public methodGetMemoryBudget Gets the memory budgets and usage for each memory heap in this GPU device. To see if this method is supported, check IsMemoryBudgetInfoAvailable property (supported on Vulkan API 1.1 and when the device supports the VK_EXT_memory_budget extension). If this is not supported, then an empty list is returned.
Public methodGetMemoryBudgetInfo Returns a string that shows the memory heaps usage and available budgets. To check if memory budget information is available call the IsMemoryBudgetInfoAvailable method.
Public methodGetMemoryReportString Gets a string that contains details memory usage of this device.
Public methodGetOrCreateDescriptorSetsCache GetOrCreateDescriptorSetsCache returns an existing DescriptorSetsCache that has the same descriptorTypes, stageFlags and startBinding. If no DescriptorSetsCache exist with that properties, then a new DescriptorSetsCache is created an returned. The new DescriptorSetsCache is returned in subsequent calls to GetOrCreateDescriptorSetsCache with the same properties. DescriptorSetsCache can be used to cache the DescriptorSets so that the same storage buffer and texture image with sampler use the same DescriptorSet. The created DescriptorSetsCache will be disposed when this VulkanDevice is disposed.
Public methodGetPipelineCache 
Public methodStatic memberGetPreTransform 
Public methodGetResourcesForDelayedDisposalString 
Public methodGetResourcesReportString Gets a string with report of tracked resources (objected derived from ComponentBase). To get a meaningful result, enable tracking resource on application startup. This can be done by setting static ComponentBase.ResourcesTracker.IsTrackingResources to true.
Public methodGetSupportedDepthStencilFormat 
Public methodStatic memberGetVulkanFormat 
Public methodInsertImageMemoryBarrier(CommandBuffer, GpuImage, ImageLayout) 
Public methodInsertImageMemoryBarrier(CommandBuffer, GpuImage, AccessFlags, ImageLayout, PipelineStageFlags, Int32, Int32, UInt32, UInt32) 
Public methodInsertImageMemoryBarrier(CommandBuffer, Image, AccessFlags, AccessFlags, ImageLayout, ImageLayout, PipelineStageFlags, PipelineStageFlags, UInt32, UInt32) 
Public methodInsertImageMemoryBarrier(CommandBuffer, Image, AccessFlags, AccessFlags, ImageLayout, ImageLayout, PipelineStageFlags, PipelineStageFlags, ImageSubresourceRange, UInt32, UInt32) 
Public methodInsertImageMemoryBarrier(CommandBuffer, Image, AccessFlags, AccessFlags, ImageLayout, ImageLayout, PipelineStageFlags, PipelineStageFlags, Int32, Int32, UInt32, UInt32) 
Public methodIsOnMainThread Returns true if the current thread is the same as the thread that was used to create this VulkanDevice.
Public methodMapMemoryT 
Public methodReleaseShaderSpecializationInfo 
Public methodRemoveCachedObject RemoveCachedObject removes the specified key from the dictionary used by this VulkanDevice. This method is thread safe and can be called from any thread.
Public methodRunAllUpdateActions RunAllUpdateActions executes all the actions that were added by the ExecuteOnMainThread(Action) method.
Protected methodSetupRequestedDeviceFeatures 
Public methodSetViewport 
Public methodTransitionImageToShaderReadOnlyOptimalLayout 
Public methodUnmapMemory 
Public methodUpdateDescriptorSets 
Public methodWaitForFence WaitForFence method first checks the status of the fence. If the status is not signaled, then WaitForFence is called.
Public methodWaitForStagingCommandBuffers WaitForStagingCommandBuffers method can be called after calling FlushStagingCommandBuffers(Boolean) with waitUntilFinished parameter set to false.
Public methodWaitUntilIdle 
Top
See Also