mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
panvk: s/panvk_event_op/panvk_cmd_event_op/
Make sure the object name reflects the fact this object is related to vkCmdEvent not vkEvent. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28104>
This commit is contained in:
parent
b59d2a5137
commit
1f69f99b2c
3 changed files with 16 additions and 16 deletions
|
|
@ -323,14 +323,14 @@ struct panvk_batch {
|
|||
bool issued;
|
||||
};
|
||||
|
||||
enum panvk_event_op_type {
|
||||
enum panvk_cmd_event_op_type {
|
||||
PANVK_EVENT_OP_SET,
|
||||
PANVK_EVENT_OP_RESET,
|
||||
PANVK_EVENT_OP_WAIT,
|
||||
};
|
||||
|
||||
struct panvk_event_op {
|
||||
enum panvk_event_op_type type;
|
||||
struct panvk_cmd_event_op {
|
||||
enum panvk_cmd_event_op_type type;
|
||||
struct panvk_event *event;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ panvk_per_arch(cmd_close_batch)(struct panvk_cmd_buffer *cmdbuf)
|
|||
|
||||
if (!clear && !batch->jc.first_job) {
|
||||
if (util_dynarray_num_elements(&batch->event_ops,
|
||||
struct panvk_event_op) == 0) {
|
||||
struct panvk_cmd_event_op) == 0) {
|
||||
/* Content-less batch, let's drop it */
|
||||
vk_free(&cmdbuf->vk.pool->alloc, batch);
|
||||
} else {
|
||||
|
|
@ -950,9 +950,9 @@ panvk_per_arch(CmdPipelineBarrier2)(VkCommandBuffer commandBuffer,
|
|||
static void
|
||||
panvk_add_set_event_operation(struct panvk_cmd_buffer *cmdbuf,
|
||||
struct panvk_event *event,
|
||||
enum panvk_event_op_type type)
|
||||
enum panvk_cmd_event_op_type type)
|
||||
{
|
||||
struct panvk_event_op op = {
|
||||
struct panvk_cmd_event_op op = {
|
||||
.type = type,
|
||||
.event = event,
|
||||
};
|
||||
|
|
@ -963,14 +963,14 @@ panvk_add_set_event_operation(struct panvk_cmd_buffer *cmdbuf,
|
|||
*/
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
util_dynarray_append(&cmdbuf->state.batch->event_ops,
|
||||
struct panvk_event_op, op);
|
||||
struct panvk_cmd_event_op, op);
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
} else {
|
||||
/* Let's close the current batch so the operation executes before any
|
||||
* future commands.
|
||||
*/
|
||||
util_dynarray_append(&cmdbuf->state.batch->event_ops,
|
||||
struct panvk_event_op, op);
|
||||
struct panvk_cmd_event_op, op);
|
||||
panvk_per_arch(cmd_close_batch)(cmdbuf);
|
||||
panvk_cmd_preload_fb_after_batch_split(cmdbuf);
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
|
|
@ -981,7 +981,7 @@ static void
|
|||
panvk_add_wait_event_operation(struct panvk_cmd_buffer *cmdbuf,
|
||||
struct panvk_event *event)
|
||||
{
|
||||
struct panvk_event_op op = {
|
||||
struct panvk_cmd_event_op op = {
|
||||
.type = PANVK_EVENT_OP_WAIT,
|
||||
.event = event,
|
||||
};
|
||||
|
|
@ -990,7 +990,7 @@ panvk_add_wait_event_operation(struct panvk_cmd_buffer *cmdbuf,
|
|||
/* No open batch, let's create a new one and have it wait for this event. */
|
||||
panvk_cmd_open_batch(cmdbuf);
|
||||
util_dynarray_append(&cmdbuf->state.batch->event_ops,
|
||||
struct panvk_event_op, op);
|
||||
struct panvk_cmd_event_op, op);
|
||||
} else {
|
||||
/* Let's close the current batch so any future commands wait on the
|
||||
* event signal operation.
|
||||
|
|
@ -1002,7 +1002,7 @@ panvk_add_wait_event_operation(struct panvk_cmd_buffer *cmdbuf,
|
|||
panvk_cmd_open_batch(cmdbuf);
|
||||
}
|
||||
util_dynarray_append(&cmdbuf->state.batch->event_ops,
|
||||
struct panvk_event_op, op);
|
||||
struct panvk_cmd_event_op, op);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ static void
|
|||
panvk_add_wait_event_syncobjs(struct panvk_batch *batch, uint32_t *in_fences,
|
||||
unsigned *nr_in_fences)
|
||||
{
|
||||
util_dynarray_foreach(&batch->event_ops, struct panvk_event_op, op) {
|
||||
util_dynarray_foreach(&batch->event_ops, struct panvk_cmd_event_op, op) {
|
||||
switch (op->type) {
|
||||
case PANVK_EVENT_OP_SET:
|
||||
/* Nothing to do yet */
|
||||
|
|
@ -162,7 +162,7 @@ panvk_add_wait_event_syncobjs(struct panvk_batch *batch, uint32_t *in_fences,
|
|||
in_fences[(*nr_in_fences)++] = op->event->syncobj;
|
||||
break;
|
||||
default:
|
||||
unreachable("bad panvk_event_op type\n");
|
||||
unreachable("bad panvk_cmd_event_op type\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -173,7 +173,7 @@ panvk_signal_event_syncobjs(struct panvk_queue *queue,
|
|||
{
|
||||
struct panvk_device *dev = queue->device;
|
||||
|
||||
util_dynarray_foreach(&batch->event_ops, struct panvk_event_op, op) {
|
||||
util_dynarray_foreach(&batch->event_ops, struct panvk_cmd_event_op, op) {
|
||||
switch (op->type) {
|
||||
case PANVK_EVENT_OP_SET: {
|
||||
panvk_queue_transfer_sync(queue, op->event->syncobj);
|
||||
|
|
@ -194,7 +194,7 @@ panvk_signal_event_syncobjs(struct panvk_queue *queue,
|
|||
/* Nothing left to do */
|
||||
break;
|
||||
default:
|
||||
unreachable("bad panvk_event_op type\n");
|
||||
unreachable("bad panvk_cmd_event_op type\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -278,7 +278,7 @@ panvk_per_arch(queue_submit)(struct vk_queue *vk_queue,
|
|||
|
||||
unsigned nr_in_fences = 0;
|
||||
unsigned max_wait_event_syncobjs = util_dynarray_num_elements(
|
||||
&batch->event_ops, struct panvk_event_op);
|
||||
&batch->event_ops, struct panvk_cmd_event_op);
|
||||
uint32_t in_fences[nr_semaphores + max_wait_event_syncobjs];
|
||||
memcpy(in_fences, semaphores, nr_semaphores * sizeof(*in_fences));
|
||||
nr_in_fences += nr_semaphores;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue