[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
3d13ed394e

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
This commit is contained in:
Joachim Henze 2019-10-22 03:06:07 +02:00
parent 6cca46453c
commit 082f230ac7

View file

@ -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());