Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
:: 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)
-
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
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.
:: forall io. MonadIO io | |
=> Device |
|
-> BufferView |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io () |
vkDestroyBufferView - Destroy a buffer view object
Valid Usage
- 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 (es :: [Type]) Source #
VkBufferViewCreateInfo - Structure specifying parameters of a newly created buffer view
Valid Usage
- 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
, 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
range
is not equal toWHOLE_SIZE
, the sum ofoffset
andrange
must be less than or equal to the size ofbuffer
- If
range
is 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
-
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 ofPhysicalDeviceTexelBufferAlignmentProperties
::storageTexelBufferOffsetAlignmentBytes
or, ifPhysicalDeviceTexelBufferAlignmentProperties
::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 ofPhysicalDeviceTexelBufferAlignmentProperties
::uniformTexelBufferOffsetAlignmentBytes
or, ifPhysicalDeviceTexelBufferAlignmentProperties
::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 - If the
pNext
chain includes aExportMetalObjectCreateInfoEXT
structure, itsexportObjectType
member must beEXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
-
pNext
must beNULL
or a pointer to a valid instance ofExportMetalObjectCreateInfoEXT
- The
sType
value of each struct in thepNext
chain must be unique, with the exception of structures of typeExportMetalObjectCreateInfoEXT
-
flags
must be0
-
buffer
must be a validBuffer
handle -
format
must be a validFormat
value
See Also
VK_VERSION_1_0,
Buffer
,
BufferViewCreateFlags
,
DeviceSize
,
Format
,
StructureType
, createBufferView
BufferViewCreateInfo | |
|
Instances
newtype BufferView Source #
VkBufferView - Opaque handle to a buffer view object
See Also
VK_VERSION_1_0,
ExportMetalTextureInfoEXT
,
WriteDescriptorSet
,
createBufferView
,
destroyBufferView
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.