API_Specification » APISpec_Synchronization_and_Cache_Control module

Chapter 6: Specification

Contents

Classes

struct VV::V0::Memory::Barrier
Global memory barriers apply to memory accesses involving all memory objects that exist at the time of its execution..
struct VV::V1::Buffer::Memory_Barrier
Specification
struct VV::V1::Image::Memory_Barrier
Specification
template<>
struct VV::V0::Fence_Maker<EOS::Linux>::GetOS_HandleInfo
Specification
template<>
struct VV::V0::Fence_Maker<EOS::Linux>::ImportOS_HandleInfo
Specification
template<>
struct VV::V0::Fence_Maker<EOS::Windows>::ExportableOS_HandleInfo
Specification
template<>
struct VV::V0::Fence_Maker<EOS::Windows>::GetOS_HandleInfo
Specification
template<>
struct VV::V0::Fence_Maker<EOS::Windows>::ImportOS_HandleInfo
Specification
template<>
struct VV::V0::Semaphore_Maker<EOS::Linux>::GetOS_HandleInfo
Specification
template<>
struct VV::V0::Semaphore_Maker<EOS::Linux>::ImportOS_HandleInfo
Specification
template<>
struct VV::V0::Semaphore_Maker<EOS::Windows>::ExportableOS_HandleInfo
Specification
template<>
struct VV::V0::Semaphore_Maker<EOS::Windows>::GetOS_HandleInfo
Specification
template<>
struct VV::V0::Semaphore_Maker<EOS::Windows>::ImportOS_HandleInfo
Specification
struct VV::V1::Event::CreateInfo
Specification
struct VV::V1::Event
Events are a synchronization primitive that can be used to insert a fine-grained dependency between commands submitted to the same queue, or between the host and a queue. Events must not be used to insert a dependency between commands submitted to different queues. Events have two states - signaled and unsignaled.
struct VV::V1::Fence::CreateInfo
Specification
struct VV::V1::Fence::DeviceEventInfo
Specification
struct VV::V1::Fence::DisplayEventInfo
Specification
struct VV::V1::Fence::ExportCreateInfo
Specification
struct VV::V1::Fence
Fences are a synchronization primitive that can be used to insert a dependency from a queue to the host. Fences have two states - signaled and unsignaled.
struct VV::V1::Semaphore::SignalInfo
Specification
struct VV::V1::Semaphore::TypeSpecifiedCreateInfo
Specification
struct VV::V1::Semaphore::WaitInfo
Specification

Enums

enum class EAccessFlag: ui32 { IndirectCommandRead = VK_ACCESS_INDIRECT_COMMAND_READ_BIT, IndexRead = VK_ACCESS_INDEX_READ_BIT, VertexAttributeRead = VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, UniformRead = VK_ACCESS_UNIFORM_READ_BIT, InputAttachmentRead = VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, ShaderRead = VK_ACCESS_SHADER_READ_BIT, ShaderWrite = VK_ACCESS_SHADER_WRITE_BIT, ColorAttachmentRead = VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, ColorAttachmentWrite = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, DepthStencilAttachmentRead = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, DepthStencilAttachmentWrite = VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, TransferRead = VK_ACCESS_TRANSFER_READ_BIT, TransferWrite = VK_ACCESS_TRANSFER_WRITE_BIT, HostRead = VK_ACCESS_HOST_READ_BIT, HostWrite = VK_ACCESS_HOST_WRITE_BIT, MemoryRead = VK_ACCESS_MEMORY_READ_BIT, MemoryWrite = VK_ACCESS_MEMORY_WRITE_BIT, TransformFeedback_Write_EXT = VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, TransformFeedback_CounterRead_EXT = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, TransformFeedback_CounterWrite_EXT = VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT, ConditionalRendering_Read_EXT = VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT, ColorAttachment_ReadNoncoherent_EXT = VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT, AccelerationStructure_Read_KHR = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR, AccelerationStructure_Write_KHR = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, ShadingRateImage_Read_NV = VK_ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV, FragmentDensityMap_Read_EXT = VK_ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT, CommandPreprocess_Read_NV = VK_ACCESS_COMMAND_PREPROCESS_READ_BIT_NV, CommandPreprocess_Write_NV = VK_ACCESS_COMMAND_PREPROCESS_WRITE_BIT_NV, AccelerationStructure_Read_NV = VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV, AccelerationStructure_Write_NV = VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV, VV_SpecifyBitmaskable = VK_ACCESS_FLAG_BITS_MAX_ENUM }
Specification
enum class EDependencyFlag: ui32 { ByRegion = VK_DEPENDENCY_BY_REGION_BIT, VV_SpecifyBitmaskable = VK_DEPENDENCY_FLAG_BITS_MAX_ENUM }
Specification
enum class EDisplayEventType: ui32 { FirstPixelOut_EXT = VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT }
Specification
enum class EFenceCreateFlag: ui32 { Signaled = VK_FENCE_CREATE_SIGNALED_BIT, VV_SpecifyBitmaskable = VK_FENCE_CREATE_FLAG_BITS_MAX_ENUM }
Specification
enum class EFenceImportFlag { Temporary = VK_FENCE_IMPORT_TEMPORARY_BIT, Temporary_KHR = VK_FENCE_IMPORT_TEMPORARY_BIT_KHR, VV_SpecifyBitmaskable = VK_FENCE_IMPORT_FLAG_BITS_MAX_ENUM }
Specification
enum class EPipelineStageFlag: ui32 { TopOfPipe = VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, DrawIndirect = VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, VertexInput = VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VertexShader = VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, TessellationControlShader = VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, TessellationEvaluationShader = VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, GeometryShader = VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, FragementShader = VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, EarlyFragmentTests = VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, LateFragmentTests = VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, ColorAttachmentOutput = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, ComputeShader = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, Transfer = VK_PIPELINE_STAGE_TRANSFER_BIT, BottomOfPipe = VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, Host = VK_PIPELINE_STAGE_HOST_BIT, AllGraphics = VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, AllCommands = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VV_SpecifyBitmaskable = VK_PIPELINE_STAGE_FLAG_BITS_MAX_ENUM }
Specification
enum class ESemaphoreType: ui32 { Binary = VK_SEMAPHORE_TYPE_BINARY, Timeline = VK_SEMAPHORE_TYPE_TIMELINE, Binary_KHR = VK_SEMAPHORE_TYPE_BINARY_KHR, Timeline_KHR = VK_SEMAPHORE_TYPE_TIMELINE_KHR }
Specification
enum class ESemaphoreWaitFlag: ui32 { Any = VK_SEMAPHORE_WAIT_ANY_BIT, Any_KHR = VK_SEMAPHORE_WAIT_ANY_BIT_KHR, VV_SpecifyBitmaskable = VK_SEMAPHORE_WAIT_FLAG_BITS_MAX_ENUM }
Specification

Typedefs

using StageFlags = Bitfield<EPipelineStageFlag, VkPipelineStageFlags>
Specification
using Handle = VkFence
Specification
using Handle = VkSemaphore
Specification
using ImportFlags = Bitfield<ESemaphoreImportFlag, VkSemaphoreImportFlags>
Specification
using WaitFlags = Bitfield<ESemaphoreWaitFlag, VkSemaphoreWaitFlags>
Specification
using Handle = VkEvent
Specification
using CreateFlags = Bitfield<EFenceCreateFlag, VkFenceCreateFlags>
Specification
using ExternalHandleFlags = Bitfield<EExternalFenceHandleTypeFlag, VkExternalFenceHandleTypeFlags>
Specification
using AccessFlags = Bitfield<EAccessFlag, VkAccessFlags>
using DependencyFlags = Bitfield<EDependencyFlag, VkDependencyFlags>
using FenceImportFlags = Bitfield<EFenceImportFlag, VkFenceImportFlags>

Functions

