| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.BufferView
Synopsis
- createBufferView :: forall (a :: [Type]) io. (Extendss BufferViewCreateInfo a, PokeChain a, MonadIO io) => Device -> BufferViewCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io BufferView
- withBufferView :: forall (a :: [Type]) io r. (Extendss BufferViewCreateInfo a, PokeChain a, MonadIO io) => Device -> BufferViewCreateInfo a -> Maybe AllocationCallbacks -> (io BufferView -> (BufferView -> io ()) -> r) -> r
- destroyBufferView :: 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 :: [Type]) 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
-
devicemust support at least one queue family with one of theQUEUE_COMPUTE_BITorQUEUE_GRAPHICS_BITcapabilities
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 - The device must have
been created with at least
1queue
Return Codes
See Also
VK_VERSION_1_0,
AllocationCallbacks,
BufferView, BufferViewCreateInfo,
Device
withBufferView :: forall (a :: [Type]) 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
| :: 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
BufferUsageFlags2CreateInfo
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 at least one of theBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITorBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITusage flags set - 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
bufferwas created with theBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITusage flag set,offsetmust be a multiple of the effective alignment requirement offormatforDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERas defined by minTexelBufferOffsetAlignment - If
bufferwas created with theBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITusage flag set,offsetmust be a multiple of the effective alignment requirement offormatforDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFERas defined by minTexelBufferOffsetAlignment - If the
pNextchain includes aExportMetalObjectCreateInfoEXTstructure, itsexportObjectTypemember must beEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT - If the
pNextchain includes aBufferUsageFlags2CreateInfo, itsusagemust not contain any other bit thanBUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BITorBUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT - If the
pNextchain includes aBufferUsageFlags2CreateInfo, itsusagemust be a subset of theBufferCreateInfo::usagespecified orBufferUsageFlags2CreateInfo::usagefromBufferCreateInfo::pNextwhen creatingbuffer - If Vulkan 1.3 is not
supported and the
ycbcr2plane444Formats
feature is not enabled,
formatmust not beFORMAT_G8_B8R8_2PLANE_444_UNORM,FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16,FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16, orFORMAT_G16_B16R16_2PLANE_444_UNORM
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 ofBufferUsageFlags2CreateInfoorExportMetalObjectCreateInfoEXT - The
sTypevalue of each structure 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_DEFINE_NON_DISPATCHABLE_HANDLE,
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 |