Skip to content

BytArch GTA-V for Android 0.1.9-patch (Adreno black screen fixed)

Choose a tag to compare

@bytarch bytarch released this 20 Oct 19:45

BytArch GTA-V - the GTA V web port running natively on Android, ARM64 / Android 10+ / Vulkan.

BytArch-GTA-V-android-0.1.9-patch-debug.apk - debug build, sideload it over 0.1.8-patch.

This patch follows 0.1.8-patch and contains the fix for the black screen the
0.1.8-patch test found: the Adreno Vulkan driver loses the device when a
shader uses clip distances.

What the 0.1.8-patch test showed

The tester on a RedMagic 11 Pro (Adreno 840) reported:

Both checkboxes off: black screen;
"decode BC textures on CPU" on: black screen;
"software clip distances" on: game runs normally, 3D objects and textures are correct.

The new logs confirm the cause:

[wgpu] device lost: Unknown: Unexpected error variant (driver implementation is at fault)

The driver dies while the first pipelines are compiled, the Vulkan device is
gone, and everything after that is drawn into a dead device - which is the
black screen with the sound still playing. Clip distances are the only thing
that differs between the black run and the working one.

What this patch changes

  • Clip distances are emulated in the fragment stage on Adreno devices. The
    renderer recognises an Adreno adapter and leaves the clip distances feature
    out for it, so the game never asks the driver for hardware clip distances.
    The picture is the same, the driver stays alive.
  • The emulated clip varyings pick free locations, so they cannot collide
    with a varying of the game.
  • The log line now says which path is in use:
    clip distances: software emulation (Adreno driver) or
    clip distances: hardware.

Other devices keep the hardware path, so nothing changes for them. The
launcher switch Force software clip distances still turns the emulation on
for any other device if it is needed.

The 0.1.8-patch fixes stay in: compressed textures are uploaded and copied in
whole blocks, the device loss is reported instead of failing silently, and the
failed pipeline is logged with its colour targets and depth format.

What to test

  1. Sideload this APK over 0.1.8-patch.
  2. Play with both switches off. On an Adreno device the log should say
    clip distances: software emulation (Adreno driver).
  3. If it is still black, export the logs and attach them.

Getting game data in

The app ships no game content; you supply your own copy of the web port's data,
which must have this layout:

data/manifest.json
b/<build>/shaders/index.json
b/<build>/game.wasm        (native wasm2c engine only)

Two ways to point the app at it:

  • Use a game files folder - pick a folder that already holds data/ and
    b/. Nothing is copied, so it works with no free space, and you can pick the
    parent folder if the data sits in a game/ subfolder.
  • Import game ZIP - pick a .zip of the same tree; it is extracted into app
    storage, which needs free space for both the archive and the extracted data.

Whichever you choose, the folder must be on internal storage (/sdcard/...).
If the launcher says the folder cannot be read, tap Grant file access and
allow "All files access".

Graphics

Every knob the web launcher exposes is in the launcher, under Graphics,
with the same names: texture, reflection, water, particle and grass quality,
scenery/pedestrian/vehicle detail, city density, variety, post FX, motion blur,
depth of field, shadow quality and softness, ambient occlusion, render distance,
fog, particle and long shadows, loading ahead, and distant lights. Low (phone
default)
turns shadows off entirely and pulls the render distance in.

Multiplayer

Multiplayer uses the Grand-V relay - the same transport as the web version, so
you can share a room with browser players. You need a relay address
(ws://host:8012/relay), a room name and the access code from whoever is
hosting. Rooms hold two players and carry pose only: position, rotation and
model. Plain ws:// for now, no TLS.

Known limits

  • ARM64 only, Vulkan required, Android 10+.
  • First launch compiles the game and takes several minutes; early stutter is
    mostly loading from storage.
  • Signed with a debug key. Fine for sideloading, not for any store.
  • This patch covers the Wasmtime engine. The native wasm2c engine button still
    boots and logs but does not render; use the wasmtime engine for gameplay.

Tested

Galaxy A34 5G (8 GB) with the Wasmtime engine.