panfrost: Pre-allocate memory for pool
[mesa.git] / src / panfrost / lib / pan_pool.h
index 14593eabd4380f08c6277fd75a8fdededb0c310b..22fddb8870c6c2914dc24a1d91b232cc23a579d0 100644 (file)
@@ -26,7 +26,7 @@
 #define __PAN_POOL_H__
 
 #include <stddef.h>
-#include <panfrost-job.h>
+#include <midgard_pack.h>
 
 /* Represents a pool of memory that can only grow, used to allocate objects
  * with the same lifetime as the pool itself. In OpenGL, a pool is owned by the
@@ -45,10 +45,13 @@ struct pan_pool {
 
         /* Within the topmost transient BO, how much has been used? */
         unsigned transient_offset;
+
+        /* BO flags to use in the pool */
+        unsigned create_flags;
 };
 
 struct pan_pool
-panfrost_create_pool(void *memctx, struct panfrost_device *dev);
+panfrost_create_pool(void *memctx, struct panfrost_device *dev, unsigned create_flags, bool prealloc);
 
 /* Represents a fat pointer for GPU-mapped memory, returned from the transient
  * allocator and not used for much else */