mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
perf(vkbridge): async requests with ordering, batched descriptor sets, buffered server reads
- Ordered async protocol: vkb_msg_hdr seq/barrier, per-process ordering gate on the server; void commands and VkResult commands without outputs (submits, resets, binds, vkEndCommandBuffer replay) no longer wait for a reply. VKBRIDGE_SYNC=1 restores synchronous calls for debugging. - Client async queue batched across threads with a ~100us background flusher. - Descriptor sets allocated in batches per (pool, layout); the client keeps the pool's books (layout descriptor counts vs pool sizes) so batches ask only for what fits and a full pool answers OUT_OF_POOL_MEMORY without a round trip. Caches for a destroyed layout are dropped (its handle may be reused). - Server parses requests out of one receive buffer (descriptor FIFO for SCM_RIGHTS) instead of two reads per message. - Server logs async VkResult failures (generated vkb_cmd_result table) and per-command timing with VKBRIDGE_STATS=<s>. - tests/d3d11_bench.c: game-like D3D11 frame (1000 draws, Map DISCARD, rebinds). d3d11_bench 1000 draws on RADV: native 0.30 ms/frame; bridge 26.3 ms (sync) -> 1.43 ms. Host suite 14/14 in plain and Mali-imitation modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
308b200350
commit
a4bd2eb271
14 files changed
+1247
-314
No files matched your search
@@ -192,7 +192,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkb_ep_vkEndCommandBuffer(VkCommandBuffer command
|
||||
vkb_enc_u64(&c.e, cb->obj.remote);
|
||||
vkb_enc_blob(&c.e, cb->stream.buf ? cb->stream.buf : (const void *)"", cb->stream.len);
|
||||
VkResult r = VK_ERROR_DEVICE_LOST;
|
||||
if (vkb_call_exec(&c)) {
|
||||
if (vkb_async_results()) {
|
||||
/* Replayed on the server while the app goes on; ordered before its submit. */
|
||||
r = vkb_call_exec_async(&c) ? VK_SUCCESS : VK_ERROR_DEVICE_LOST;
|
||||
} else if (vkb_call_exec(&c)) {
|
||||
r = (VkResult)vkb_dec_u32(&c.d);
|
||||
vkb_call_end(&c);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user