vulkan-2.0.0.1: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.BufferView

Synopsis

Documentation

newtype VkBufferViewCreateFlags Source #

VkBufferViewCreateFlags - Reserved for future use

Description

VkBufferViewCreateFlags is a bitmask type for setting a mask, but is currently reserved for future use.

See Also

VkBufferViewCreateInfo

Instances
Eq VkBufferViewCreateFlags Source # 
Instance details
Ord VkBufferViewCreateFlags Source # 
Instance details
Read VkBufferViewCreateFlags Source # 
Instance details
Show VkBufferViewCreateFlags Source # 
Instance details
Storable VkBufferViewCreateFlags Source # 
Instance details
Bits VkBufferViewCreateFlags Source # 
Instance details
FiniteBits VkBufferViewCreateFlags Source # 
Instance details

type VkBufferView = Ptr VkBufferView_T Source #

VkBufferView - Opaque handle to a buffer view object

See Also

VkWriteDescriptorSet, vkCreateBufferView, vkDestroyBufferView

vkCreateBufferView :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkBufferViewCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pView" ::: Ptr VkBufferView) -> IO VkResult Source #

vkCreateBufferView - Create a new buffer view object

Parameters

  • device is the logical device that creates the buffer view.
  • pCreateInfo is a pointer to an instance of the VkBufferViewCreateInfo structure containing parameters to be used to create the buffer.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.
  • pView points to a VkBufferView handle in which the resulting buffer view object is returned.

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • pCreateInfo must be a valid pointer to a valid VkBufferViewCreateInfo structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • pView must be a valid pointer to a VkBufferView handle

Return Codes

[Success] - VK_SUCCESS

[Failure] - VK_ERROR_OUT_OF_HOST_MEMORY

  • VK_ERROR_OUT_OF_DEVICE_MEMORY

See Also

VkAllocationCallbacks, VkBufferView, VkBufferViewCreateInfo, VkDevice

vkDestroyBufferView :: ("device" ::: VkDevice) -> ("bufferView" ::: VkBufferView) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #

vkDestroyBufferView - Destroy a buffer view object

Parameters

  • device is the logical device that destroys the buffer view.
  • bufferView is the buffer view to destroy.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

  • All submitted commands that refer to bufferView must have completed execution
  • If VkAllocationCallbacks were provided when bufferView was created, a compatible set of callbacks must be provided here
  • If no VkAllocationCallbacks were provided when bufferView was created, pAllocator must be NULL

Valid Usage (Implicit)

  • device must be a valid VkDevice handle
  • If bufferView is not VK_NULL_HANDLE, bufferView must be a valid VkBufferView handle
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid VkAllocationCallbacks structure
  • If bufferView is a valid handle, it must have been created, allocated, or retrieved from device

Host Synchronization

  • Host access to bufferView must be externally synchronized

See Also

VkAllocationCallbacks, VkBufferView, VkDevice

data VkBufferViewCreateInfo Source #

VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view

Valid Usage

  • offset must be less than the size of buffer
  • offset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignment
  • If range is not equal to VK_WHOLE_SIZE, range must be greater than 0
  • If range is not equal to VK_WHOLE_SIZE, range must be a multiple of the element size of format
  • If range is not equal to VK_WHOLE_SIZE, range divided by the element size of format must be less than or equal to VkPhysicalDeviceLimits::maxTexelBufferElements
  • If range is not equal to VK_WHOLE_SIZE, the sum of offset and range must be less than or equal to the size of buffer
  • buffer must have been created with a usage value containing at least one of VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
  • If buffer was created with usage containing VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, format must be supported for uniform texel buffers, as specified by the VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatProperties
  • If buffer was created with usage containing VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, format must be supported for storage texel buffers, as specified by the VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatProperties
  • If buffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object

Valid Usage (Implicit)

  • sType must be VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
  • pNext must be NULL
  • flags must be 0
  • buffer must be a valid VkBuffer handle
  • format must be a valid VkFormat value

See Also

VkBuffer, VkBufferViewCreateFlags, VkDeviceSize, VkFormat, VkStructureType, vkCreateBufferView

Constructors

VkBufferViewCreateInfo 

Fields

  • vkSType :: VkStructureType

    sType is the type of this structure.

  • vkPNext :: Ptr ()

    pNext is NULL or a pointer to an extension-specific structure.

  • vkFlags :: VkBufferViewCreateFlags

    flags is reserved for future use.

  • vkBuffer :: VkBuffer

    buffer is a VkBuffer on which the view will be created.

  • vkFormat :: VkFormat

    format is a VkFormat describing the format of the data elements in the buffer.

  • vkOffset :: VkDeviceSize

    offset is an offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset.

  • vkRange :: VkDeviceSize

    range is a size in bytes of the buffer view. If range is equal to VK_WHOLE_SIZE, the range from offset to the end of the buffer is used. If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the element size of format, then the nearest smaller multiple is used.