intel: move alloc functions to util
To support global extensions, needed to add pointer
to the intel_instance structure in the intel_handle.
That broke things that were using the icd pointer in the
handle and to avoid catch-22 between the intel.h and instance.h
needed to separate the alloc routines to their own file
rather than static inline in intel.h.
diff --git a/icd/intel/intel.h b/icd/intel/intel.h
index 203e7cc..a70e1dc 100644
--- a/icd/intel/intel.h
+++ b/icd/intel/intel.h
@@ -122,20 +122,11 @@
return (handle_type == (uint32_t) type);
}
-static inline void *intel_alloc(const void *handle,
- size_t size, size_t alignment,
- VkSystemAllocType type)
-{
- assert(intel_handle_validate(handle));
- return icd_instance_alloc(((const struct intel_handle *) handle)->icd,
- size, alignment, type);
-}
+void *intel_alloc(const void *handle,
+ size_t size, size_t alignment,
+ VkSystemAllocType type);
-static inline void intel_free(const void *handle, void *ptr)
-{
- assert(intel_handle_validate(handle));
- icd_instance_free(((const struct intel_handle *) handle)->icd, ptr);
-}
+void intel_free(const void *handle, void *ptr);
static inline void intel_logv(const void *handle,
VkFlags msg_flags,