vtest: fix fencing

Let's be a little less conservative then QEMU -- fence only
on draw calls and possible fence creations.

Can we do even better, and fence only when Gallium requests
VIRGL_BIND_CUSTOM?  Someone should look into this, but let's
get this landed to unblock the CQ.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gurchetan Singh 6 years ago committed by Jakob Bornecrantz
parent e47fad32af
commit 62d2d9869e
  1. 1
      vtest/vtest_renderer.c
  2. 6
      vtest/vtest_server.c

@ -736,7 +736,6 @@ int vtest_resource_busy_wait(UNUSED uint32_t length_dw)
uint32_t reply_buf[1];
bool busy = false;
vtest_renderer_create_fence();
ret = vtest_block_read(renderer.in_fd, &bw_buf, sizeof(bw_buf));
if (ret != sizeof(bw_buf)) {
return -1;

@ -302,6 +302,12 @@ static void vtest_main_run_renderer(int in_fd, int out_fd)
err = 7;
break;
}
/* GL draws are fenced, while possible fence creations are too */
if (header[1] == VCMD_SUBMIT_CMD || header[1] == VCMD_RESOURCE_CREATE ||
header[1] == VCMD_RESOURCE_CREATE2)
vtest_renderer_create_fence();
} while (1);
fprintf(stderr, "socket failed (%d) - closing renderer\n", err);

Loading…
Cancel
Save