diff options
author | Andres Rodriguez <[email protected]> | 2017-10-20 18:42:12 -0400 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-10-21 01:15:49 +0200 |
commit | eff2bdbd8272ceec723dcc1643dd3d5f77020d1f (patch) | |
tree | 8f3511478c858ac922ccb37a2f21ab5f5cf90f5b /src/amd/vulkan/radv_private.h | |
parent | 92724338ba2db433f99f4017a18d2ee4f6601d6c (diff) |
radv: factor out radv_alloc_memory
This allows us to pass extra parameters to the memory allocation
operation that are not defined in the vulkan spec. This is useful for
internal usage.
Signed-off-by: Andres Rodriguez <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 47a068b5597..a4e52b25306 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -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. * |