iris: Drop vtbl usage for some load_register calls
[mesa.git] / src / gallium / drivers / iris / iris_binder.h
index 7a26602bf48ead39e98c6f480247e5667dec517f..78449286c6d90596ac90bd0826fa128eef304eb2 100644 (file)
 
 #include <stdint.h>
 #include <stdbool.h>
+#include "compiler/shader_enums.h"
 
 struct iris_bo;
+struct iris_batch;
 struct iris_bufmgr;
-
-#define IRIS_BINDER_ADDRESS (1ull << 32)
+struct iris_compiled_shader;
+struct iris_context;
 
 struct iris_binder
 {
    struct iris_bo *bo;
    void *map;
 
-   /* Insert new entries at this offset (in bytes) */
-   unsigned insert_point;
+   /** Insert new entries at this offset (in bytes) */
+   uint32_t insert_point;
+
+   /**
+    * Last assigned offset for each shader stage's binding table.
+    * Zero is considered invalid and means there's no binding table.
+    */
+   uint32_t bt_offset[MESA_SHADER_STAGES];
 };
 
-void iris_init_binder(struct iris_binder *binder, struct iris_bufmgr *bufmgr);
+void iris_init_binder(struct iris_context *ice);
 void iris_destroy_binder(struct iris_binder *binder);
-void *iris_binder_reserve(struct iris_binder *binder, unsigned size,
-                          uint32_t *out_offset);
+uint32_t iris_binder_reserve(struct iris_context *ice, unsigned size);
+void iris_binder_reserve_3d(struct iris_context *ice);
+void iris_binder_reserve_compute(struct iris_context *ice);
 
 #endif