Lines Matching refs:batch
49 /* Our target batch size - flush approximately at this point. */
89 /** What batch is this? (e.g. CROCUS_BATCH_RENDER/COMPUTE) */
95 /** Size of the primary batch if we've moved on to a secondary. */
114 /** Whether INTEL_BLACKHOLE_RENDER is enabled in the batch (aka first
120 * A list of crocus_syncobjs associated with this batch.
123 * that this batch has completed. The others are likely to be sync-points
124 * to wait on before executing the batch.
146 /** A seqno (and syncobj) for the last batch that was submitted. */
171 /** Have we emitted any draw calls to this batch? */
179 batch_has_fine_fence(struct crocus_batch *batch)
181 return !!batch->fine_fences.uploader;
184 #define BATCH_HAS_FINE_FENCES(batch) (!!(batch)->fine_fences.uploader)
188 void crocus_batch_free(struct crocus_batch *batch);
189 void crocus_batch_maybe_flush(struct crocus_batch *batch, unsigned estimate);
191 void _crocus_batch_flush(struct crocus_batch *batch, const char *file, int line);
192 #define crocus_batch_flush(batch) _crocus_batch_flush((batch), __FILE__, __LINE__)
194 bool crocus_batch_references(struct crocus_batch *batch, struct crocus_bo *bo);
196 bool crocus_batch_prepare_noop(struct crocus_batch *batch, bool noop_enable);
203 void crocus_use_pinned_bo(struct crocus_batch *batch, struct crocus_bo *bo,
205 uint64_t crocus_command_reloc(struct crocus_batch *batch, uint32_t batch_offset,
208 uint64_t crocus_state_reloc(struct crocus_batch *batch, uint32_t batch_offset,
212 enum pipe_reset_status crocus_batch_check_for_reset(struct crocus_batch *batch);
214 void crocus_grow_buffer(struct crocus_batch *batch, bool grow_state,
218 crocus_batch_bytes_used(struct crocus_batch *batch)
220 return batch->command.map_next - batch->command.map;
225 * remaining. If not, this creates a secondary batch buffer and emits
226 * a jump from the primary batch to the start of the secondary.
231 crocus_require_command_space(struct crocus_batch *batch, unsigned size)
233 const unsigned required_bytes = crocus_batch_bytes_used(batch) + size;
234 unsigned used = crocus_batch_bytes_used(batch);
235 if (required_bytes >= BATCH_SZ && !batch->no_wrap) {
236 crocus_batch_flush(batch);
237 } else if (used + size >= batch->command.bo->size) {
239 MIN2(batch->command.bo->size + batch->command.bo->size / 2,
242 crocus_grow_buffer(batch, false, used, new_size);
243 batch->command.map_next = (void *)batch->command.map + used;
244 assert(crocus_batch_bytes_used(batch) + size < batch->command.bo->size);
255 crocus_get_command_space(struct crocus_batch *batch, unsigned bytes)
257 crocus_require_command_space(batch, bytes);
258 void *map = batch->command.map_next;
259 batch->command.map_next += bytes;
267 crocus_batch_emit(struct crocus_batch *batch, const void *data, unsigned size)
269 void *map = crocus_get_command_space(batch, size);
274 * Get a pointer to the batch's signalling syncobj. Does not refcount.
277 crocus_batch_get_signal_syncobj(struct crocus_batch *batch)
281 ((struct crocus_syncobj **)util_dynarray_begin(&batch->syncobjs))[0];
286 * Take a reference to the batch's signalling syncobj.
288 * Callers can use this to wait for the the current batch under construction
292 crocus_batch_reference_signal_syncobj(struct crocus_batch *batch,
295 struct crocus_syncobj *syncobj = crocus_batch_get_signal_syncobj(batch);
296 crocus_syncobj_reference(batch->screen, out_syncobj, syncobj);
313 crocus_ptr_in_state_buffer(struct crocus_batch *batch, void *p)
315 return (char *)p >= (char *)batch->state.map &&
316 (char *)p < (char *)batch->state.map + batch->state.bo->size;
320 crocus_require_statebuffer_space(struct crocus_batch *batch, int size)
322 if (batch->state.used + size >= STATE_SZ)
323 crocus_batch_flush(batch);