RFC: Refactor Windows OpenGL32.dll into 2 DLLs

Merged Jesse Natalie requested to merge jenatali/mesa:wgl-refactor into main

The first few commits are some cleanup that we should take anyway, to adjust which libs have which code, and better control the DLL exports of Mesa binaries for Windows.

The last commit splits OpenGL32.dll into 2 DLLs to match the Linux architecture:

  1. OpenGL32.dll, which is a tiny stub DLL that implements the wgl* APIs and exports the gl* APIs from the static glapi.
  2. libgallium_wgl.dll, which is a "megadriver" in the same way that the Linux libgallium_dri.so is a megadriver.

My goal here is to export more of the stw_* methods out of libgallium_wgl.dll in a future patch series, which implements EGL. These stw_* methods (combined with the stock Windows ICD Drv* interface) can then be an equivalent interface to the DRI interface between Mesa and the driver, though as has been discussed on IRC, with the removal of classic DRI drivers, this interface doesn't really need to be versioned.

/cc @jrfonseca @charmainel @pal1000

Merge request reports