Lines Matching refs:binder
40 * binder BOs. IRIS_MEMZONE_SURFACE contains the rest of the 4GB, and is
42 * Surface State Base Address to the binder BO's address, and offset the
47 * we run out of space in the binder, which hopefully won't happen too often.
57 binder_has_space(struct iris_binder *binder, unsigned size)
59 return binder->insert_point + size <= binder->size;
67 struct iris_binder *binder = &ice->state.binder;
69 if (binder->bo)
70 iris_bo_unreference(binder->bo);
72 binder->bo = iris_bo_alloc(bufmgr, "binder", binder->size, binder->alignment,
74 binder->map = iris_bo_map(NULL, binder->bo, MAP_WRITE);
77 binder->insert_point = binder->alignment;
79 /* Allocating a new binder requires changing Surface State Base Address,
96 binder_insert(struct iris_binder *binder, unsigned size)
98 uint32_t offset = binder->insert_point;
100 binder->insert_point =
101 align(binder->insert_point + size, binder->alignment);
107 * Reserve a block of space in the binder, given the raw size in bytes.
113 struct iris_binder *binder = &ice->state.binder;
115 if (!binder_has_space(binder, size))
119 return binder_insert(binder, size);
123 * Reserve and record binder space for 3D pipeline shader stages.
132 struct iris_binder *binder = &ice->state.binder;
147 sizes[stage] = align(shaders[stage]->bt.size_bytes, binder->alignment);
158 assert(total_size < binder->size);
163 if (binder_has_space(binder, total_size))
174 uint32_t offset = binder_insert(binder, total_size);
178 binder->bt_offset[stage] = sizes[stage] > 0 ? offset : 0;
180 binder->bo->address + offset, sizes[stage]);
192 struct iris_binder *binder = &ice->state.binder;
201 binder->bt_offset[MESA_SHADER_COMPUTE] = iris_binder_reserve(ice, size);
210 memset(&ice->state.binder, 0, sizeof(struct iris_binder));
222 ice->state.binder.alignment = 32;
223 ice->state.binder.size = 1024 * 1024;
225 ice->state.binder.alignment = 256;
226 ice->state.binder.size = 512 * 1024;
228 ice->state.binder.alignment = 32;
229 ice->state.binder.size = 64 * 1024;
236 iris_destroy_binder(struct iris_binder *binder)
238 iris_bo_unreference(binder->bo);