vulkan-3.2.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.BufferView

Synopsis

Documentation

createBufferView :: forall io. MonadIO io => Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView Source #

vkCreateBufferView - Create a new buffer view object

Parameters

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

Valid Usage (Implicit)

  • device must be a valid Device handle

Return Codes

Success
Failure

See Also

AllocationCallbacks, BufferView, BufferViewCreateInfo, Device

withBufferView :: forall io r. MonadIO io => (io BufferView -> (BufferView -> io ()) -> r) -> Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> r Source #

A convenience wrapper to make a compatible pair of calls to createBufferView and destroyBufferView

To ensure that destroyBufferView is always called: pass bracket (or the allocate function from your favourite resource management library) as the first argument. To just extract the pair pass '(,)' as the first argument.

destroyBufferView :: forall io. MonadIO io => Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> 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 AllocationCallbacks were provided when bufferView was created, a compatible set of callbacks must be provided here
  • If no AllocationCallbacks were provided when bufferView was created, pAllocator must be NULL

Valid Usage (Implicit)

  • device must be a valid Device handle
  • If bufferView is not NULL_HANDLE, bufferView must be a valid BufferView handle
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks 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

AllocationCallbacks, BufferView, Device

data BufferViewCreateInfo Source #

VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view

Valid Usage

  • offset must be less than the size of buffer

Valid Usage (Implicit)

  • pNext must be NULL
  • flags must be 0
  • buffer must be a valid Buffer handle
  • format must be a valid Format value

See Also

Buffer, BufferViewCreateFlags, DeviceSize, Format, StructureType, createBufferView

Constructors

BufferViewCreateInfo 

Fields

  • flags :: BufferViewCreateFlags

    flags is reserved for future use.

  • buffer :: Buffer

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

  • format :: Format

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

  • offset :: DeviceSize

    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.

  • range :: DeviceSize

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

Instances
Show BufferViewCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.BufferView

Storable BufferViewCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.BufferView

FromCStruct BufferViewCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.BufferView

ToCStruct BufferViewCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.BufferView

Zero BufferViewCreateInfo Source # 
Instance details

Defined in Graphics.Vulkan.Core10.BufferView