Commit Graph
12 Commits
Author SHA1 Message Date
Ahmad Sayed Alsayed EbrahimandClaude Opus 5.5 ce34349ffb feat(vkbridge): report VK_EXT_robustness2 on drivers without it (Mali r44)
DXVK refuses to start without robustness2. GameNative's wrapper reports it on
Mali r44 (robustBufferAccess2, robustImageAccess2, nullDescriptor) without
enforcing it, and DXVK games run. Same here, as VKB_EMU_ROBUSTNESS2: the
client advertises the extension and features, the server strips the feature
struct and keeps robustBufferAccess on (VKBRIDGE_EMU_ROBUSTNESS2=0 disables).
The host Mali imitation now hides robustness2 too; DXVK checker 10/10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1U9H1evGNjHRQ3wRUdv5V
2026-10-10 17:05:04 +03:00
Ahmad Sayed Alsayed EbrahimandClaude Opus 5.5 0e7f8e7170 perf(vkbridge): client-named descriptor sets, allocated without a round trip
Where the client keeps a pool's books and knows every layout, it names the
sets itself (top bit set) and sends vkbAllocDescSets asynchronously; the
server allocates the driver's sets and translates the names in dispatch
wrappers (updates, template updates, binds, frees) and forgets them on pool
reset/destroy. All-or-nothing; a full pool still answers OUT_OF_POOL_MEMORY.

d3d11_bench 1000 draws: 1.43 -> 1.12 ms/frame (native 0.30); the only
synchronous call left per frame is vkWaitSemaphores. Host suite 14/14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1U9H1evGNjHRQ3wRUdv5V
2026-10-10 14:52:59 +03:00
Ahmad Sayed Alsayed EbrahimandClaude Opus 5.5 850c929967 feat(vkbridge): VKBRIDGE_WSI_DUMP_EVERY=N dumps every Nth presented frame
For watching a real game make progress through the bridge (frames are named
by present count). Used to check The Witcher 3 (D3D12 / vkd3d-proton) on the
host: legal screen and the 3D account-link screen render correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S1U9H1evGNjHRQ3wRUdv5V
2026-10-10 14:48:51 +03:00
Ahmad Sayed Alsayed EbrahimandClaude Opus 5.5 a4bd2eb271 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>
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 c4ac049007 feat(vkbridge): VK_EXT_depth_clip_enable emulation via depth clamp; D3D11 DepthClipEnable check
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 02a06bec3f feat(vkbridge): vertex attribute divisor emulation; host regression suite; dispatch/version fixes
- divisor != 1 bindings get stride 0 and are rebound per draw; d > 1 splits draws, with a
  BaseInstance-as-0 vertex shader variant so DXVK's SV_InstanceID stays exact
- device-level dispatch never falls back to a loader trampoline (crashed in vkCmdSetLineStipple)
- core commands newer than the device's version are not handed out; the app's instance
  version is passed through as asked (Zink 26.2 aborted on a 1.4 entry point)
- run_tests.sh: smoke, bcn_check, DXVK d3d11_check, vkcube x3, gamescope+Zink, in plain and
  Mali-imitation modes - 14/14 pass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 92c94c5c15 feat(vkbridge): BC1-BC7 texture emulation (GPU decode on upload)
BC images are created decoded (RGBA8/R8/RG8/RGBA16F, keeping sRGB/SNORM meaning) and every
buffer->image upload is a compute dispatch (shaders/bc_decode.comp, a GLSL port of bcdec with
BC6H mode layouts generated from its source). The app's compute bindings are restored after.
bcn_check: all 10 formats incl. every BC6H/BC7 mode bit-exact with bcdec; DXVK accepts the
Mali-like device (BC, clip/cull, maintenance5 emulated) and its BC/clip checks pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 2e569b850a feat(vkbridge): SPIR-V editor; clip/cull distance and GS/TES point size emulation
The last pre-raster stage's ClipDistance becomes a varying and the fragment shader discards on a
negative distance; cull distance and GS/TES PointSize become unread varyings. Rewritten modules
pass spirv-val; DXVK's SV_ClipDistance check passes with the GPU's clip distance hidden.
The client reports features by what the server emulates and what the GPU lacks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 bf6dbb642a feat(vkbridge): emulation layer + VK_KHR_maintenance5 for drivers without it
Zink (Mesa 26.2) and DXVK 2.7 refuse a Vulkan 1.3 device without maintenance5. The server
installs dispatch-table wrappers: flags2 folded into 32-bit flags, inline shader modules,
BindIndexBuffer2/area granularity/subresource layout 2, VK_REMAINING_ARRAY_LAYERS and
VK_WHOLE_SIZE resolved from tracked images/buffers. Host: Zink glxgears in gamescope at
144 fps with the driver's maintenance5 hidden and the API capped at 1.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 c3f02222fc feat(vkbridge): Vulkan 1.4.341 registry, stand-in DRM node for gamescope, test switches
- registry moved from 1.3.247 to 1.4.341: current Zink and DXVK need post-1.3.247
  extensions (maintenance5); the bridge only exposes what the driver reports
- gamescope on the bridge: Mali's device stands in as the render node, the ICD reports its
  numbers (VKBRIDGE_DRM_RENDER), the session shim answers PRIME on it - linux-dmabuf works
- host: gamescope (Arch, no GPU device) composites vkcube through the bridge, zero-copy;
  Zink 26.2 runs GL 4.6 on the bridge
- VKBRIDGE_TRACE / HIDE_EXTS / MAX_API for diagnosis and imitating Mali on the host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:28:13 +03:00
ahmadandClaude Opus 5.5 d82c42d818 feat(vkbridge): self-checking smoke test, frame dump, WSI extensions and crash log on the server
Smoke test passes 9/9 through the bridge on RADV (dmabuf) and lavapipe (hostptr, UMA model);
vkcube renders correctly over Wayland dma-buf, wl_shm and X11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:27:54 +03:00
ahmadandClaude Opus 5.5 a8fd343fc1 feat(vkbridge): Vulkan bridge core - codegen, wire runtime, server, client ICD, WSI
Generated from vk.xml 1.3.247; server shares host-visible memory via a
self-tested strategy (hostptr/dmabuf/ahb). vulkaninfo runs through it on host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KZqR8XUE8czvGzEpgSCVQR
2026-10-10 14:27:54 +03:00