https://git.reactos.org/?p=reactos.git;a=commitdiff;h=082f230ac76087915355c…
commit 082f230ac76087915355c962a307f21ade9dae96
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Tue Oct 22 03:06:07 2019 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Tue Oct 22 03:07:09 2019 +0200
[WINED3D] Workaround regression CORE-15408
Many 3D applications crashed with 'WineD3D fake window' msgbox
if they were used in VirtualBox with graphics driver
'VBoxDisp.sys from VM guest additions + installed 3D acceleration'
That was a regression of SVN r75847 == git
3d13ed394efdd0ce0aef4e10965b1d08334394ec
Contrary we had no such issues with the SW emulation.
The reason for the bug is that
VBoxDisp only supports OpenGL 2.1 (GLSL 120) and WineD3D
tried to use shaders for OpenGL 3.2 (GLSL 150).
This workaround disables the usage in a hard-coded way for
all graphics adapters. Should be ok for now, as ros does not
really support any modern GPU drivers yet.
Proper working runtime detection would be better ofc.
Thx to Doug Lyons & Fabian Maurer
---
dll/directx/wine/wined3d/utils.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dll/directx/wine/wined3d/utils.c b/dll/directx/wine/wined3d/utils.c
index b48293eabb3..3c6d218f27d 100644
--- a/dll/directx/wine/wined3d/utils.c
+++ b/dll/directx/wine/wined3d/utils.c
@@ -2183,7 +2183,14 @@ static void draw_test_quad(struct wined3d_caps_gl_ctx *ctx, const
struct wined3d
if (!ctx->test_program_id)
{
+#ifdef __REACTOS__
+ /* workaround CORE-15408 crash for many 3D applications.
+ VBoxDisp with enabled 3D acceleration only supports OpenGL 2.1 (GLSL 120).
+ Wine must not use shaders for OpenGL 3.2 (GLSL 150). */
+ BOOL use_glsl_150 = FALSE;
+#else
BOOL use_glsl_150 = gl_info->glsl_version >= MAKEDWORD_VERSION(1, 50);
+#endif
ctx->test_program_id = GL_EXTCALL(glCreateProgram());