-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems running on fedora28 #242
Comments
Hi, I think it has worked in the past on Mali GPU but can't remember what was involved; I will have a look back to see if I can find anything. Are you running with X11 server? |
Thanks a lot. I use Fedora LXDE Desktop. |
This https://groups.google.com/forum/#!topic/pi3d/b_JKtQ9e3to was the discussion with peter hess about using pi3d on mali gpu systems - I'm not sure if you can get much info from it. It would be interesting if you could run the code below and let me know the result. Also it would be helpful to know precisely which demos crashed at line 130 and which crashed at line 102 i.e. is it just the use_glx argument to Display.create()? It would be good to get to the bottom of this issue so any testing you can do would be very much appreciated. from ctypes import (c_int, byref, Structure, CDLL, POINTER)
from ctypes.util import find_library
egl_name = find_library("EGL")
print("1.", egl_name)
egl = CDLL(egl_name)
print("2.", egl)
EGL_BUFFER_SIZE = 0x3020
EGL_ALPHA_SIZE = 0x3021
EGL_BLUE_SIZE = 0x3022
EGL_GREEN_SIZE = 0x3023
EGL_RED_SIZE = 0x3024
EGL_DEPTH_SIZE = 0x3025
EGL_STENCIL_SIZE = 0x3026
EGL_SAMPLES = 0x3031
EGL_SURFACE_TYPE = 0x3033
EGL_DEFAULT_DISPLAY = 0
EGLint = c_int
class _EGLDisplay(Structure): ###### EDIT needs this definition to work on gentoo64 is that significant (not needed on laptop 64)
__slots__ = [
]
_EGLDisplay._fields_ = [
('_opaque_struct', EGLint)
]
EGLDisplay = POINTER(_EGLDisplay) #######
class _EGLConfig(Structure):
__slots__ = [
]
_EGLConfig._fields_ = [
('_opaque_struct', EGLint
]
EGLConfig = POINTER(_EGLConfig)
egl.eglGetDisplay.restype = EGLDisplay ####### EDIT needs this on gentoo64
display = egl.eglGetDisplay(EGL_DEFAULT_DISPLAY)
r = egl.eglInitialize(display, None, None)
print("3.", r)
attrib_dict = {EGL_RED_SIZE:"RED_SIZE",
EGL_GREEN_SIZE:"GREEN_SIZE",
EGL_BLUE_SIZE:"BLUE_SIZE",
EGL_DEPTH_SIZE:"DEPTH_SIZE",
EGL_ALPHA_SIZE:"ALPHA_SIZE",
EGL_BUFFER_SIZE:"BUFFER_SIZE",
EGL_SAMPLES:"SAMPLES",
EGL_STENCIL_SIZE:"STENCIL_SIZE",
EGL_SURFACE_TYPE:"SURFACE_TYPE"}
numconfig = EGLint(0)
poss_configs = (EGLConfig * 50)(*(EGLConfig() for _ in range(50)))
r = egl.eglGetConfigs(display, byref(poss_configs), EGLint(len(poss_configs)), byref(numconfig))
print("4.", r)
attr_val = EGLint()
print("5.", numconfig.value)
for i in range(numconfig.value):
print(i, "- ", end="")
for attr in attrib_dict:
r = egl.eglGetConfigAttrib(display, poss_configs[i], attr, byref(attr_val))
print("{}={}, ".format(attrib_dict[attr], attr_val.value), end="")
print("") |
confused...i ran the test program you provided, and no result came out...I remember is it also the reason for the error in line 130??? |
Hi, I've edited the listing with a few more print()s to see where things are going awry. Could you give that a try. Yes, the non-listing of EGL configs and the error on line 130 are probably very much related. line 102 is an assertion that there a context has been created and the context creation function (eglCreateContext) needs to be provided with a config. The three demos that crash at line 130 are the ones that ask for GLX to be used for the creation of the window, so the program skips 72 to 103. But the error is just the first occasion that a GL library function (glGetString) returns something, and it turns out to be a null pointer. Presumably because something else in the configuration has silently failed to work. Let me know what you find |
Thanks for your help~openGL is too hard for me......I retried it today and here's the output:
Then I noticed that these files:
They all target to "libmali.so.r18p0".
I suppose it could be the "right" library???I don't know, but I changed that 3 libEGL.so* files' target file into "libEGL_mesa.so.0.0.0". Then I retried the demos, and found that all the domes used to crash at line 102 now crash at line 130 as well:
emm......Is it because there's something wrong with my mali library? Should I try other libGLES libraries? |
The problem looks similar to those I found trying to get pi3d working with gentoo64 on RaspryPi, so I don't think it's the GL library but the eglGetConfigs is finding surface types 1031 which do have third bit set so are suitable. It would be good track down exactly which line gives the libEGL warning.That's probably key. |
But, having said that... It would make sense to use the mesa library for GL if swapping for EGL. So do try that. |
Hello,
I'm working on a project on my arm platform by using pi3d. But it didn't do well when i tested pi3d demos, and there're generally two types of problems.
Some of them create a window and shut it down suddenly, and the output is like this:
The other demos just output the error info, no windows are created:
And when i open a python3 terminal and type:
it also returns the same error info as above.
My GPU is ARM Mali-T860, and my GL libs:
The text was updated successfully, but these errors were encountered: