Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkSharingMode = VkSharingMode Int32
- pattern VK_SHARING_MODE_EXCLUSIVE :: VkSharingMode
- pattern VK_SHARING_MODE_CONCURRENT :: VkSharingMode
- newtype VkBufferUsageFlagBits = VkBufferUsageFlagBits VkFlags
- pattern VK_BUFFER_USAGE_TRANSFER_SRC_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_TRANSFER_DST_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_STORAGE_BUFFER_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_INDEX_BUFFER_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_VERTEX_BUFFER_BIT :: VkBufferUsageFlagBits
- pattern VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT :: VkBufferUsageFlagBits
- newtype VkBufferCreateFlagBits = VkBufferCreateFlagBits VkFlags
- pattern VK_BUFFER_CREATE_SPARSE_BINDING_BIT :: VkBufferCreateFlagBits
- pattern VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT :: VkBufferCreateFlagBits
- pattern VK_BUFFER_CREATE_SPARSE_ALIASED_BIT :: VkBufferCreateFlagBits
- vkCreateBuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkBufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pBuffer" ::: Ptr VkBuffer) -> IO VkResult
- vkDestroyBuffer :: ("device" ::: VkDevice) -> ("buffer" ::: VkBuffer) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- data VkBufferCreateInfo = VkBufferCreateInfo {}
- type VkBufferUsageFlags = VkBufferUsageFlagBits
- type VkBufferCreateFlags = VkBufferCreateFlagBits
Documentation
newtype VkSharingMode Source #
VkSharingMode - Buffer and image sharing modes
Description
VK_SHARING_MODE_EXCLUSIVE
specifies that access to any range or image subresource of the object will be exclusive to a single queue family at a time.
VK_SHARING_MODE_CONCURRENT
specifies that concurrent access to any range or image subresource of the object from multiple queue families is supported.
Note
VK_SHARING_MODE_CONCURRENT
may result in lower performance access to
the buffer or image than VK_SHARING_MODE_EXCLUSIVE
.
Ranges of buffers and image subresources of image objects created using
VK_SHARING_MODE_EXCLUSIVE
must only be accessed by queues in the
queue family that has ownership of the resource. Upon creation, such
resources are not owned by any queue family; ownership is implicitly
acquired upon first use within a queue. Once a resource using
VK_SHARING_MODE_EXCLUSIVE
is owned by some queue family, the
application must perform a queue family ownership
transfer
to make the memory contents of a range or image subresource accessible
to a different queue family.
Note
Images still require a layout
transition
from VK_IMAGE_LAYOUT_UNDEFINED
or VK_IMAGE_LAYOUT_PREINITIALIZED
before being used on the first queue.
A queue family can take ownership of an image subresource or buffer
range of a resource created with VK_SHARING_MODE_EXCLUSIVE
, without an
ownership transfer, in the same way as for a resource that was just
created; however, taking ownership in this way has the effect that the
contents of the image subresource or buffer range are undefined.
Ranges of buffers and image subresources of image objects created using
VK_SHARING_MODE_CONCURRENT
must only be accessed by queues from the
queue families specified through the queueFamilyIndexCount
and
pQueueFamilyIndices
members of the corresponding create info
structures.
See Also
VkBufferCreateInfo
, VkImageCreateInfo
,
VkSwapchainCreateInfoKHR
Instances
pattern VK_SHARING_MODE_EXCLUSIVE :: VkSharingMode Source #
pattern VK_SHARING_MODE_CONCURRENT :: VkSharingMode Source #
newtype VkBufferUsageFlagBits Source #
Instances
pattern VK_BUFFER_USAGE_TRANSFER_SRC_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_TRANSFER_SRC_BIT
specifies that the buffer can be
used as the source of a transfer command (see the definition of
@VK_PIPELINE_STAGE_TRANSFER_BIT@).
pattern VK_BUFFER_USAGE_TRANSFER_DST_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_TRANSFER_DST_BIT
specifies that the buffer can be
used as the destination of a transfer command.
pattern VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
specifies that the buffer
can be used to create a VkBufferView
suitable for occupying a
VkDescriptorSet
slot of type
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
.
pattern VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
specifies that the buffer
can be used to create a VkBufferView
suitable for occupying a
VkDescriptorSet
slot of type
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
.
pattern VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
specifies that the buffer can be
used in a VkDescriptorBufferInfo
suitable for occupying a
VkDescriptorSet
slot either of type
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
or
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
.
pattern VK_BUFFER_USAGE_STORAGE_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT
specifies that the buffer can be
used in a VkDescriptorBufferInfo
suitable for occupying a
VkDescriptorSet
slot either of type
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
or
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
.
pattern VK_BUFFER_USAGE_INDEX_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_INDEX_BUFFER_BIT
specifies that the buffer is suitable
for passing as the buffer
parameter to vkCmdBindIndexBuffer
.
pattern VK_BUFFER_USAGE_VERTEX_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT
specifies that the buffer is
suitable for passing as an element of the pBuffers
array to
vkCmdBindVertexBuffers
.
pattern VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT :: VkBufferUsageFlagBits Source #
VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT
specifies that the buffer is
suitable for passing as the buffer
parameter to vkCmdDrawIndirect
,
vkCmdDrawIndexedIndirect
, or vkCmdDispatchIndirect
. It is also
suitable for passing as the buffer
member of
VkIndirectCommandsTokenNVX
, or sequencesCountBuffer
or
sequencesIndexBuffer
member of VkCmdProcessCommandsInfoNVX
newtype VkBufferCreateFlagBits Source #
VkBufferCreateFlagBits - Bitmask specifying additional parameters of a buffer
Description
VK_BUFFER_CREATE_SPARSE_BINDING_BIT
specifies that the buffer will be backed using sparse memory binding.
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
specifies that the buffer can be partially backed using sparse memory binding. Buffers created with this flag must also be created with theVK_BUFFER_CREATE_SPARSE_BINDING_BIT
flag.VK_BUFFER_CREATE_SPARSE_ALIASED_BIT
specifies that the buffer will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another buffer (or another portion of the same buffer). Buffers created with this flag must also be created with theVK_BUFFER_CREATE_SPARSE_BINDING_BIT
flag.
See Sparse Resource Features and Physical Device Features for details of the sparse memory features supported on a device.
See Also
Instances
vkCreateBuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkBufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pBuffer" ::: Ptr VkBuffer) -> IO VkResult Source #
vkCreateBuffer - Create a new buffer object
Parameters
device
is the logical device that creates the buffer object.
pCreateInfo
is a pointer to an instance of theVkBufferCreateInfo
structure containing parameters affecting creation of the buffer.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pBuffer
points to aVkBuffer
handle in which the resulting buffer object is returned.
Valid Usage
- If the
flags
member ofpCreateInfo
includesVK_BUFFER_CREATE_SPARSE_BINDING_BIT
, creating thisVkBuffer
must not cause the total required sparse memory for all currently valid sparse resources on the device to exceedVkPhysicalDeviceLimits
::sparseAddressSpaceSize
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkBufferCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pBuffer
must be a valid pointer to aVkBuffer
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks
,
VkBuffer
,
VkBufferCreateInfo
,
VkDevice
vkDestroyBuffer :: ("device" ::: VkDevice) -> ("buffer" ::: VkBuffer) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyBuffer - Destroy a buffer object
Parameters
device
is the logical device that destroys the buffer.
buffer
is the buffer to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
buffer
, either directly or via aVkBufferView
, must have completed execution
- If
VkAllocationCallbacks
were provided whenbuffer
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenbuffer
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
buffer
is notVK_NULL_HANDLE
,buffer
must be a validVkBuffer
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
buffer
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
buffer
must be externally synchronized
See Also
data VkBufferCreateInfo Source #
VkBufferCreateInfo - Structure specifying the parameters of a newly created buffer object
Valid Usage
size
must be greater than0
- If
sharingMode
isVK_SHARING_MODE_CONCURRENT
,pQueueFamilyIndices
must be a valid pointer to an array ofqueueFamilyIndexCount
uint32_t
values - If
sharingMode
isVK_SHARING_MODE_CONCURRENT
,queueFamilyIndexCount
must be greater than1
- If
sharingMode
isVK_SHARING_MODE_CONCURRENT
, each element ofpQueueFamilyIndices
must be unique and must be less thanpQueueFamilyPropertyCount
returned by eithervkGetPhysicalDeviceQueueFamilyProperties
orvkGetPhysicalDeviceQueueFamilyProperties2
for thephysicalDevice
that was used to createdevice
- If the sparse
bindings
feature is not enabled,
flags
must not containVK_BUFFER_CREATE_SPARSE_BINDING_BIT
- If the sparse buffer
residency
feature is not enabled,
flags
must not containVK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse aliased
residency
feature is not enabled,
flags
must not containVK_BUFFER_CREATE_SPARSE_ALIASED_BIT
- If
flags
containsVK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
orVK_BUFFER_CREATE_SPARSE_ALIASED_BIT
, it must also containVK_BUFFER_CREATE_SPARSE_BINDING_BIT
- If the
pNext
chain contains an instance ofVkExternalMemoryBufferCreateInfo
, itshandleTypes
member must only contain bits that are also inVkExternalBufferProperties
::externalMemoryProperties.pname
:compatibleHandleTypes, as returned byvkGetPhysicalDeviceExternalBufferProperties
withpExternalBufferInfo
->handleType
equal to any one of the handle types specified inVkExternalMemoryBufferCreateInfo
::handleTypes
- If the
pNext
chain contains an instance ofVkDedicatedAllocationBufferCreateInfoNV
, and thededicatedAllocation
member of the chained structure isVK_TRUE
, thenflags
must not includeVK_BUFFER_CREATE_SPARSE_BINDING_BIT
,VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT
, orVK_BUFFER_CREATE_SPARSE_ALIASED_BIT
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDedicatedAllocationBufferCreateInfoNV
orVkExternalMemoryBufferCreateInfo
- Each
sType
member in thepNext
chain must be unique flags
must be a valid combination ofVkBufferCreateFlagBits
valuesusage
must be a valid combination ofVkBufferUsageFlagBits
valuesusage
must not be0
sharingMode
must be a validVkSharingMode
value
See Also
VkBufferCreateFlags
, VkBufferUsageFlags
, VkDeviceSize
,
VkSharingMode
, VkStructureType
,
vkCreateBuffer
VkBufferCreateInfo | |
|
Instances
Eq VkBufferCreateInfo Source # | |
(==) :: VkBufferCreateInfo -> VkBufferCreateInfo -> Bool # (/=) :: VkBufferCreateInfo -> VkBufferCreateInfo -> Bool # | |
Show VkBufferCreateInfo Source # | |
showsPrec :: Int -> VkBufferCreateInfo -> ShowS # show :: VkBufferCreateInfo -> String # showList :: [VkBufferCreateInfo] -> ShowS # | |
Storable VkBufferCreateInfo Source # | |
sizeOf :: VkBufferCreateInfo -> Int # alignment :: VkBufferCreateInfo -> Int # peekElemOff :: Ptr VkBufferCreateInfo -> Int -> IO VkBufferCreateInfo # pokeElemOff :: Ptr VkBufferCreateInfo -> Int -> VkBufferCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkBufferCreateInfo # pokeByteOff :: Ptr b -> Int -> VkBufferCreateInfo -> IO () # peek :: Ptr VkBufferCreateInfo -> IO VkBufferCreateInfo # poke :: Ptr VkBufferCreateInfo -> VkBufferCreateInfo -> IO () # |
type VkBufferUsageFlags = VkBufferUsageFlagBits Source #
VkBufferUsageFlags - Bitmask of VkBufferUsageFlagBits
Description
VkBufferUsageFlags
is a bitmask type for setting a mask of zero or
more VkBufferUsageFlagBits
.
See Also
VkBufferCreateInfo
, VkBufferUsageFlagBits
,
VkPhysicalDeviceExternalBufferInfo
type VkBufferCreateFlags = VkBufferCreateFlagBits Source #
VkBufferCreateFlags - Bitmask of VkBufferCreateFlagBits
Description
VkBufferCreateFlags
is a bitmask type for setting a mask of zero or
more VkBufferCreateFlagBits
.
See Also
VkBufferCreateFlagBits
, VkBufferCreateInfo
,
VkPhysicalDeviceExternalBufferInfo