Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 {}
Documentation
:: forall io. MonadIO io | |
=> Device |
|
-> BufferViewCreateInfo |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io BufferView |
vkCreateBufferView - Create a new buffer view object
Valid Usage (Implicit)
device
must be a validDevice
handle
pCreateInfo
must be a valid pointer to a validBufferViewCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pView
must be a valid pointer to aBufferView
handle
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.
:: forall io. MonadIO io | |
=> Device |
|
-> BufferView |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyBufferView - Destroy a buffer view object
Valid Usage
- All submitted commands that refer to
bufferView
must have completed execution
- If
AllocationCallbacks
were provided whenbufferView
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whenbufferView
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validDevice
handle
- If
bufferView
is notNULL_HANDLE
,bufferView
must be a validBufferView
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
bufferView
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
bufferView
must be externally synchronized
See Also
data BufferViewCreateInfo Source #
VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view
Valid Usage
offset
must be less than the size ofbuffer
- If
range
is not equal toWHOLE_SIZE
,range
must be greater than0
- If
range
is not equal toWHOLE_SIZE
,range
must be an integer multiple of the texel block size offormat
- If
range
is not equal toWHOLE_SIZE
,range
divided 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
range
is not equal toWHOLE_SIZE
, the sum ofoffset
andrange
must be less than or equal to the size ofbuffer
buffer
must have been created with ausage
value containing at least one ofBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
orBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
- If
buffer
was created withusage
containingBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
,format
must be supported for uniform texel buffers, as specified by theFORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
flag inFormatProperties
::bufferFeatures
returned bygetPhysicalDeviceFormatProperties
- If
buffer
was created withusage
containingBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
,format
must be supported for storage texel buffers, as specified by theFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
flag inFormatProperties
::bufferFeatures
returned bygetPhysicalDeviceFormatProperties
- If
buffer
is non-sparse then it must be bound completely and contiguously to a singleDeviceMemory
object - If the
texelBufferAlignment
feature is not enabled,
offset
must be a multiple ofPhysicalDeviceLimits
::minTexelBufferOffsetAlignment
- If the
texelBufferAlignment
feature is enabled and if
buffer
was created withusage
containingBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
,offset
must be a multiple of the lesser ofPhysicalDeviceTexelBufferAlignmentPropertiesEXT
::storageTexelBufferOffsetAlignmentBytes
or, ifPhysicalDeviceTexelBufferAlignmentPropertiesEXT
::storageTexelBufferOffsetSingleTexelAlignment
isTRUE
, 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 offormat
is used instead - If the
texelBufferAlignment
feature is enabled and if
buffer
was created withusage
containingBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
,offset
must be a multiple of the lesser ofPhysicalDeviceTexelBufferAlignmentPropertiesEXT
::uniformTexelBufferOffsetAlignmentBytes
or, ifPhysicalDeviceTexelBufferAlignmentPropertiesEXT
::uniformTexelBufferOffsetSingleTexelAlignment
isTRUE
, 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 offormat
is used instead
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
pNext
must beNULL
flags
must be0
buffer
must be a validBuffer
handleformat
must be a validFormat
value
See Also
Buffer
,
BufferViewCreateFlags
,
DeviceSize
,
Format
,
StructureType
, createBufferView
BufferViewCreateInfo | |
|