| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.BufferView
Synopsis
- createBufferView :: forall io. MonadIO io => Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView
- withBufferView :: forall io r. MonadIO io => Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> (io BufferView -> (BufferView -> io ()) -> r) -> r
- destroyBufferView :: forall io. MonadIO io => Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data BufferViewCreateInfo = BufferViewCreateInfo {}
- newtype BufferView = BufferView Word64
- newtype BufferViewCreateFlags = BufferViewCreateFlags Flags
Documentation
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> BufferViewCreateInfo |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io BufferView |
vkCreateBufferView - Create a new buffer view object
Valid Usage (Implicit)
devicemust be a validDevicehandle
pCreateInfomust be a valid pointer to a validBufferViewCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pViewmust be a valid pointer to aBufferViewhandle
Return Codes
See Also
AllocationCallbacks,
BufferView, BufferViewCreateInfo,
Device
withBufferView :: forall io r. MonadIO io => Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> (io BufferView -> (BufferView -> io ()) -> r) -> 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.
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> BufferView |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyBufferView - Destroy a buffer view object
Valid Usage
- All submitted commands that refer to
bufferViewmust have completed execution
- If
AllocationCallbackswere provided whenbufferViewwas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whenbufferViewwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validDevicehandle
- If
bufferViewis notNULL_HANDLE,bufferViewmust be a validBufferViewhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure - If
bufferViewis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
bufferViewmust be externally synchronized
See Also
data BufferViewCreateInfo Source #
VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view
Valid Usage
offsetmust be less than the size ofbuffer
- If
rangeis not equal toWHOLE_SIZE,rangemust be greater than0 - If
rangeis not equal toWHOLE_SIZE,rangemust be an integer multiple of the texel block size offormat - If
rangeis not equal toWHOLE_SIZE, the number of texel buffer elements given by (⌊range/ (texel block size)⌋ × (texels per block)) where texel block size and texels per block are as defined in the Compatible Formats table forformat, must be less than or equal toPhysicalDeviceLimits::maxTexelBufferElements - If
rangeis not equal toWHOLE_SIZE, the sum ofoffsetandrangemust be less than or equal to the size ofbuffer - If
rangeis equal toWHOLE_SIZE, the number of texel buffer elements given by (⌊(size -offset) / (texel block size)⌋ × (texels per block)) where size is the size ofbuffer, and texel block size and texels per block are as defined in the Compatible Formats table forformat, must be less than or equal toPhysicalDeviceLimits::maxTexelBufferElements buffermust have been created with ausagevalue containing at least one ofBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITorBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT- If
bufferwas created withusagecontainingBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT,formatmust be supported for uniform texel buffers, as specified by theFORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BITflag inFormatProperties::bufferFeaturesreturned bygetPhysicalDeviceFormatProperties - If
bufferwas created withusagecontainingBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT,formatmust be supported for storage texel buffers, as specified by theFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BITflag inFormatProperties::bufferFeaturesreturned bygetPhysicalDeviceFormatProperties - If
bufferis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject - If the
texelBufferAlignment
feature is not enabled,
offsetmust be a multiple ofPhysicalDeviceLimits::minTexelBufferOffsetAlignment - If the
texelBufferAlignment
feature is enabled and if
bufferwas created withusagecontainingBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT,offsetmust be a multiple of the lesser ofPhysicalDeviceTexelBufferAlignmentPropertiesEXT::storageTexelBufferOffsetAlignmentBytesor, ifPhysicalDeviceTexelBufferAlignmentPropertiesEXT::storageTexelBufferOffsetSingleTexelAlignmentisTRUE, the size of a texel of the requestedformat. If the size of a texel is a multiple of three bytes, then the size of a single component offormatis used instead - If the
texelBufferAlignment
feature is enabled and if
bufferwas created withusagecontainingBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT,offsetmust be a multiple of the lesser ofPhysicalDeviceTexelBufferAlignmentPropertiesEXT::uniformTexelBufferOffsetAlignmentBytesor, ifPhysicalDeviceTexelBufferAlignmentPropertiesEXT::uniformTexelBufferOffsetSingleTexelAlignmentisTRUE, the size of a texel of the requestedformat. If the size of a texel is a multiple of three bytes, then the size of a single component offormatis used instead
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
pNextmust beNULLflagsmust be0buffermust be a validBufferhandleformatmust be a validFormatvalue
See Also
Buffer,
BufferViewCreateFlags,
DeviceSize,
Format,
StructureType, createBufferView
Constructors
| BufferViewCreateInfo | |
Fields
| |
Instances
newtype BufferView Source #
VkBufferView - Opaque handle to a buffer view object
See Also
Constructors
| BufferView Word64 |
Instances
newtype BufferViewCreateFlags Source #
VkBufferViewCreateFlags - Reserved for future use
Description
BufferViewCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| BufferViewCreateFlags Flags |