Skip to content

NFSU2 Revived v0.15.17

Choose a tag to compare

@mininxd mininxd released this 07 Nov 22:21
· 147 commits to main since this release

What's Changed in v0.15.17

PowerVR GPU Fixes & Hardware Compatibility (#49, #50)

  • PowerVR BXM-8-256 & Rogue GE8322 Crash Resolution: Intercepted vkCreateDevice via guarded_vkCreateDevice in roam_android.c to dynamically sanitize unsupported Vulkan physical device features. PowerVR drivers (IMGVK) lack occlusionQueryPrecise, causing device creation to fail with VK_ERROR_FEATURE_NOT_PRESENT (-8). The sanitizer inspects physical device capabilities and strips unsupported features on PowerVR hardware:
    if (s_real_vkGetPhysicalDeviceFeatures) {
        VkPhysicalDeviceFeatures_compat_t supported;
        memset(&supported, 0, sizeof(supported));
        s_real_vkGetPhysicalDeviceFeatures(physicalDevice, &supported);
        if (!supported.occlusionQueryPrecise) safeFeatures.occlusionQueryPrecise = 0;
        if (!supported.sampleRateShading) safeFeatures.sampleRateShading = 0;
        if (!supported.geometryShader) safeFeatures.geometryShader = 0;
        if (!supported.multiViewport) safeFeatures.multiViewport = 0;
    }
  • Optional Occlusion Queries in Diagnostic Probe: Updated gpu_probe.cpp to make occlusionQueryPrecise optional, allowing PowerVR and entry-level Vulkan drivers to initialize diagnostics and game rendering cleanly.

MediaTek MT6893Z_T Screen Recording & Audio Interruption Fix (#43, #52, #53)

  • DirectSound Synthetic Fallback Clock: Implemented audio_watchdog.cpp / audio_watchdog.h and added PcmMixer::advance() to ensure DirectSound buffer play cursors advance continuously in real time even when Android AAudio disconnects (screen recording attach, incoming phone calls, or audio routing switches). This prevents DirectSound polling loops in Thread 8 from blocking audio mutex 0xf0080000, resolving main game loop freezes:
    if (sinceCallback > 20000) { // >20ms without AAudio callback
        int64_t deltaUs = std::clamp<int64_t>(now - lastTick, 0, 100000);
        uint32_t rate = mixer.rate ? mixer.rate : 48000;
        unsigned missedFrames = static_cast<unsigned>((deltaUs * rate) / 1000000ULL);
        if (missedFrames > 0) mixer.advance(missedFrames);
    }
  • MediaTek AFE Audio HAL Driver Fix: Sanitized closeSoundStreamOnly() in guest_audio.inc to verify stream state before stopping. Calling AAudioStream_requestStop() on a disconnected stream causes deadlocks in MediaTek audio HAL drivers; disconnected streams are now closed directly.
  • Reconnect Cooldown: Added a 300 ms rate-limiting cooldown between stream reconnection attempts to avoid audio HAL contention while Android initializes recording sessions.

Adreno GPU Robustness (VK_EXT_robustness2)

  • Null Descriptor & Safe Buffer Fetch: Enabled VK_EXT_robustness2 and robustBufferAccess on Adreno GPUs to eliminate dummy sampler overhead for unbound D3D9 textures and protect against out-of-bounds vertex and index fetches.

CPU Cluster Affinity & Rendering Pipeline Optimizations

  • CPU Cluster Affinity Pinning (sched_setaffinity): Created performance_tuner.cpp / performance_tuner.h to detect CPU topology from sysfs and pin the main game render loop exclusively to performance/prime cores (Cortex-X / Cortex-A78 / Cortex-A76) with elevated priority (-10), eliminating thread migration stutters:
    int rc = sched_setaffinity(0, sizeof(cpu_set_t), &s_perf_mask);
    setpriority(PRIO_PROCESS, 0, -10);
  • ADPF (Android Dynamic Performance Framework): Added per-frame ADPF hint sessions in adpf_manager.cpp / adpf_manager.h on Android 12+ (API 31+) to communicate target vs actual frame duration to the OS thermal governor.
  • Xiaomi Joyose & MediaTek Platform Coordination: Enhanced GamePerformanceBooster.java to signal Xiaomi Joyose Game Turbo, Xiaomi PerfService, and MediaTek PerfServiceWrapper.
  • Zero-Stutter DXVK Profile:
    • d3d9.cachedDynamicBuffers = True
    • dxvk.useRawSsbo = True
    • d3d9.deferSurfaceCreation = True
    • d3d9.maxFrameLatency = 1
    • d3d9.lenientClear = True
    • d3d9.allowDiscard = True
    • d3d9.allowDoNotWait = True
    • d3d9.maxAvailableMemory = 4096
    • DXVK_LOG_LEVEL = none (eliminates synchronous logging file I/O overhead during gameplay)
    • WINEDEBUG = -all
    • MESA_SHADER_CACHE_MAX_SIZE = 1024MB

Full Changelog: v0.15.16...v0.15.17