Skip to content

Commit 9f78833

Browse files
authored
[OPENGL32] Fix GL_GETINFO ExtEscape call based on mesa MR (reactos#8351)
Just pulls some information from: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4305 Fixes AMD's OpenGL loading when the ctl is made for pulling this information.
1 parent 11bb8e4 commit 9f78833

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

dll/opengl/opengl32/icdload.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@
1111

1212
WINE_DEFAULT_DEBUG_CHANNEL(opengl32);
1313

14+
/* based off https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/wgl/gldrv.h */
1415
typedef struct
1516
{
16-
DWORD Version; /*!< Driver interface version */
17-
DWORD DriverVersion; /*!< Driver version */
18-
WCHAR DriverName[256]; /*!< Driver name */
17+
ULONG Version; /*!< Driver interface version */
18+
ULONG DriverVersion; /*!< Driver version */
19+
WCHAR DriverName[MAX_PATH + 1]; /*!< Driver name */
1920
} Drv_Opengl_Info, *pDrv_Opengl_Info;
2021

22+
#ifndef OPENGL_GETINFO_DRVNAME
23+
#define OPENGL_GETINFO_DRVNAME 0
24+
#endif
25+
2126
typedef enum
2227
{
2328
OGL_CD_NOT_QUERIED,
@@ -142,12 +147,12 @@ struct ICD_Data* IntGetIcdData(HDC hdc)
142147
return NULL;
143148

144149
/* Query for the ICD DLL name and version */
145-
dwInput = 0;
150+
dwInput = OPENGL_GETINFO_DRVNAME;
146151
ret = ExtEscape(hdc, OPENGL_GETINFO, sizeof(DWORD), (LPCSTR)&dwInput, sizeof(DrvInfo), (LPSTR)&DrvInfo);
147152

148153
if(ret <= 0)
149154
{
150-
ERR("Driver claims to support OPENGL_GETINFO escape code, but doesn't.\n");
155+
ERR("Driver claims to support OPENGL_GETINFO escape code, but doesn't. ret: %X\n", ret);
151156
return NULL;
152157
}
153158

0 commit comments

Comments
 (0)