Crash before startup


Yet another crash was introduced in GIT master. Since I last did a “git pull” yesterday and successfully ran Hifi, this issue was introduced during the last 24 hours. Here is the console log:



Found the code guilty for the crash: …/libraries/gpu/src/gpu/DrawViewportQuadTransformTexcoord.slv, line 28:

vec4 pos = UNIT_QUAD[gl_VertexID];

I was able to temporarily make the crash stop by changing that to:

vec4 pos = UNIT_QUAD[0];

So for some reason, gl_VertexID is not recognized in this file. Maybe because the viewport doesn’t have actual vertices (a wild guess)? Also note that I am using MESA (10.3.7) on Linux openSUSE 13.2 x64.



I think I saw the same issue yesterday. This is on Linux.

It’ll be such a shame if they bump the minimum OpenGL requirement to 430.

Anyways, here are temporary workarounds (which probably break rendering in other ways, but at least it seems to load again):

EDIT: just did a fresh git pull and had to apply a workaround again. What I went with this time was the following patch (which effectively replaces gl_VertexID with zero across all shaders simultaneously):

diff --git a/libraries/gpu/src/gpu/Config.slh b/libraries/gpu/src/gpu/Config.slh
index 76be161..4557389 100644
--- a/libraries/gpu/src/gpu/Config.slh
+++ b/libraries/gpu/src/gpu/Config.slh
@@ -24,7 +24,8 @@
     <@def VERSION_HEADER #version 120
-#extension GL_EXT_gpu_shader4 : enable@>
+#extension GL_EXT_gpu_shader4 : enable
+#define gl_VertexID 0 @>


Thank you for the info! The changes in Config.slh weren’t needed, just in DrawViewportQuadTransformTexcoord.slv. I don’t seem to need to do this in any other files that reference gl_VertexID either, only that one. Or at least so far I haven’t gotten any crashes from these… could be that nothing using them was rendered in my view?

And are you talking about OpenGL 4? I don’t think the developers would do something as reckless as making that a requirement. Fewer drivers support it, especially the default Linux libraries (Mesa, Gallium, AMD Barts). It will be years from now that OpenGL 4.x can be safely relied on.