| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.BufferView
Synopsis
- createBufferView :: forall io. MonadIO io => Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView
- withBufferView :: forall io r. MonadIO io => (io BufferView -> (BufferView -> io ()) -> r) -> Device -> BufferViewCreateInfo -> Maybe AllocationCallbacks -> r
- destroyBufferView :: forall io. MonadIO io => Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data BufferViewCreateInfo = BufferViewCreateInfo {}
Documentation
createBufferView :: forall io. MonadIO io => Device -> BufferViewCreateInfo -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView Source #
vkCreateBufferView - Create a new buffer view object
Parameters
deviceis the logical device that creates the buffer view.
pCreateInfois a pointer to aBufferViewCreateInfostructure containing parameters to be used to create the buffer.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pViewis a pointer to aBufferViewhandle in which the resulting buffer view object is returned.
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 => (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
deviceis the logical device that destroys the buffer view.
bufferViewis the buffer view to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
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,rangedivided by the texel block size offormat, multiplied by the number of texels per texel block for that format (as defined in the Compatible Formats table), 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 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
| |