Say which Vulkan driver actually answered

The startup log named the GPU and a driver version, and on Android neither
identifies the driver. adrenotools' hook falls back to the system driver when
its dlopen of the custom one fails, and reports that only to logcat, so a
session that silently ran the system driver logged exactly the same thing as
one that ran the custom driver it was asked for.

That is not hypothetical. Chasing a Skate 3 freeze on an Adreno 830 I recorded
a custom driver as passing a test it never took: it had failed to load with
"cannot locate symbol pthread_getaffinity_np", fallen back, and the log still
said the custom driver was bound. The only tell was that its reported version
matched the system driver's exactly, which needed three saved logs side by side
to notice.

Logs the driver identity Vulkan already reports -- name, driverID, info and
conformance version, all of which were being fetched and thrown away -- and
falls back to saying the identity is name-derived when VK_KHR_driver_properties
is missing, which is common on the older Android devices this matters most on.

Where a custom driver was requested and Qualcomm's own driver answered, that is
a silent fallback, since adrenotools installs Mesa/Turnip builds. It now says
so, and points at the logcat line carrying the actual reason.

The loader's own message no longer claims more than it knows: the handle it
binds is the one it was handed, and whether the driver behind it is the
intended one is not something it can see.
This commit is contained in:
Zulux91
2026-08-11 19:57:37 -05:00
parent 5405d71e2e
commit 8772786f9a
2 changed files with 45 additions and 1 deletions
+6 -1
View File
@@ -629,7 +629,12 @@ namespace vk::android
}
g_handle = handle;
vk_loader.success("Vulkan driver bound (%s)", g_custom ? "custom" : "system");
// "custom" describes the handle we were given, not necessarily the driver that
// answers through it: adrenotools falls back to the system driver inside that
// handle when its own dlopen fails, and says so only to logcat. The identity
// logged by physical_device::create is what actually answered.
vk_loader.success("Vulkan dispatch bound to the %s driver handle", g_custom ? "custom" : "system");
return previous;
}
+39
View File
@@ -5,6 +5,9 @@
#include "util/logs.hpp"
#include "Emu/system_config.h"
#include <vulkan/vulkan_core.h>
#ifdef __ANDROID__
#include "Emu/RSX/VK/vk_android_loader.h"
#endif
#ifdef __APPLE__
#include <vulkan/vulkan_beta.h>
#endif
@@ -246,6 +249,42 @@ namespace vk
rsx_log.always()("Found Vulkan-compatible GPU: '%s' running on driver %s", get_name(), get_driver_version());
// ARMSX3: say WHICH driver this is, not just its version.
//
// The version alone does not identify a driver, and on Android it is actively
// misleading: adrenotools' hook falls back to the system driver when its dlopen
// fails, so a session that silently ran the system driver looks here exactly like
// one that ran the custom driver it was asked for. Every report naming a custom
// driver is untrustworthy without this.
if (driver_properties.driverID)
{
rsx_log.always()("Vulkan driver identity: '%s' (driverID %u), info '%s', conformance %u.%u.%u.%u",
driver_properties.driverName,
static_cast<u32>(driver_properties.driverID),
driver_properties.driverInfo,
static_cast<u32>(driver_properties.conformanceVersion.major),
static_cast<u32>(driver_properties.conformanceVersion.minor),
static_cast<u32>(driver_properties.conformanceVersion.subminor),
static_cast<u32>(driver_properties.conformanceVersion.patch));
}
else
{
rsx_log.always()("Vulkan driver identity: VK_KHR_driver_properties unavailable, inferred from the GPU name only");
}
#ifdef __ANDROID__
// A custom driver was asked for, and the driver that answered is Qualcomm's own.
// adrenotools installs Mesa/Turnip builds, so this combination means the load
// failed and the fallback took over. It reports that here because the only other
// trace is a logcat line from hook_impl, which never reaches a bug report.
if (vk::android::using_custom_driver() && get_driver_vendor() == driver_vendor::ADRENO)
{
rsx_log.error("A custom Vulkan driver was requested, but the driver in use is Qualcomm's own. "
"It most likely failed to load and fell back silently; `adb logcat | grep hook_impl` has the reason. "
"Treat this session as running the SYSTEM driver.");
}
#endif
if (get_driver_vendor() == driver_vendor::RADV && get_name().find("LLVM 8.0.0") != umax)
{
// Serious driver bug causing black screens