| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.BufferView
Synopsis
- createBufferView :: forall a io. (Extendss BufferViewCreateInfo a, PokeChain a, MonadIO io) => Device -> BufferViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView
- withBufferView :: forall a io r. (Extendss BufferViewCreateInfo a, PokeChain a, MonadIO io) => Device -> BufferViewCreateInfo a -> Maybe AllocationCallbacks -> (io BufferView -> (BufferView -> io ()) -> r) -> r
- destroyBufferView :: forall io. MonadIO io => Device -> BufferView -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- data BufferViewCreateInfo (es :: [Type]) = BufferViewCreateInfo {
- next :: Chain es
- flags :: BufferViewCreateFlags
- buffer :: Buffer
- format :: Format
- offset :: DeviceSize
- range :: DeviceSize
- newtype BufferView = BufferView Word64
- newtype BufferViewCreateFlags = BufferViewCreateFlags Flags
Documentation
Arguments
| :: forall a io. (Extendss BufferViewCreateInfo a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> BufferViewCreateInfo a |
|
| -> ("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
VK_VERSION_1_0,
AllocationCallbacks,
BufferView, BufferViewCreateInfo,
Device
withBufferView :: forall a io r. (Extendss BufferViewCreateInfo a, PokeChain a, MonadIO io) => Device -> BufferViewCreateInfo a -> 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 last argument.
To just extract the pair pass (,) as the last argument.
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> BufferView |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyBufferView - Destroy a buffer view object
Valid Usage
- 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 (es :: [Type]) Source #
VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view
Description
The buffer view has a buffer view usage identifying which descriptor
types can be created from it. This usage can be defined by including
the
BufferUsageFlags2CreateInfoKHR
structure in the pNext chain, and specifying the usage value there.
If this structure is not included, it is equal to the
BufferCreateInfo::usage value used to create
buffer.
Valid Usage
- 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 the
buffer view usage
contains
BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, then format features offormatmust containFORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT - If the
buffer view usage
contains
BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, then format features offormatmust containFORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT - 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 ofPhysicalDeviceTexelBufferAlignmentProperties::storageTexelBufferOffsetAlignmentBytesor, ifPhysicalDeviceTexelBufferAlignmentProperties::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 ofPhysicalDeviceTexelBufferAlignmentProperties::uniformTexelBufferOffsetAlignmentBytesor, ifPhysicalDeviceTexelBufferAlignmentProperties::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 - If the
pNextchain includes aExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must beEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT - If the
pNextchain includes aBufferUsageFlags2CreateInfoKHR, itsusagemust not contain any other bit thanBUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHRorBUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR - If the
pNextchain includes aBufferUsageFlags2CreateInfoKHR, itsusagemust be a subset of theBufferCreateInfo::usagespecified orBufferUsageFlags2CreateInfoKHR::usagefromBufferCreateInfo::pNextwhen creatingbuffer
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofBufferUsageFlags2CreateInfoKHRorExportMetalObjectCreateInfoEXT - The
sTypevalue of each struct in thepNextchain must be unique, with the exception of structures of typeExportMetalObjectCreateInfoEXT -
flagsmust be0 -
buffermust be a validBufferhandle -
formatmust be a validFormatvalue
See Also
VK_VERSION_1_0,
Buffer,
BufferViewCreateFlags,
DeviceSize,
Format,
StructureType, createBufferView
Constructors
| BufferViewCreateInfo | |
Fields
| |
Instances
newtype BufferView Source #
VkBufferView - Opaque handle to a buffer view object
See Also
VK_VERSION_1_0,
ExportMetalTextureInfoEXT,
WriteDescriptorSet,
createBufferView,
destroyBufferView
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 |