Re: eglInitialize
Alberich de megres <[email protected]>
| Newsgroups | gmane.comp.video.mesa3d.user |
|---|---|
| Message-ID | <[email protected]> |
I went, but i got weird stuffs, so there's something i'm missing. I will try to contact someone on wayland project. Thanks for the reply and the support!! On Sun, Jan 9, 2011 at 3:37 PM, Slavko Glamocanin <[email protected]> wrote: > The wayland project is using those technologies. Try going trough its > sources to see whats going on. And it does work:) > BR, > Slavko > > On Sun, Jan 9, 2011 at 2:39 PM, Alberich de megres <[email protected]> > wrote: >> >> sorry to insist, but anyone can helpme with my problem? >> Or point me to some manual-tutorial about how to setup drm + kms + egl >> from? >> >> thanks! >> >> >> On Fri, Dec 31, 2010 at 4:35 PM, Alberich de megres >> <[email protected]> wrote: >> > I'm using: >> > >> > - libdrm 2.4.23 with nouveau support >> > - Mesa from git repo (las update Dec 14th) >> > - Nvidia NV43 device (Geforce go 6200/6400) >> > - using nouveau >> > - kernel 2.6.36 custom with this config: >> > graphics support >> > |-> <M> Direct Rendering Manager >> > |-> <M> Low level video output switch controls >> > |-> {*} Support for frame buffer devices >> > |->[*] Enable Video Mode Handling Helpers >> > |->[*] Enable Tile blitting support >> > |-> <M> VGA 16-color >> > |-> [*] Vesa VGA graphics >> > |-> VGA text console >> > |-> All options built in kernel >> > >> > modetest says my connector id is 7 so I tried modetest -s 7:1 with this >> > error >> > DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument >> > Assuming 131072Kb available aperture size >> > May lead to reduced performance or incorrect rendering >> > get chip id failed; -1 >> > param 4, val: 0 >> > failed to alloc buffer: Invalid argument >> > >> > >> > Thanks!! >> > >> > On Fri, Dec 31, 2010 at 3:41 PM, Chia-I Wu <[email protected]> wrote: >> >> On Fri, Dec 31, 2010 at 10:06 PM, Alberich de megres >> >> <[email protected]> wrote: >> >>> sorry to repost again, >> >>> but I attached a screenshoot with what happens to me. >> >>> >> >>> With single buffer, just adding glFlush() and a black clear color i >> >>> get the result I want. >> >>> But if I change the color, no matter wich, i allways the same get the >> >>> screen attached (even with the same color) >> >> I am not sure what goes wrong. You might want to try modeset from >> >> libdrm to see if kernel modesetting is working for you (use the -s >> >> option). It might also be helpful to list your >> >> hardware/kernel/mesa/drm versions so that others with a similar >> >> environment may help. >> >> >> >>> thanks! >> >>> >> >>> On Fri, Dec 31, 2010 at 12:32 PM, Alberich de megres >> >>> <[email protected]> wrote: >> >>>> Oh, sorry for the type, i was trying different clear color and at the >> >>>> end I didn't change it back. >> >>>> >> >>>> But on wayland the server doesn't call glFlush. How it render/draws >> >>>> the background then? >> >>>> >> >>>> Also I tried drmModePageFlip, to change buffers, but i cannot get rid >> >>>> of these wierd things (like lots of thin columns). >> >>>> >> >>>> thanks! >> >>>> >> >>>> On Fri, Dec 31, 2010 at 10:11 AM, Chia-I Wu <[email protected]> >> >>>> wrote: >> >>>>> On Thu, Dec 30, 2010 at 2:26 AM, Alberich de megres >> >>>>> <[email protected]> wrote: >> >>>>>> I found my error, I compiled a kernel and forgot some kms options. >> >>>>>> So >> >>>>>> now i can get a DRMDisplay >> >>>>>> >> >>>>>> But, now I got a different problem: >> >>>>>> I can set a mode, using drm. And I set up the minimun so i should >> >>>>>> be >> >>>>>> able to clean the backgound (or the buffer) to white and see the >> >>>>>> screen on white. But what i really get is weird things like lots of >> >>>>>> columns... >> >>>>>> >> >>>>>> Is there some place where i can read about drm+egl? My init code is >> >>>>>> barely copy+paste from wayland.. >> >>>>>> >> >>>>>> I attached the code, don't blame me for the code (copy+paste stuff) >> >>>>>> i'm only trying to understand how drm+egl works so i can create one >> >>>>>> by >> >>>>>> my own. >> >>>>> Since you are rendering to rbo[0], you should use fb_id[0] in >> >>>>> drmModeSetCrtc. You also need to call glFlush at the end of >> >>>>> draw_scene. The clear color is black, not white as you said. >> >>>>> >> >>>>> These should be enough to see the correct result on screen. But you >> >>>>> might want to go further to implement double buffering (switch >> >>>>> between >> >>>>> rbo[0] and rbo[1], and flip between fb_id[0] and fb_id[1]). >> >>>>> >> >>>>>> thanks! >> >>>>>> >> >>>>>> >> >>>>>> On Mon, Dec 20, 2010 at 1:55 PM, Chia-I Wu <[email protected]> >> >>>>>> wrote: >> >>>>>>> On Tue, Dec 14, 2010 at 5:24 PM, Alberich de megres >> >>>>>>> <[email protected]> wrote: >> >>>>>>>> Hi !! >> >>>>>>>> >> >>>>>>>> I got a problem while initializing egl, using the source on git >> >>>>>>>> repo: >> >>>>>>>> git clone git://anongit.freedesktop.org/mesa/mesa >> >>>>>>>> >> >>>>>>>> So what i do is first >> >>>>>>>> >> >>>>>>>> display = (EGLDisplay) eglGetDRMDisplayMESA(fd); >> >>>>>>>> if (display == NULL) return -1; >> >>>>>>>> >> >>>>>>>> if (!eglInitialize(display, &major, &minor)) { >> >>>>>>>> ... error check >> >>>>>>>> } >> >>>>>>>> >> >>>>>>>> When I do that i receive a message: >> >>>>>>>> libEGL warning: failed to create DRM screen >> >>>>>>>> >> >>>>>>>> And sometimes i get this other on the same point: >> >>>>>>>> libEGL warning: failed to create DRM screen >> >>>>>>>> libEGL warning: EGL-DRI2: malformed or no PCI ID >> >>>>>>>> >> >>>>>>>> I tried with both nourveau modeset=1, and radeon modeset=1 >> >>>>>>>> >> >>>>>>>> I compiled libdrm with the following options: >> >>>>>>>> ./configure --enable-nouveau-experimental-api >> >>>>>>>> --enable-vmwgfx-experimental-api >> >>>>>>>> >> >>>>>>>> And mesa with the following: >> >>>>>>>> ./configure --with-dri-drivers=nouveau --enable-glx-tls >> >>>>>>>> --with-driver=dri --enable-xcb --disable-glut --enable-egl >> >>>>>>>> --enable-gles2 --with-egl-platforms=drm --disable-gallium >> >>>>>>>> >> >>>>>>>> Also i tried those recomended on wayland site: >> >>>>>>>> ./configure --enable-egl --enable-gles2 >> >>>>>>>> >> >>>>>>>> Can any one point me some light? >> >>>>>>> The configure options look fine. It is not clear what might have >> >>>>>>> gone >> >>>>>>> wrong. Can you try again with EGL_LOG_LEVEL=debug set? >> >>>>>>> >> >>>>>>>> thanks! >> >>>>>>>> Albert >> >>>>>>>> _______________________________________________ >> >>>>>>>> mesa-users mailing list >> >>>>>>>> [email protected] >> >>>>>>>> http://lists.freedesktop.org/mailman/listinfo/mesa-users >> >>>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>>> -- >> >>>>>>> [email protected] >> >>>>>>> >> >>>>>> >> >>>>> >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> [email protected] >> >>>>> >> >>>> >> >>> >> >> >> >> >> >> >> >> -- >> >> [email protected] >> >> >> > >> _______________________________________________ >> mesa-users mailing list >> [email protected] >> http://lists.freedesktop.org/mailman/listinfo/mesa-users > > > > -- > Slavko Glamočanin > http://naprave.net > GSM: 0038631847589 > _______________________________________________ mesa-users mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-users