Comment 7 for bug 1490956

Revision history for this message
Gerry Boland (gerboland) wrote :

Investigating libhybris, I see no evidence for it resolving the symbol incorrectly. Enabling debug & trace modes, and patching it to print each resolved symbol and its address, I see

glGetIntegerv, (nil)
glGenTextures, (nil)
glBindTexture, (nil)
glTexImage2D, (nil)
glTexSubImage2D, (nil)
glDeleteTextures, (nil)
glGetBooleanv, (nil)
glTexParameteri, (nil)
glActiveTexture, (nil)
glPixelStorei, (nil)
glGetTexParameteriv, (nil)
glGetTexParameterfv, (nil)
glTexParameteriv, (nil)
glTexParameterfv, (nil)
glCompressedTexSubImage2D, (nil)
glCompressedTexImage2D, (nil)
glGenerateMipmap, (nil)
HYBRIS constructed!!
glGetString, 0xb6cdfd34
glCreateProgram, 0xb6cde208
glCreateShader, 0xb6cde220
glShaderSource, 0xb6cde7d8
glCompileShader, 0xb6cde1a4
glGetShaderiv, 0xb6cde560
glAttachShader, 0xb6cde024
glLinkProgram, 0xb6cde724
glGetProgramiv, 0xb6cde524
glUseProgram, 0xb6cdea58
glGenTextures, 0xb6cde440
// from here, Qt prints:
Helper: glGenTextures 0x0 0x0 <- should print same address as hybris just returned above
"glTexImage3D" true
"glTexSubImage3D" true
"glCompressedTexImage3D" true
"glCompressedTexSubImage3D" true
glGenTextures 0xdf9250 0x0
Segmentation fault (core dumped)

I had a slight concern that the log shows the first time glGenTextures symbols is asked for, the glesv2 hybris constructor had not completed, so the symbol returned is 0. But the %gnu_indirect_function extension should only replace a non-null address. So above output indicates hybris is acting correctly.