mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 06:10:36 +01:00
anv: Nuke anv_execbuf_init()
We can do designated initialization to initialize needed values and set the rest to zero. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18110>
This commit is contained in:
parent
87b19c68d8
commit
dbbf2ff12e
1 changed files with 13 additions and 19 deletions
|
|
@ -1217,12 +1217,6 @@ struct anv_execbuf {
|
|||
int perf_query_pass;
|
||||
};
|
||||
|
||||
static void
|
||||
anv_execbuf_init(struct anv_execbuf *exec)
|
||||
{
|
||||
memset(exec, 0, sizeof(*exec));
|
||||
}
|
||||
|
||||
static void
|
||||
anv_execbuf_finish(struct anv_execbuf *exec)
|
||||
{
|
||||
|
|
@ -2024,10 +2018,10 @@ anv_queue_exec_utrace_locked(struct anv_queue *queue,
|
|||
assert(flush->batch_bo);
|
||||
|
||||
struct anv_device *device = queue->device;
|
||||
struct anv_execbuf execbuf;
|
||||
anv_execbuf_init(&execbuf);
|
||||
execbuf.alloc = &device->vk.alloc;
|
||||
execbuf.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE;
|
||||
struct anv_execbuf execbuf = {
|
||||
.alloc = &device->vk.alloc,
|
||||
.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE,
|
||||
};
|
||||
|
||||
VkResult result = setup_utrace_execbuf(&execbuf, queue, flush);
|
||||
if (result != VK_SUCCESS)
|
||||
|
|
@ -2088,11 +2082,11 @@ anv_queue_exec_locked(struct anv_queue *queue,
|
|||
{
|
||||
struct anv_device *device = queue->device;
|
||||
struct anv_utrace_flush_copy *utrace_flush_data = NULL;
|
||||
struct anv_execbuf execbuf;
|
||||
anv_execbuf_init(&execbuf);
|
||||
execbuf.alloc = &queue->device->vk.alloc;
|
||||
execbuf.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE;
|
||||
execbuf.perf_query_pass = perf_query_pass;
|
||||
struct anv_execbuf execbuf = {
|
||||
.alloc = &queue->device->vk.alloc,
|
||||
.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE,
|
||||
.perf_query_pass = perf_query_pass,
|
||||
};
|
||||
|
||||
/* Flush the trace points first, they need to be moved */
|
||||
VkResult result =
|
||||
|
|
@ -2437,10 +2431,10 @@ anv_queue_submit_simple_batch(struct anv_queue *queue,
|
|||
if (device->physical->memory.need_clflush)
|
||||
intel_flush_range(batch_bo->map, batch_size);
|
||||
|
||||
struct anv_execbuf execbuf;
|
||||
anv_execbuf_init(&execbuf);
|
||||
execbuf.alloc = &queue->device->vk.alloc;
|
||||
execbuf.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE;
|
||||
struct anv_execbuf execbuf = {
|
||||
.alloc = &queue->device->vk.alloc,
|
||||
.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE,
|
||||
};
|
||||
|
||||
result = anv_execbuf_add_bo(device, &execbuf, batch_bo, NULL, 0);
|
||||
if (result != VK_SUCCESS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue