Conversation
|
@metux @cepelinas9000 ping |
| if (glamor_egl->fd >= 0) { | ||
| glamor_egl->gbm = gbm_create_device(glamor_egl->fd); | ||
| if (!glamor_egl->gbm) { | ||
| glamor_egl->gbm = gbm_create_device_by_name(glamor_egl->fd, "dumb"); |
There was a problem hiding this comment.
I'm a bit confused. Isn't that a separate issue / feature that should be a separate commit ?
There was a problem hiding this comment.
split into a separate commit
| static void | ||
| glamor_filter_modifiers(uint32_t *num_modifiers, uint64_t **modifiers, | ||
| EGLBoolean *external_only) | ||
| EGLBoolean *external_only, int linear_only) |
There was a problem hiding this comment.
Not sure, but looks like a separate topic (-> separate commit ?) to me.
Can you please give some bits documentation on what that's actually doing ?
There was a problem hiding this comment.
Split into a separate commit.
This filters all modifiers except DRM_FORMAT_MOD_{LINEAR,INVALID}, when using the dumb gbm backend.
There was a problem hiding this comment.
IOW: when using dumb gbm, it's restricting to linear framebuffer only ?
There was a problem hiding this comment.
Yes.
We still have to read the modifier list, because the linear modifier may not be in the list at all, or it may be external_only, which means we cannot use it.
If the linear modifier cannot be used, we disable glamor's dri3 implementation when we check for at least a supported (format, modifier) pair and find none.
There was a problem hiding this comment.
ok. maybe we should have some little docs on that.
There was a problem hiding this comment.
This the current commit message:
https://github.com/stefan11111/dumb_gbm is a gbm backend
that only uses dumb buffers.
As such, it is very portable, allowing libgbm to be used
on devices where a proper gbm backend with tiled buffer support
isn't available.
What should I add to it?
Also, my earlier response was perhaps a bit incomplete.
With dumb gbm, all buffers created are linear, so they can be thought of as linear framebuffers.
However, it's not like traditional unaccelerated fbdev, with a single front framebuffer where everything is drawn.
With dumb gbm, glamor draws into the (linear) front buffer using gl, and X clients can also draw into the (linear) buffers they get from the X server through DRI3 with gl.
2f3a754 to
eef0014
Compare
If we still have an egl context when `closeScreen` is called, we destroy it here and set it to `EGL_NO_CONTEXT` Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
eef0014 to
84f3b38
Compare
|
This github review & commenting functionality is quite crap ... totally mixes up context :( Just reviewed directly via git ... only one little nitpick: |
The change is mostly cosmetic, bringing this in line with Xephyr's `egl_make_current`. We'll see if we need to do anything fancier if/when we decide to add EGLStream support Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
glamor_egl's glvnd vendor option used to only work with libraries. Now, it will work with driver names too (e.g. intel/iris vs mesa). This code doesn't do much currently, it will be used by subsequent commits. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
84f3b38 to
c81badf
Compare
Before this, the generic glamor egl code from xf86 only worked with a dri fd. However, this is only needed for glamor_egl's dri3 support. Glamor supports having no DRI3 support at all, even if the X server / xf86 ddx driver doesn't implement DRI3 itself. When using glamor's DRI3 implementation, we create a gbm bo for each pixmap we want to export using DRI3. From that bo, we create an `EGLImageKHR`. From this `EGLImageKHR`, we create a texture using `glEGLImageTargetTexture2DOES` and set this newly created texture as the pixmap's texture, for glamor to render into. When not using DRI3, glamor allocates all textures itself, using `glTexImage2D` in `_glamor_create_tex` from `glamor/glamor_fbo.c`. As-is, the generic glamor_egl code doesn't work without a dri fd, because it only tries to get an `EGLDisplay` on the GBM platform. This commit only make glamor handle the case if no fd (-1) is passed to it. It will currently error out cleanly at runtime if this actually happens. Subsequent commits will add support for more egl platforms and drop existing extension requirements, enabling support for more hardware. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
https://github.com/stefan11111/dumb_gbm is a gbm backend that only uses dumb buffers. As such, it is very portable, allowing libgbm to be used on devices where a proper gbm backend with tiled buffer support isn't available. Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
c81badf to
d56eb16
Compare
Done. |
|
@cepelinas9000 Any concerns on your side? |
|
applying on master, i getting small leak: This was when i ran glxgears something 40 times. Or this leak fix should be seperate pr? |
|
This leak is not related to this patch. This patch should fix it: #2198 |
No description provided.