panfrost: Document MALI_WRITES_GLOBAL bit
[mesa.git] / src / gallium / drivers / panfrost / pan_allocate.h
index fcb00bfcfd1724ea35035c834f052586b3644548..f18218fb32a11c2443cf9884fe07b78d4afc5b3c 100644 (file)
@@ -31,7 +31,9 @@
 
 #include <panfrost-misc.h>
 
-struct panfrost_context;
+#include "util/list.h"
+
+struct panfrost_batch;
 
 /* Represents a fat pointer for GPU-mapped memory, returned from the transient
  * allocator and not used for much else */
@@ -41,44 +43,11 @@ struct panfrost_transfer {
         mali_ptr gpu;
 };
 
-struct panfrost_bo {
-        struct pipe_reference reference;
-
-        /* Mapping for the entire object (all levels) */
-        uint8_t *cpu;
-
-        /* GPU address for the object */
-        mali_ptr gpu;
-
-        /* Size of all entire trees */
-        size_t size;
-
-        int gem_handle;
-};
-
-struct panfrost_memory {
-        /* Backing for the slab in memory */
-        struct panfrost_bo *bo;
-        int stack_bottom;
-};
-
-/* Functions for replay */
-mali_ptr pandev_upload(int cheating_offset, int *stack_bottom, mali_ptr base, void *base_map, const void *data, size_t sz, bool no_pad);
-
-/* Functions for the actual Galliumish driver */
-mali_ptr panfrost_upload(struct panfrost_memory *mem, const void *data, size_t sz, bool no_pad);
-
 struct panfrost_transfer
-panfrost_allocate_transient(struct panfrost_context *ctx, size_t sz);
+panfrost_allocate_transient(struct panfrost_batch *batch, size_t sz);
 
 mali_ptr
-panfrost_upload_transient(struct panfrost_context *ctx, const void *data, size_t sz);
-
-static inline mali_ptr
-panfrost_reserve(struct panfrost_memory *mem, size_t sz)
-{
-        mem->stack_bottom += sz;
-        return mem->bo->gpu + (mem->stack_bottom - sz);
-}
+panfrost_upload_transient(struct panfrost_batch *batch, const void *data,
+                          size_t sz);
 
 #endif /* __PAN_ALLOCATE_H__ */