mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-01-19 10:53:50 +00:00
e2d981c029
* Bump API patch number and header version number to 20 for this update. Github Issues: * Replaced existing reference pages by text automatically extracted from the specification source, or generated from vk.xml in some cases. This isn't a complete solution for the reference pages, but puts them in a much better state. The ref pages (only) are now placed under a CC BY open source license, which is more current than the obsolete license previously used. Further improvements to the pages should not edit them directly, but instead concentrate on the specification source from which the ref pages are being extracted (public issues 44, 55, 160; internal issue 389).
72 lines
2.0 KiB
Plaintext
72 lines
2.0 KiB
Plaintext
// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
vkFreeMemory(3)
|
|
===============
|
|
|
|
Name
|
|
----
|
|
vkFreeMemory - Free GPU memory
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
// refBegin vkFreeMemory Free GPU memory
|
|
|
|
To free a memory object, call:
|
|
|
|
include::../protos/vkFreeMemory.txt[]
|
|
|
|
|
|
Parameters
|
|
----------
|
|
|
|
* pname:device is the logical device that owns the memory.
|
|
* pname:memory is the sname:VkDeviceMemory object to be freed.
|
|
* pname:pAllocator controls host memory allocation as described in
|
|
the <<memory-allocation, Memory Allocation>> chapter.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
Before freeing a memory object, an application must: ensure the
|
|
memory object is no longer in use by the device--for example by command
|
|
buffers queued for execution. The memory can: remain bound to images or
|
|
buffers at the time the memory object is freed, but any further use of them
|
|
(on host or device) for anything other than destroying those objects will
|
|
result in undefined behavior. If there are still any bound images or
|
|
buffers, the memory may: not be immediately released by the implementation,
|
|
but must: be released by the time all bound images and buffers have been
|
|
destroyed. Once memory is released, it is returned to the heap from which it
|
|
was allocated.
|
|
|
|
How memory objects are bound to Images and Buffers is described in detail in
|
|
the <<resources-association, Resource Memory Association>> section.
|
|
|
|
If a memory object is mapped at the time it is freed, it is implicitly
|
|
unmapped.
|
|
|
|
include::../validity/protos/vkFreeMemory.txt[]
|
|
|
|
|
|
See Also
|
|
--------
|
|
|
|
slink:VkAllocationCallbacks, slink:VkDevice, slink:VkDeviceMemory
|
|
|
|
|
|
Document Notes
|
|
--------------
|
|
|
|
For more information, see the Vulkan Specification at URL
|
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#vkFreeMemory
|
|
|
|
This page is extracted from the Vulkan Specification.
|
|
Fixes and changes should be made to the Specification,not directly.
|
|
|
|
include::footer.txt[]
|
|
|