pFD);
}
-VkResult radv_AllocateMemory(
- VkDevice _device,
- const VkMemoryAllocateInfo* pAllocateInfo,
- const VkAllocationCallbacks* pAllocator,
- VkDeviceMemory* pMem)
+VkResult radv_alloc_memory(VkDevice _device,
+ const VkMemoryAllocateInfo* pAllocateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ enum radv_mem_flags_bits mem_flags,
+ VkDeviceMemory* pMem)
{
RADV_FROM_HANDLE(radv_device, device, _device);
struct radv_device_memory *mem;
return result;
}
+VkResult radv_AllocateMemory(
+ VkDevice _device,
+ const VkMemoryAllocateInfo* pAllocateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ VkDeviceMemory* pMem)
+{
+ return radv_alloc_memory(_device, pAllocateInfo, pAllocator, 0, pMem);
+}
+
void radv_FreeMemory(
VkDevice _device,
VkDeviceMemory _mem,
RADV_MEM_TYPE_COUNT
};
+enum radv_mem_flags_bits {
+ /* enable implicit synchronization when accessing the underlying bo */
+ RADV_MEM_IMPLICIT_SYNC = 1 << 0,
+};
+
#define radv_printflike(a, b) __attribute__((__format__(__printf__, a, b)))
static inline uint32_t
bool radv_get_memory_fd(struct radv_device *device,
struct radv_device_memory *memory,
int *pFD);
+VkResult radv_alloc_memory(VkDevice _device,
+ const VkMemoryAllocateInfo* pAllocateInfo,
+ const VkAllocationCallbacks* pAllocator,
+ enum radv_mem_flags_bits flags,
+ VkDeviceMemory* pMem);
+
/*
* Takes x,y,z as exact numbers of invocations, instead of blocks.
*