diff options
author | Ryan Neph <ryanneph@google.com> | 2022-12-13 15:26:51 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-12-16 01:59:39 +0000 |
commit | 6d40493918b1946d1c61abbb66073430ec2f8248 (patch) | |
tree | f89e4c7ab2ac92438c09b59666f307e8bf6e5d51 | |
parent | 5de7773226c9b969a5ff853bf0713a994eb2cffa (diff) | |
download | virglrenderer-6d40493918b1946d1c61abbb66073430ec2f8248.tar.gz |
vtest: support multiple_timelines
Signed-off-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/982>
-rw-r--r-- | vtest/vtest_protocol.h | 3 | ||||
-rw-r--r-- | vtest/vtest_renderer.c | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/vtest/vtest_protocol.h b/vtest/vtest_protocol.h index f31b8e47..1bd846e2 100644 --- a/vtest/vtest_protocol.h +++ b/vtest/vtest_protocol.h @@ -232,7 +232,6 @@ struct vcmd_submit_cmd2_batch { /* ignored unless VCMD_SUBMIT_CMD2_FLAG_SYNC_QUEUE is set */ uint32_t sync_queue_index; - uint64_t sync_queue_id; }; #define VCMD_SUBMIT_CMD2_BATCH_COUNT 0 #define VCMD_SUBMIT_CMD2_BATCH_FLAGS(n) (1 + 8 * (n) + 0) @@ -241,8 +240,6 @@ struct vcmd_submit_cmd2_batch { #define VCMD_SUBMIT_CMD2_BATCH_SYNC_OFFSET(n) (1 + 8 * (n) + 3) #define VCMD_SUBMIT_CMD2_BATCH_SYNC_COUNT(n) (1 + 8 * (n) + 4) #define VCMD_SUBMIT_CMD2_BATCH_SYNC_QUEUE_INDEX(n) (1 + 8 * (n) + 5) -#define VCMD_SUBMIT_CMD2_BATCH_SYNC_QUEUE_ID_LO(n) (1 + 8 * (n) + 6) -#define VCMD_SUBMIT_CMD2_BATCH_SYNC_QUEUE_ID_HI(n) (1 + 8 * (n) + 7) #endif /* VIRGL_RENDERER_UNSTABLE_APIS */ diff --git a/vtest/vtest_renderer.c b/vtest/vtest_renderer.c index 1e8b81ef..f298b780 100644 --- a/vtest/vtest_renderer.c +++ b/vtest/vtest_renderer.c @@ -2064,7 +2064,7 @@ static int vtest_submit_cmd2_batch(struct vtest_context *ctx, submit->sync_queue = queue; ret = virgl_renderer_context_create_fence(ctx->ctx_id, VIRGL_RENDERER_FENCE_FLAG_MERGEABLE, - batch->sync_queue_id, + batch->sync_queue_index, (uintptr_t)submit); if (ret) { vtest_free_sync_queue_submit(submit); @@ -2099,7 +2099,7 @@ int vtest_submit_cmd2(uint32_t length_dw) } batch_count = submit_cmd2_buf[VCMD_SUBMIT_CMD2_BATCH_COUNT]; - if (VCMD_SUBMIT_CMD2_BATCH_COUNT + 8 * batch_count > length_dw) { + if (VCMD_SUBMIT_CMD2_BATCH_COUNT + 6 * batch_count > length_dw) { free(submit_cmd2_buf); return -EINVAL; } @@ -2112,8 +2112,6 @@ int vtest_submit_cmd2(uint32_t length_dw) .sync_offset = submit_cmd2_buf[VCMD_SUBMIT_CMD2_BATCH_SYNC_OFFSET(i)], .sync_count = submit_cmd2_buf[VCMD_SUBMIT_CMD2_BATCH_SYNC_COUNT(i)], .sync_queue_index = submit_cmd2_buf[VCMD_SUBMIT_CMD2_BATCH_SYNC_QUEUE_INDEX(i)], - .sync_queue_id = submit_cmd2_buf[VCMD_SUBMIT_CMD2_BATCH_SYNC_QUEUE_ID_LO(i)] | - (uint64_t)submit_cmd2_buf[VCMD_SUBMIT_CMD2_BATCH_SYNC_QUEUE_ID_HI(i)] << 32, }; const uint32_t *cmds = &submit_cmd2_buf[batch.cmd_offset]; const uint32_t *syncs = &submit_cmd2_buf[batch.sync_offset]; |