[OpenGL] Check GL_VENDOR too to determine GPU's vendor id

Try to fix #965
pull/967/head
jackun 1 year ago
parent c495c5fdda
commit 313abbe6a7
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -117,14 +117,17 @@ void imgui_create(void *ctx)
sw_stats.version_gl.minor,
sw_stats.version_gl.is_gles);
std::string vendor = (char*)glGetString(GL_VENDOR);
deviceName = (char*)glGetString(GL_RENDERER);
SPDLOG_DEBUG("deviceName: {}", deviceName);
SPDLOG_DEBUG("vendor: {}, deviceName: {}", vendor, deviceName);
sw_stats.deviceName = deviceName;
if (deviceName.find("Radeon") != std::string::npos
if (vendor.find("AMD") != std::string::npos
|| deviceName.find("AMD") != std::string::npos
|| deviceName.find("Radeon") != std::string::npos
|| deviceName.find("NAVI") != std::string::npos) {
vendorID = 0x1002;
} else if (deviceName.find("Intel") != std::string::npos) {
} else if (vendor.find("Intel") != std::string::npos
|| deviceName.find("Intel") != std::string::npos) {
vendorID = 0x8086;
} else {
vendorID = 0x10de;

Loading…
Cancel
Save