radv: factor out radv_alloc_memory
[mesa.git] / src / amd / vulkan / radv_private.h
index 47a068b5597cb48be57019135c4cb7492330f5ff..a4e52b253066997aff3f8ae910d84f42cf372609 100644 (file)
@@ -106,6 +106,11 @@ enum radv_mem_type {
        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
@@ -946,6 +951,12 @@ void radv_cmd_buffer_trace_emit(struct radv_cmd_buffer *cmd_buffer);
 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.
  *