static void ResetEvent(Handle _commandBuffer, Event::Handle _event, Pipeline::StageFlags _stageMask)
Specification
static void SetEvent(Handle _commandBuffer, Event::Handle _event, Pipeline::StageFlags _stageMask)
Specification
static void SubmitPipelineBarrier(Handle _commandBuffer, Pipeline::StageFlags _sourceStageMask, Pipeline::StageFlags _destinationStageMask, DependencyFlags _dependencyFlags, ui32 _memoryBarrierCount, const Memory::Barrier* _memoryBarriers, ui32 _bufferMemoryBarrierCount, const Buffer::Memory_Barrier* _bufferMemoryBarriers, ui32 _imageMemoryBarrierCount, const Image::Memory_Barrier* _imageMemoryBarriers)
Specification
static void WaitForEvents(Handle _commandBuffer, ui32 _eventCount, const Event::Handle* _events, Pipeline::StageFlags _srcStageMask, Pipeline::StageFlags _dstStageMask, ui32 _memoryBarrierCount, const Memory::Barrier* _memoryBarriers, ui32 _bufferMemoryBarrierCount, const Buffer::Memory_Barrier* _bufferMemoryBarriers, ui32 _imageMemoryBarrierCount, const Image::Memory_Barrier* _imageMemoryBarriers)
Specification
static auto WaitUntilIdle(Handle _queue) -> EResult
To wait on the host for the completion of outstanding queue operations for a given queue.
static auto WaitUntilIdle(Handle _device) -> EResult
Specification .
static auto GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _fdInfo, OS_Handle* _fileDescriptor) -> EResult
static auto ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importInfo) -> EResult

static auto GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _getWin32HandleInfo, OS_Handle& _winHandle) -> EResult
Export a Windows handle representing the state of a fence.
static auto ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importInfo) -> EResult
Import a fence payload from a Windows handle.
static auto GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _getInfo, OS_Handle* _fileDescriptor) -> EResult
Export a POSIX file descriptor representing the payload of a semaphore.
static auto ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importPOSIX_Info) -> EResult
Import a semaphore payload from a POSIX file descriptor.
static auto GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _getInfo, OS_Handle& _handle) -> EResult
Export a Windows handle representing the payload of a semaphore.
static auto ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importHandleInfo) -> EResult
Import a semaphore payload from a Windows handle.
static auto Create(LogicalDevice::Handle _device, const Event::CreateInfo& _createInfo, const Memory::AllocationCallbacks* _allocator, Handle& _event) -> EResult
Create an Event.
static void Destroy(LogicalDevice::Handle _device, Handle _event, const Memory::AllocationCallbacks* _allocator)
Destroy an event.
static auto GetStatus(LogicalDevice::Handle _device, Handle _event) -> EResult
Query the state of an event from the host.
static auto Reset(LogicalDevice::Handle _device, Handle _event) -> EResult
Set the state of an event to unsignaled from the host.
static auto Set(LogicalDevice::Handle _device, Handle _event) -> EResult
static auto Create(LogicalDevice::Handle _logicalDevice, const CreateInfo& _createInfo, const Memory::AllocationCallbacks* _allocator, Handle& _fence) -> EResult
Create a fence.
static void Destroy(LogicalDevice::Handle _logicalDevice, Handle _fence, const Memory::AllocationCallbacks* _allocator)
Destroy a fence.
static auto GetStatus(LogicalDevice::Handle _logicalDevice, Handle _fence) -> EResult
Export a Windows handle representing the state of a fence.
static auto RegisterDeviceEvent(LogicalDevice::Handle _device, const DeviceEventInfo& _deviceEventInfo, const Memory::AllocationCallbacks* _allocator, Handle& _fence) -> EResult
Create a fence that will be signaled when an event occurs on a device.
static auto RegisterDisplayEvent(LogicalDevice::Handle _device, Display::Handle _display, const DisplayEventInfo& _displayEventInfo, const Memory::AllocationCallbacks* _allocator, Handle& _fence) -> EResult
Create a fence that will be signaled when an event occurs on a Display object.
static auto Reset(LogicalDevice::Handle _logicalDevice, Handle* _fences, ui32 _fenceCount) -> EResult
Specification
static auto WaitForFences(LogicalDevice::Handle _device, ui32 _fenceCount, const Handle* _fences, Bool _waitAll, u64 _timeout) -> EResult
Wait for one or more fences to enter the signaled state on the host.
static auto Create(LogicalDevice::Handle _device, const CreateInfo& _createInfo, const Memory::AllocationCallbacks* _allocator, Handle& _semaphore) -> EResult
Create a semaphore.
static void Destroy(LogicalDevice::Handle _device, Handle _semaphore, const Memory::AllocationCallbacks* _allocator)
Destroy a semaphore.
static auto GetCounterValue(LogicalDevice::Handle _device, Handle _semaphore, u64& _value) -> EResult
Query the current counter value of a semaphore created with a SemaphoreType of Timeline from the host.
static auto Signal(LogicalDevice::Handle _device, const SignalInfo& _signalInfo) -> EResult
Signal a semaphore created with a SemaphoreType of Timeline with a particular counter value, on the host.
static auto WaitFor(LogicalDevice::Handle _device, const WaitInfo& _waitInfo, u64 _timeout) -> EResult
Wait for a set of semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE to reach particular counter values on the host.

