sample codes: EGLint attribute_list[] = {EGL_SURFACE_TYPE, // this must be first EGL_WINDOW_BIT | EGL_PBUFFER_BIT , EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE}; Test on ubuntu 17.10, use wayland as default. // below call always return false eglChooseConfig(display, attribute_list, &config, 1, &numConfigs); cause/solution src/egl/drivers/dri2/platform_wayland.c dri2_wl_add_configs_for_visuals dri2_conf = dri2_add_config(disp, dri2_dpy->driver_configs[i], - count + 1, EGL_WINDOW_BIT, NULL, dri2_wl_visuals[j].rgba_masks); + count + 1, EGL_WINDOW_BIT | EGL_PBUFFER_BIT | EGL_PIXMAP_BIT, NULL, dri2_wl_visuals[j].rgba_masks);
That's correct, pbuffers are not supported on Wayland by Mesa. I haven't seen another driver which does support them on Wayland. Using FBOs is far better and more performant.
Created attachment 138774 [details] [review] fixed patch someone would help to apply this patch to meas please ? I do not know how to do it.
Created attachment 138775 [details] sample code
(In reply to Daniel Stone from comment #1) > That's correct, pbuffers are not supported on Wayland by Mesa. I haven't > seen another driver which does support them on Wayland. Using FBOs is far > better and more performant. on really ? I just modified mesa like I have mentioned. then eglChooseConfig passed with EGL_PBUFFER_BIT. and my simple example runs well on ubuntu 17.10 and weston(on ubuntu14.04). and eglCreatePbufferSurface also success. by the way, would you tell me what is FBOs please ?
Pixmap surfaces can never be supported on Wayland, as there is no native pixmap type defined by Wayland. FBOs are framebuffer objects, which allow the same thing (offscreen rendering) as pbuffers, but far more flexible, performant, and more widely supported. Here are some resources explaining the basics of FBOs: https://www.khronos.org/opengl/wiki/Framebuffer_Object https://learnopengl.com/Advanced-OpenGL/Framebuffers
(In reply to Daniel Stone from comment #5) > Pixmap surfaces can never be supported on Wayland, as there is no native > pixmap type defined by Wayland. > > FBOs are framebuffer objects, which allow the same thing (offscreen > rendering) as pbuffers, but far more flexible, performant, and more widely > supported. > > Here are some resources explaining the basics of FBOs: > https://www.khronos.org/opengl/wiki/Framebuffer_Object > https://learnopengl.com/Advanced-OpenGL/Framebuffers Ok. I got it. Thank you very much.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.