summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_binder.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-06-06 11:59:17 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:06 -0800
commit9ea05ccf1f20691cde6911762bce8207c7283714 (patch)
tree750f9b06da700a9d7b26e4fdaa1b7f59fb75c634 /src/gallium/drivers/iris/iris_binder.h
parent26cc609927825aa72a1faa77701ac2359484084a (diff)
iris: completely rewrite binder
now we get a new one per batch, and flush if it fills up
Diffstat (limited to 'src/gallium/drivers/iris/iris_binder.h')
-rw-r--r--src/gallium/drivers/iris/iris_binder.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_binder.h b/src/gallium/drivers/iris/iris_binder.h
index 5830288b5c5..ea455dd5cfd 100644
--- a/src/gallium/drivers/iris/iris_binder.h
+++ b/src/gallium/drivers/iris/iris_binder.h
@@ -26,22 +26,32 @@
#include <stdint.h>
#include <stdbool.h>
+#include "compiler/shader_enums.h"
struct iris_bo;
+struct iris_batch;
struct iris_bufmgr;
+struct iris_compiled_shader;
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_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_batch *batch, unsigned size);
+void iris_binder_reserve_3d(struct iris_batch *batch,
+ struct iris_compiled_shader **shaders);
#endif