mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxvk] Add function to import existing Vulkan image
This commit is contained in:
parent
eec4f0fb35
commit
d7e1794e29
@ -969,6 +969,17 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkResourceAllocation> DxvkMemoryAllocator::importImageResource(
|
||||
const VkImageCreateInfo& createInfo,
|
||||
VkImage imageHandle) {
|
||||
Rc<DxvkResourceAllocation> allocation = m_allocationPool.create(this, nullptr);
|
||||
allocation->m_flags.set(DxvkAllocationFlag::Imported);
|
||||
allocation->m_image = imageHandle;
|
||||
|
||||
return allocation;
|
||||
}
|
||||
|
||||
|
||||
DxvkDeviceMemory DxvkMemoryAllocator::allocateDeviceMemory(
|
||||
DxvkMemoryType& type,
|
||||
VkDeviceSize size,
|
||||
|
@ -1167,6 +1167,17 @@ namespace dxvk {
|
||||
const VkBufferCreateInfo& createInfo,
|
||||
const DxvkBufferImportInfo& importInfo);
|
||||
|
||||
/**
|
||||
* \brief Imports existing image resource
|
||||
*
|
||||
* \param [in] createInfo Image create info
|
||||
* \param [in] imageHandle Image handle
|
||||
* \returns Image resource
|
||||
*/
|
||||
Rc<DxvkResourceAllocation> importImageResource(
|
||||
const VkImageCreateInfo& createInfo,
|
||||
VkImage imageHandle);
|
||||
|
||||
/**
|
||||
* \brief Queries memory stats
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user