vtest: fence is not needed for resource creation

There is never a need to wait for the GPU works (if any) involved in
resource creation.  A client commonly does

  VCMD_SUBMIT_CMD
  VCMD_RESOURCE_CREATE2(dummy)
  ...
  VCMD_RESOURCE_BUSY_WAIT(dummy)

only because VCMD_RESOURCE_BUSY_WAIT needs a resource.  We don't need a
fence for resource creation.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Chia-I Wu 4 years ago
parent 0e6029757b
commit 42aae37faa
  1. 12
      vtest/vtest_renderer.c

@ -94,13 +94,8 @@ struct vtest_renderer {
};
/*
* A fence is created after
*
* - VCMD_RESOURCE_CREATE
* - VCMD_RESOURCE_CREATE2
* - VCMD_SUBMIT_CMD
*
* for VCMD_RESOURCE_BUSY_WAIT to wait on.
* VCMD_RESOURCE_BUSY_WAIT is used to wait GPU works (VCMD_SUBMIT_CMD) or CPU
* works (VCMD_TRANSFER_GET2). A fence is needed only for GPU works.
*/
static void vtest_renderer_create_fence(struct vtest_renderer *renderer)
{
@ -900,9 +895,6 @@ static int vtest_create_resource_internal(struct vtest_context *ctx,
util_hash_table_set(ctx->resource_table, intptr_to_pointer(res->res_id), res);
if (cmd_id == VCMD_RESOURCE_CREATE || cmd_id == VCMD_RESOURCE_CREATE2)
vtest_renderer_create_fence(&renderer);
return 0;
}

Loading…
Cancel
Save