#3332·bgfx

使用 OpenGL 作为渲染器会导致 TDR(0x0000116)

作者: sqmh666创建于 2024年7月29日更新于 2025年11月17日

Win11 23H2 thinkpad, CPU:Intel Ultra7 155H,Graphics:Intel Arc(Core graphics) 18-ibl.cpp bgfx::Init init; init.type = bgfx::RendererType::OpenGL; init.vendorId = args.m_pciId; init.platformData.nwh = entry::getNativeWindowHandle(entry::kDefaultWindowHandle); init.platformData.ndt = entry::getNativeDisplayHandle(); init.platformData.type = entry::getNativeWindowHandleType(); init.resolution.width = m_width; init.resolution.height = m_height; init.resolution.reset = m_reset; bgfx::init(init); line419: init.type = args.m_type; 我在Visual Studio中将其更改为init.type = bgfx::RendererType::OpenGL,并对bgfx::init(init)进行单步调试; 调用栈:

example-18-iblDebug.exe!bx::Semaphore::wait(int _msecs) line 276	C++
example-18-iblDebug.exe!bgfx::Context::renderSemWait() line 5244	C++
example-18-iblDebug.exe!bgfx::Context::frame(bool _capture) line 2326	C++
example-18-iblDebug.exe!bgfx::Context::init(const bgfx::Init & _init) line 1997	C++
example-18-iblDebug.exe!bgfx::init(const bgfx::Init & _userInit) line 3571	C++
>example-18-iblDebug.exe!`anonymous namespace'::ExampleIbl::init(int _argc, const char * const * _argv, unsigned int _width, unsigned int _height) line 427	C++
return WAIT_OBJECT_0 == WaitForSingleObject(si->m_handle, milliseconds);
我遇到了这个问题,但是在老版本的thinkpad上一切都很好,老版本的thinkpad:i7-1260p,Intel iris xe和nvidia mx550
我已经更新了图形驱动程序(arc图形),尝试了所有我能做的事情,但没有任何帮助