Enum documentation

Typedef documentation

using StageFlags = Bitfield<EPipelineStageFlag, VkPipelineStageFlags>

Specification

using ImportFlags = Bitfield<ESemaphoreImportFlag, VkSemaphoreImportFlags>

Specification

using WaitFlags = Bitfield<ESemaphoreWaitFlag, VkSemaphoreWaitFlags>

Specification

using CreateFlags = Bitfield<EFenceCreateFlag, VkFenceCreateFlags>

Specification

using ExternalHandleFlags = Bitfield<EExternalFenceHandleTypeFlag, VkExternalFenceHandleTypeFlags>

Specification

using AccessFlags = Bitfield<EAccessFlag, VkAccessFlags>

@ < ="://..////1.2-//.#"></>

using DependencyFlags = Bitfield<EDependencyFlag, VkDependencyFlags>

@ < ="://..////1.2-//.#"></>

using FenceImportFlags = Bitfield<EFenceImportFlag, VkFenceImportFlags>

@ < ="://..////1.2-//.#"></>

Function documentation

static void ResetEvent(Handle _commandBuffer, Event::Handle _event, Pipeline::StageFlags _stageMask)

Specification

static void SetEvent(Handle _commandBuffer, Event::Handle _event, Pipeline::StageFlags _stageMask)

Specification

static void SubmitPipelineBarrier(Handle _commandBuffer, Pipeline::StageFlags _sourceStageMask, Pipeline::StageFlags _destinationStageMask, DependencyFlags _dependencyFlags, ui32 _memoryBarrierCount, const Memory::Barrier* _memoryBarriers, ui32 _bufferMemoryBarrierCount, const Buffer::Memory_Barrier* _bufferMemoryBarriers, ui32 _imageMemoryBarrierCount, const Image::Memory_Barrier* _imageMemoryBarriers)

Specification

static void WaitForEvents(Handle _commandBuffer, ui32 _eventCount, const Event::Handle* _events, Pipeline::StageFlags _srcStageMask, Pipeline::StageFlags _dstStageMask, ui32 _memoryBarrierCount, const Memory::Barrier* _memoryBarriers, ui32 _bufferMemoryBarrierCount, const Buffer::Memory_Barrier* _bufferMemoryBarriers, ui32 _imageMemoryBarrierCount, const Image::Memory_Barrier* _imageMemoryBarriers)

Specification

static EResult WaitUntilIdle(Handle _queue)

To wait on the host for the completion of outstanding queue operations for a given queue.

Parameters
_queue

Specification

static EResult WaitUntilIdle(Handle _device)

Specification .

Parameters
_device

static EResult GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _fdInfo, OS_Handle* _fileDescriptor)

Specification

static EResult ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importInfo)


Parameters
_device
_importInfo

Specification

static EResult GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _getWin32HandleInfo, OS_Handle& _winHandle)

Export a Windows handle representing the state of a fence.

Specification

static EResult ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importInfo)

Import a fence payload from a Windows handle.

Specification

static EResult GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _getInfo, OS_Handle* _fileDescriptor)

Export a POSIX file descriptor representing the payload of a semaphore.

Specification

static EResult ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importPOSIX_Info)

