mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 06:20:19 +01:00
iris: Export num_fences()
This function will be needed by i915 and Xe backends. Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21389>
This commit is contained in:
parent
780dd291c5
commit
ec7584130f
2 changed files with 6 additions and 5 deletions
|
|
@ -69,8 +69,8 @@
|
|||
static void
|
||||
iris_batch_reset(struct iris_batch *batch);
|
||||
|
||||
static unsigned
|
||||
num_fences(struct iris_batch *batch)
|
||||
unsigned
|
||||
iris_batch_num_fences(struct iris_batch *batch)
|
||||
{
|
||||
return util_dynarray_num_elements(&batch->exec_fences,
|
||||
struct drm_i915_gem_exec_fence);
|
||||
|
|
@ -82,7 +82,7 @@ num_fences(struct iris_batch *batch)
|
|||
void
|
||||
iris_dump_fence_list(struct iris_batch *batch)
|
||||
{
|
||||
fprintf(stderr, "Fence list (length %u): ", num_fences(batch));
|
||||
fprintf(stderr, "Fence list (length %u): ", iris_batch_num_fences(batch));
|
||||
|
||||
util_dynarray_foreach(&batch->exec_fences,
|
||||
struct drm_i915_gem_exec_fence, f) {
|
||||
|
|
@ -974,9 +974,9 @@ submit_batch(struct iris_batch *batch)
|
|||
.rsvd1 = batch->ctx_id, /* rsvd1 is actually the context ID */
|
||||
};
|
||||
|
||||
if (num_fences(batch)) {
|
||||
if (iris_batch_num_fences(batch)) {
|
||||
execbuf.flags |= I915_EXEC_FENCE_ARRAY;
|
||||
execbuf.num_cliprects = num_fences(batch);
|
||||
execbuf.num_cliprects = iris_batch_num_fences(batch);
|
||||
execbuf.cliprects_ptr =
|
||||
(uintptr_t)util_dynarray_begin(&batch->exec_fences);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,6 +430,7 @@ iris_batch_name_to_string(enum iris_batch_name name);
|
|||
++batch)
|
||||
|
||||
void iris_batch_update_syncobjs(struct iris_batch *batch);
|
||||
unsigned iris_batch_num_fences(struct iris_batch *batch);
|
||||
|
||||
void iris_dump_fence_list(struct iris_batch *batch);
|
||||
void iris_dump_bo_list(struct iris_batch *batch);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue