| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.Buffer
- 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_EXCLUSIVEspecifies 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_CONCURRENTspecifies 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
Constructors
| VkSharingMode Int32 |
pattern VK_SHARING_MODE_EXCLUSIVE :: VkSharingMode Source #
pattern VK_SHARING_MODE_CONCURRENT :: VkSharingMode Source #
newtype VkBufferUsageFlagBits Source #
Constructors
| VkBufferUsageFlagBits VkFlags |
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_BITspecifies that the buffer will be backed using sparse memory binding.
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BITspecifies 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_BITflag.VK_BUFFER_CREATE_SPARSE_ALIASED_BITspecifies 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_BITflag.
See Sparse Resource Features and Physical Device Features for details of the sparse memory features supported on a device.
See Also
Constructors
| VkBufferCreateFlagBits VkFlags |
vkCreateBuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkBufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pBuffer" ::: Ptr VkBuffer) -> IO VkResult Source #
vkCreateBuffer - Create a new buffer object
Parameters
deviceis the logical device that creates the buffer object.
pCreateInfois a pointer to an instance of theVkBufferCreateInfostructure containing parameters affecting creation of the buffer.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pBufferpoints to aVkBufferhandle in which the resulting buffer object is returned.
Description
Valid Usage
- If the
flagsmember ofpCreateInfoincludesVK_BUFFER_CREATE_SPARSE_BINDING_BIT, creating thisVkBuffermust not cause the total required sparse memory for all currently valid sparse resources on the device to exceedVkPhysicalDeviceLimits::sparseAddressSpaceSize
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkBufferCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pBuffermust be a valid pointer to aVkBufferhandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_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
deviceis the logical device that destroys the buffer.
bufferis the buffer to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
Valid Usage
- All submitted commands that refer to
buffer, either directly or via aVkBufferView, must have completed execution
- If
VkAllocationCallbackswere provided whenbufferwas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenbufferwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
bufferis notVK_NULL_HANDLE,buffermust be a validVkBufferhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
bufferis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
buffermust be externally synchronized
See Also
data VkBufferCreateInfo Source #
VkBufferCreateInfo - Structure specifying the parameters of a newly created buffer object
Description
Valid Usage
sizemust be greater than0
- If
sharingModeisVK_SHARING_MODE_CONCURRENT,pQueueFamilyIndicesmust be a valid pointer to an array ofqueueFamilyIndexCountuint32_tvalues - If
sharingModeisVK_SHARING_MODE_CONCURRENT,queueFamilyIndexCountmust be greater than1 - If
sharingModeisVK_SHARING_MODE_CONCURRENT, each element ofpQueueFamilyIndicesmust be unique and must be less thanpQueueFamilyPropertyCountreturned by eithervkGetPhysicalDeviceQueueFamilyPropertiesorvkGetPhysicalDeviceQueueFamilyProperties2for thephysicalDevicethat was used to createdevice - If the
sparse bindings
feature is not enabled,
flagsmust not containVK_BUFFER_CREATE_SPARSE_BINDING_BIT - If the
sparse buffer residency
feature is not enabled,
flagsmust not containVK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT - If the
sparse aliased residency
feature is not enabled,
flagsmust not containVK_BUFFER_CREATE_SPARSE_ALIASED_BIT - If
flagscontainsVK_BUFFER_CREATE_SPARSE_RESIDENCY_BITorVK_BUFFER_CREATE_SPARSE_ALIASED_BIT, it must also containVK_BUFFER_CREATE_SPARSE_BINDING_BIT - If the
pNextchain contains an instance ofVkExternalMemoryBufferCreateInfo, itshandleTypesmember must only contain bits that are also inVkExternalBufferProperties::externalMemoryProperties.pname:compatibleHandleTypes, as returned byvkGetPhysicalDeviceExternalBufferPropertieswithpExternalBufferInfo->handleTypeequal to any one of the handle types specified inVkExternalMemoryBufferCreateInfo::handleTypes - If the
pNextchain contains an instance ofVkDedicatedAllocationBufferCreateInfoNV, and thededicatedAllocationmember of the chained structure isVK_TRUE, thenflagsmust not includeVK_BUFFER_CREATE_SPARSE_BINDING_BIT,VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, orVK_BUFFER_CREATE_SPARSE_ALIASED_BIT
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDedicatedAllocationBufferCreateInfoNVorVkExternalMemoryBufferCreateInfo - Each
sTypemember in thepNextchain must be unique flagsmust be a valid combination ofVkBufferCreateFlagBitsvaluesusagemust be a valid combination ofVkBufferUsageFlagBitsvaluesusagemust not be0sharingModemust be a validVkSharingModevalue
See Also
VkBufferCreateFlags, VkBufferUsageFlags, VkDeviceSize,
VkSharingMode, VkStructureType,
vkCreateBuffer
Constructors
| VkBufferCreateInfo | |
Fields
| |
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