Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type PFN_vkInternalAllocationNotification = FunPtr FN_vkInternalAllocationNotification
- type FN_vkInternalAllocationNotification = ("pUserData" ::: Ptr ()) -> CSize -> InternalAllocationType -> SystemAllocationScope -> IO ()
- type PFN_vkInternalFreeNotification = FunPtr FN_vkInternalFreeNotification
- type FN_vkInternalFreeNotification = ("pUserData" ::: Ptr ()) -> CSize -> InternalAllocationType -> SystemAllocationScope -> IO ()
- type PFN_vkReallocationFunction = FunPtr FN_vkReallocationFunction
- type FN_vkReallocationFunction = ("pUserData" ::: Ptr ()) -> ("pOriginal" ::: Ptr ()) -> CSize -> ("alignment" ::: CSize) -> SystemAllocationScope -> IO (Ptr ())
- type PFN_vkAllocationFunction = FunPtr FN_vkAllocationFunction
- type FN_vkAllocationFunction = ("pUserData" ::: Ptr ()) -> CSize -> ("alignment" ::: CSize) -> SystemAllocationScope -> IO (Ptr ())
- type PFN_vkFreeFunction = FunPtr FN_vkFreeFunction
- type FN_vkFreeFunction = ("pUserData" ::: Ptr ()) -> ("pMemory" ::: Ptr ()) -> IO ()
- type PFN_vkVoidFunction = FunPtr FN_vkVoidFunction
- type FN_vkVoidFunction = () -> IO ()
Documentation
type PFN_vkInternalAllocationNotification = FunPtr FN_vkInternalAllocationNotification Source #
PFN_vkInternalAllocationNotification - Application-defined memory allocation notification function
Description
This is a purely informational callback.
See Also
type FN_vkInternalAllocationNotification = ("pUserData" ::: Ptr ()) -> CSize -> InternalAllocationType -> SystemAllocationScope -> IO () Source #
type PFN_vkInternalFreeNotification = FunPtr FN_vkInternalFreeNotification Source #
PFN_vkInternalFreeNotification - Application-defined memory free notification function
Description
described link:https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#memory-host-allocation-scope[here^].
See Also
type FN_vkInternalFreeNotification = ("pUserData" ::: Ptr ()) -> CSize -> InternalAllocationType -> SystemAllocationScope -> IO () Source #
type PFN_vkReallocationFunction = FunPtr FN_vkReallocationFunction Source #
PFN_vkReallocationFunction - Application-defined memory reallocation function
Description
If the reallocation was successful, pfnReallocation
must return an
allocation with enough space for size
bytes, and the contents of the
original allocation from bytes zero to min(original size, new size) - 1
must be preserved in the returned allocation. If size
is larger than
the old size, the contents of the additional space are undefined. If
satisfying these requirements involves creating a new allocation, then
the old allocation should be freed.
If pOriginal
is NULL
, then pfnReallocation
must behave
equivalently to a call to PFN_vkAllocationFunction
with the same
parameter values (without pOriginal
).
If size
is zero, then pfnReallocation
must behave equivalently to
a call to PFN_vkFreeFunction
with the same pUserData
parameter
value, and pMemory
equal to pOriginal
.
If pOriginal
is non-NULL
, the implementation must ensure that
alignment
is equal to the alignment
used to originally allocate
pOriginal
.
If this function fails and pOriginal
is non-NULL
the application
must not free the old allocation.
pfnReallocation
must follow the same
rules for return values as.
See Also
type FN_vkReallocationFunction = ("pUserData" ::: Ptr ()) -> ("pOriginal" ::: Ptr ()) -> CSize -> ("alignment" ::: CSize) -> SystemAllocationScope -> IO (Ptr ()) Source #
type PFN_vkAllocationFunction = FunPtr FN_vkAllocationFunction Source #
PFN_vkAllocationFunction - Application-defined memory allocation function
Description
If pfnAllocation
is unable to allocate the requested memory, it must
return NULL
. If the allocation was successful, it must return a
valid pointer to memory allocation containing at least size
bytes, and
with the pointer value being a multiple of alignment
.
Note
Correct Vulkan operation cannot be assumed if the application does not follow these rules.
For example, pfnAllocation
(or pfnReallocation
) could cause
termination of running Vulkan instance(s) on a failed allocation for
debugging purposes, either directly or indirectly. In these
circumstances, it cannot be assumed that any part of any affected
Instance
objects are going to operate correctly
(even destroyInstance
), and the
application must ensure it cleans up properly via other means (e.g.
process termination).
If pfnAllocation
returns NULL
, and if the implementation is unable
to continue correct processing of the current command without the
requested allocation, it must treat this as a runtime error, and
generate ERROR_OUT_OF_HOST_MEMORY
at the
appropriate time for the command in which the condition was detected, as
described in
Return Codes.
If the implementation is able to continue correct processing of the
current command without the requested allocation, then it may do so,
and must not generate
ERROR_OUT_OF_HOST_MEMORY
as a result of
this failed allocation.
See Also
type FN_vkAllocationFunction = ("pUserData" ::: Ptr ()) -> CSize -> ("alignment" ::: CSize) -> SystemAllocationScope -> IO (Ptr ()) Source #
type PFN_vkFreeFunction = FunPtr FN_vkFreeFunction Source #
PFN_vkFreeFunction - Application-defined memory free function
Description
pMemory
may be NULL
, which the callback must handle safely. If
pMemory
is non-NULL
, it must be a pointer previously allocated by
pfnAllocation
or pfnReallocation
. The application should free this
memory.
See Also
type PFN_vkVoidFunction = FunPtr FN_vkVoidFunction Source #
PFN_vkVoidFunction - Placeholder function pointer type returned by queries
Parameters
This type is returned from command function pointer queries, and must be
Description
cast to an actual command function pointer before use.
See Also
type FN_vkVoidFunction = () -> IO () Source #