Import a semaphore payload from a POSIX file descriptor.

Specification

static EResult GetOS_Handle(V1::LogicalDevice::Handle _device, const GetOS_HandleInfo& _getInfo, OS_Handle& _handle)

Export a Windows handle representing the payload of a semaphore.

Specification

static EResult ImportOS_Handle(V1::LogicalDevice::Handle _device, const ImportOS_HandleInfo& _importHandleInfo)

Import a semaphore payload from a Windows handle.

Specification

static EResult Create(LogicalDevice::Handle _device, const Event::CreateInfo& _createInfo, const Memory::AllocationCallbacks* _allocator, Handle& _event)

Create an Event.

Parameters
_device
_createInfo
_allocator
_event

Specification

static void Destroy(LogicalDevice::Handle _device, Handle _event, const Memory::AllocationCallbacks* _allocator)

Destroy an event.

Parameters
_device
_event
_allocator

Specification

static EResult GetStatus(LogicalDevice::Handle _device, Handle _event)

Query the state of an event from the host.

Specification

static EResult Reset(LogicalDevice::Handle _device, Handle _event)

Set the state of an event to unsignaled from the host.

Parameters
_device
_event

Specification

static EResult Set(LogicalDevice::Handle _device, Handle _event)

Parameters
_device
_event

Specification

static EResult Create(LogicalDevice::Handle _logicalDevice, const CreateInfo& _createInfo, const Memory::AllocationCallbacks* _allocator, Handle& _fence)

Create a fence.

Parameters
_logicalDevice
_createInfo
_allocator
_fence

Specification

static void Destroy(LogicalDevice::Handle _logicalDevice, Handle _fence, const Memory::AllocationCallbacks* _allocator)

Destroy a fence.

Parameters
_logicalDevice
_fence
_allocator

Specification

static EResult GetStatus(LogicalDevice::Handle _logicalDevice, Handle _fence)

Export a Windows handle representing the state of a fence.

Parameters
_logicalDevice
_fence

Specification

static EResult RegisterDeviceEvent(LogicalDevice::Handle _device, const DeviceEventInfo& _deviceEventInfo, const Memory::AllocationCallbacks* _allocator, Handle& _fence)

Create a fence that will be signaled when an event occurs on a device.

Specification

static EResult RegisterDisplayEvent(LogicalDevice::Handle _device, Display::Handle _display, const DisplayEventInfo& _displayEventInfo, const Memory::AllocationCallbacks* _allocator, Handle& _fence)

Create a fence that will be signaled when an event occurs on a Display object.

Specification

static EResult Reset(LogicalDevice::Handle _logicalDevice, Handle* _fences, ui32 _fenceCount)

Specification

Parameters
_logicalDevice
_fences
_fenceCount

static EResult WaitForFences(LogicalDevice::Handle _device, ui32 _fenceCount, const Handle* _fences, Bool _waitAll, u64 _timeout)

Wait for one or more fences to enter the signaled state on the host.

Specification

static EResult Create(LogicalDevice::Handle _device, const CreateInfo& _createInfo, const Memory::AllocationCallbacks* _allocator, Handle& _semaphore)

Create a semaphore.

Specification

static void Destroy(LogicalDevice::Handle _device, Handle _semaphore, const Memory::AllocationCallbacks* _allocator)

Destroy a semaphore.

Parameters
_device
_semaphore
_allocator

Specification

static EResult GetCounterValue(LogicalDevice::Handle _device, Handle _semaphore, u64& _value)

Query the current counter value of a semaphore created with a SemaphoreType of Timeline from the host.

Specification

static EResult Signal(LogicalDevice::Handle _device, const SignalInfo& _signalInfo)

Signal a semaphore created with a SemaphoreType of Timeline with a particular counter value, on the host.

Specification

static EResult WaitFor(LogicalDevice::Handle _device, const WaitInfo& _waitInfo, u64 _timeout)

Wait for a set of semaphores created with a VkSemaphoreType of VK_SEMAPHORE_TYPE_TIMELINE to reach particular counter values on the host.

Parameters
_device
_waitInfo
_timeout

Specification