From 42c0491e927d0b0bc79cd649aac9935b705cc31f Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sun, 15 Dec 2019 23:52:13 +0000 Subject: [PATCH] r_world.c: workaround Intel UHD 600 driver bug git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1662 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/r_world.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Quake/r_world.c b/Quake/r_world.c index de5b9f3b..cdc8fe81 100644 --- a/Quake/r_world.c +++ b/Quake/r_world.c @@ -825,11 +825,16 @@ void GLWorld_CreateShaders (void) { "TexCoords", texCoordsAttrIndex }, { "LMCoords", LMCoordsAttrIndex } }; - + + // Driver bug workarounds: + // - "Intel(R) UHD Graphics 600" version "4.6.0 - Build 26.20.100.7263" + // crashing on glUseProgram with `vec3 Vert` and + // `gl_ModelViewProjectionMatrix * vec4(Vert, 1.0);`. Work around with + // making Vert a vec4. (https://sourceforge.net/p/quakespasm/bugs/39/) const GLchar *vertSource = \ "#version 110\n" "\n" - "attribute vec3 Vert;\n" + "attribute vec4 Vert;\n" "attribute vec2 TexCoords;\n" "attribute vec2 LMCoords;\n" "\n" @@ -839,7 +844,7 @@ void GLWorld_CreateShaders (void) "{\n" " gl_TexCoord[0] = vec4(TexCoords, 0.0, 0.0);\n" " gl_TexCoord[1] = vec4(LMCoords, 0.0, 0.0);\n" - " gl_Position = gl_ModelViewProjectionMatrix * vec4(Vert, 1.0);\n" + " gl_Position = gl_ModelViewProjectionMatrix * Vert;\n" " FogFragCoord = gl_Position.w;\n" "}\n";