Should you be able to call eglGetPlatformDisplayEXT multiple times with different requested renderers?
For example, when I do the following:
1) Create a Win32 window
2) Call eglGetPlatformDisplayEXT with this Win32 window, and EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE as the requested display
3) Finish initializing EGL (eglCreateWindowSurface, etc)
4) Tear down EGL (eglDestroySurface, eglDestroyContext, eglTerminate)
5) Call eglGetPlatformDisplayEXT with the Win32 window, and EGL_PLATFORM_ANGLE_TYPE_D3D9_ANGLE as the requested display
6) Finish initializing EGL
then ANGLE still uses the D3D11 renderer after step 6, instead of D3D9. It seems to always use whichever display was requested first.
Is this expected behavior?
I was able to work around it by modifying this code to search 'displays' for both the displayId and the displayType:
egl::Display *Display::getDisplay(EGLNativeDisplayType displayId, EGLint displayType)
{
DisplayMap *displays = GetDisplayMap();
DisplayMap::const_iterator iter = displays->find(displayId);
if (iter != displays->end())
{
return iter->second;
}
I'm preparing a change to the "angle_tests" to run them against multiple renderers (e.g. D3D11, D3D9), which is how I've hit this issue. At a later date we plan to run the tests against D3D11 Feature Level 9_3 too, which we are preparing in our MSOpenTech GitHub repo.
Thanks,
Austin