I was watching some random YouTube stream and then heard a voice telling me to do this.
This can run wglgears on wow, though there's plenty of missing pieces which I don't have any idea how to fix (like buffer mapping, etc.). Opening it as a draft for now to show the whole thing, if it seems alright I'll send it in batches.
--
v4: opengl32: Implement wow64 thunks for glMapBuffer (et al.).
opengl32: Use manual win32 thunks for glMapBuffer (et al.).
opengl32: Implement wow64 thunks for GLsizeiptr/GLintptr arrays.
opengl32: Implement wow64 thunks for glFenceSync (et al.).
opengl32: Implement wow64 thunks for input pointer arrays.
opengl32: Implement wow64 thunk for wglGetPbufferDCARB.
opengl32: Implement wow64 thunk for wglCreatePbufferARB.
opengl32: Implement wow64 thunk for wglCreateContextAttribsARB.
opengl32: Implement wow64 thunk for wglMakeCurrent (et al.).
opengl32: Implement wow64 thunk for glGetString (et al.).
opengl32: Implement wow64 thunk for wglGetProcAddress.
opengl32: Generate stub wow64 params mapping.
opengl32: Manually write glPathGlyphIndexRangeNV wow64 thunk.
opengl32: Generate wow64 thunks.
opengl32: Use RtlSetLastWin32Error instead of SetLastError.
opengl32: Use msvcrt allocation functions.
opengl32: Build with msvcrt.
opengl32: Use ntdll registry functions to read disabled extensions.
opengl32: Avoid recursively entering WGL critical section.
opengl32: Split opengl_ext.h into private.h and unix_private.h.
opengl32: Use glReserved1[0] and glReserved1[1] for draw and read DCs.
opengl32: Avoid calling back the wglMakeCurrent win32 thunk.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1010
Overwatch 2 verifies that every kernel callback that is run, lives in user32. Introduce a callback in user32 that just forwards to the other modules' callbacks.
--
v12: user32: Remove NtUserDriverCallback* kernel callbacks.
winex11.drv: Route kernel callbacks through user32.
winex11.drv: Pass a struct to x11drv_ime_set_result.
winex11.drv: Pass a struct to x11drv_dnd_post_drop.
winemac.drv: Route kernel callbacks through user32.
wineandroid.drv: Route kernel callbacks through user32.
opengl32: Do not store debug message callback in kernel callback table.
winevulkan: Route kernel callbacks through user32.
user32: Add NtUserDispatchCallback kernel callback.
user.exe16: Move kernel callbacks to wow_callbacks.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1180
There are regions of virtual memory that start below the WoW user address limit but end beyond it (e.g. a large empty region between the end of 32-bit allocations and 64-bit ntdll). When queried from WoW via `NtQueryVirtualMemory(MemoryBasicInformation)`, the returned struct for such a region will have `BaseAddress + RegionSize` past the highest user address (or even worse - it may overflow 32 bits). These patches make WoW `NtQueryVirtualMemory` report a truncated size for such regions, so that they appear to end exactly at the highest user address. This fixes programs that, e.g., walk their address space using iterated calls to `VirtualQuery`.
Also, make `MemoryRegionInformation` queries return `STATUS_INVALID_PARAMETER` when passed an address beyond the user address limit, like `MemoryBasicInformation` already does.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1302