feat: log GPU vendor/name at init, add PLAY_SOUND diagnostics

Log GPU name and vendor ID during VkContext initialization for easier
debugging of GPU-specific issues (FSR3, driver compat, etc.). Add
isAmdGpu()/isNvidiaGpu() accessors.

Temporarily log SMSG_PLAY_SOUND and SMSG_PLAY_OBJECT_SOUND at WARN
level (sound ID, name, file path) to diagnose unidentified ambient
NPC sounds reported by the user.
This commit is contained in:
Kelsi 2026-03-24 09:56:54 -07:00
parent c8c01f8ac0
commit d2a396df11
3 changed files with 16 additions and 0 deletions

View file

@ -2895,10 +2895,12 @@ void Application::setupUICallbacks() {
const uint32_t row = static_cast<uint32_t>(idx);
std::string dir = dbc->getString(row, 23);
std::string soundName = dbc->getString(row, 2);
for (uint32_t f = 3; f <= 12; ++f) {
std::string name = dbc->getString(row, f);
if (name.empty()) continue;
std::string path = dir.empty() ? name : dir + "\\" + name;
LOG_WARNING("PLAY_SOUND: id=", soundId, " name='", soundName, "' path=", path);
audio::AudioEngine::instance().playSound2D(path);
return;
}
@ -2916,11 +2918,15 @@ void Application::setupUICallbacks() {
const uint32_t row = static_cast<uint32_t>(idx);
std::string dir = dbc->getString(row, 23);
std::string soundName = dbc->getString(row, 2);
for (uint32_t f = 3; f <= 12; ++f) {
std::string name = dbc->getString(row, f);
if (name.empty()) continue;
std::string path = dir.empty() ? name : dir + "\\" + name;
LOG_WARNING("PLAY_OBJECT_SOUND: id=", soundId, " name='", soundName, "' path=", path,
" src=0x", std::hex, sourceGuid, std::dec);
// Play as 3D sound if source entity position is available
auto entity = gameHandler->getEntityManager().getEntity(sourceGuid);
if (entity) {

View file

@ -196,6 +196,10 @@ bool VkContext::selectPhysicalDevice() {
VkPhysicalDeviceProperties props;
vkGetPhysicalDeviceProperties(physicalDevice, &props);
uint32_t apiVersion = props.apiVersion;
gpuVendorId_ = props.vendorID;
std::strncpy(gpuName_, props.deviceName, sizeof(gpuName_) - 1);
gpuName_[sizeof(gpuName_) - 1] = '\0';
LOG_INFO("GPU: ", gpuName_, " (vendor 0x", std::hex, gpuVendorId_, std::dec, ")");
VkPhysicalDeviceDepthStencilResolveProperties dsResolveProps{};
dsResolveProps.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES;