Skip to content

Decoder works on NVIDIA Shield TV (Tegra X1, Vulkan 1.1) with small changes — data + patches #30

Closed

Description

@Mystodan

Connected Steam discussion

Steam Link on the NVIDIA Shield TV Pro (2019) doesn't offer PyroWave. I looked into why, and the
GPU itself is capable: with three small changes the PyroWave decoder runs correctly and in
real time at 1080p60 on the Shield. Sharing the findings in case Shield/Vulkan 1.1 Android
support is of interest.

Device: NVIDIA Shield TV Pro (2019), Tegra X1+, Android 11, Vulkan 1.1.178, NVIDIA driver 495.00.
Has VK_EXT_subgroup_size_control (incl. full subgroups, size 32), all required subgroup ops
(0x1FF), maxTexelBufferElements 2^27; lacks VK_KHR_synchronization2, timeline semaphores,
8-bit storage, shaderFloat16.

What blocks it (upstream a0d2e71 / Granite fb178c8):

  1. pyrowave_create_device_by_compat() requests instance apiVersion 1.2; the Android 11 loader
    reports 1.1, so Granite fails instance creation. The device filter also skips < 1.2 GPUs.
  2. Granite requires VK_KHR_synchronization2 (hard error in Context::init_device).
  3. Granite self-deadlock in the non-timeline implicit-sync path (separate Granite PR, link below).

Themaister/Granite#158

Everything else already works thanks to existing fallbacks (texel buffers instead of 8-bit
storage, non-FP16 shader variants, fence-based sync without timeline semaphores).

What I changed to test:

  • PyroWave: clamp instance apiVersion to volkGetInstanceVersion(), accept ≥ 1.1 devices.
  • Granite: a sync2 → Vulkan 1.0 translation installed behind the VolkDeviceTable only when sync2
    is missing (6 entry points; READ_ONLY/ATTACHMENT_OPTIMAL rewritten in barriers, render
    passes and descriptor writes incl. update templates). ~700 lines, opt-in to force for testing.
  • Granite: the deadlock fix.

Results on the Shield (standalone probe using only the public C API; compute path;
decode_cpu_buffer_synchronous; streams encoded by PyroWave on a desktop GPU; PSNR vs the
desktop decode of the same stream):

Resolution / bitrate PSNR decode+readback avg / worst GPU (iDWT + dequant)
1080p / 150 Mbit/s 57.3–57.6 dB 9.0 / 10.4 ms 2.4 + 3.2 ms
1440p / 250 Mbit/s 57.4 dB 13.2 / 18.7 ms 3.7 + 4.9 ms
2160p / 400 Mbit/s 56.5–57.5 dB 25.9 / 34.3 ms 7.9 + 10.4 ms

So 1080p60 has good headroom, 1440p60 is marginal, 4K60 is out of reach for this GPU.
First decode has ~0.5 s of one-time shader compilation. The fragment path also initialises fine.

Patches are attached (pyrowave-shield-patches.zip), git am-able against a0d2e71 and fb178c8). The sync2 fallback was
also validated on a desktop GPU (RTX 4070, Windows) by forcing it on (GRANITE_FORCE_SYNC2_COMPAT=1):
pyrowave-device-validation --roundtrip and pyrowave-c-test pass with zero Khronos validation
errors or warnings, with synchronization validation enabled. Happy to adapt the sync2 fallback to
whatever approach you'd prefer, or to drop it if you'd rather handle this differently.

Edited 2026-10-17: zip replaced with a fixed sync2 fallback (timeline semaphore values were dropped).

Activity

  1. Themaister commented on Oct 17, 2026

    @Themaister
    Owner

    Fixed on master. Older Android devices should work now. Added back sync2 emulation support in Granite, but not using these patches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions