diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2016-01-16 00:14:37 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-01-21 18:03:23 +1000 |
commit | a603f027aae0c5cf9a2ed3d055e838e30c6e4191 (patch) | |
tree | 717b290aa095f9d1693ea6ee55512547bb4ad4f8 /vtest | |
parent | 47559de28df33a7074192cd22d2647878a662f59 (diff) |
vtest: only create fence before it's needed
Just as bad as waiting only for the last fence, after all.
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'vtest')
-rw-r--r-- | vtest/vtest_server.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/vtest/vtest_server.c b/vtest/vtest_server.c index 9a41188..93d0594 100644 --- a/vtest/vtest_server.c +++ b/vtest/vtest_server.c @@ -89,7 +89,6 @@ int run_renderer(int new_fd) { int ret; uint32_t header[VTEST_HDR_SIZE]; - bool do_fence; bool inited = false; again: ret = vtest_wait_for_fd_read(new_fd); @@ -106,7 +105,6 @@ again: inited = true; } vtest_poll(); - do_fence = false; switch (header[1]) { case VCMD_GET_CAPS: ret = vtest_send_caps(); @@ -119,16 +117,15 @@ again: break; case VCMD_SUBMIT_CMD: ret = vtest_submit_cmd(header[0]); - do_fence = true; break; case VCMD_TRANSFER_GET: ret = vtest_transfer_get(header[0]); break; case VCMD_TRANSFER_PUT: ret = vtest_transfer_put(header[0]); - do_fence = true; break; case VCMD_RESOURCE_BUSY_WAIT: + vtest_renderer_create_fence(); ret = vtest_resource_busy_wait(); break; default: @@ -139,8 +136,6 @@ again: goto fail; } - if (do_fence) - vtest_renderer_create_fence(); goto again; } if (ret <= 0) { |