Getting Windows games like Mewgenics and Slay the Spire 2 running on an Android phone's PowerVR GPU is an exercise in peeling back layered abstractions until you find the exact contract violation.
The graphics chain looks straightforward on paper:
Game (Direct3D / GL)
→ Mesa Zink (OpenGL on Vulkan)
→ SPIR-V
→ Vortek (Winlator Vulkan Forwarding)
→ PowerVR Driver
In practice, a black screen or dropped frame can come from any link in that chain. During early triage, three distinct bugs stacked on a single symptom:
- Swapchain Recreate vs. SURFACE_LOST: Vortek treated window dimension mismatches during container resizing as
VK_ERROR_SURFACE_LOST, prompting Godot to abandon rendering entirely. Handling the resize inline via swapchain recreate restored the presentation pipeline. - Missing Sampled Image Usage: The window textures lacked
GPU_SAMPLED_IMAGEusage flags, rendering them black when sampled as quads. - Pipeline Cache Ring Overflow: Vortek's pipeline cache reply exceeded client ring bounds, silently killing the game process after 10 minutes of play.
Peeling all three back is what got Slay the Spire 2 from a black screen to its menu over 10 numbered test builds, and Mewgenics now renders and plays on the same GPU.
The 14-Minute Feedback Loop & Why Probes Mattered
Running tests required pushing builds to a physical Pixel 11 Pro XL because the bug was specific to how PowerVR hardware interprets vertex inputs. Running 10 hunt builds took about 14 minutes per round trip.
To stop hunting in the dark, I built a deterministic Vulkan probe and benchmark suite. Instead of guessing whether a buffer holds data or whether the window system dropped an alpha flag, each probe isolates one layer boundary against a control and reports verifiable numbers with units.
Reverse Engineering the Shipped Binaries
Two pieces of the stack needed rebuilding from the shipped binaries, because the source I had didn't match what the phone was running:
- explorer.exe reconstruction: recovered every change Winlator made to Wine's
explorer.exefrom the shipped binary (.pdata ranges, delay-import table), then rebuilt them as a source patch on stock Wine 10.10 that matches the original per function. The app ships that explorer, hash-guarded, so users keep any desktop customizations. - BC6H/BC7 CPU texture decoder: a driver probe showed this GPU has no hardware BC6H/BC7 support, so I wrote a CPU decoder that is bit-exact against Mesa 26.2.6 (73bf892). The whole probe-led case study is public.
Input Fixes the Games Needed
- Captured mouse went dead after any tap in touch mode; batched mouse samples were dropped entirely.
- A keyboard with a stray joystick axis (my Keychron Q11) was misread as a controller, which is a little funny for a keyboard.
- Held keys never repeated, and touch double-taps landed outside Windows' double-click box.
- Added an optional tap ring and stick deadzone once the real causes were pinned.
Controller USB Pass-Through
Android's standard gamepad API abstracts away controller descriptors, dropping support for advanced features. To fix this, I built a direct USB controller pass-through:
- The pass-through
winebus.syspair with a Unix socket bridge, plus USB descriptor parsing, a pad reader and a frame codec, all building reproducibly from Wine 10.10 stock source plus patches. - Backpressure: when socket buffers fill up, stale frames are dropped so the controller stays connected rather than crashing Wine.
Honest status, because that matters more here: replayed-frame tests pass on Linux (Steam finds the pad, malformed frames close the socket, two pads and hotplug work), and the app ships the pair, but the full phone test with an actual game has not run yet. So: pass-through built and gated, not yet game-proven.