[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/6] ui/gtk-egl: guest fb texture needs to be regenerated when
From: |
Dongwon Kim |
Subject: |
[PATCH v2 3/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl |
Date: |
Wed, 3 Nov 2021 23:51:50 -0700 |
If guest fb is backed by dmabuf (blob-resource), the texture bound to the
old context needs to be recreated in case the egl is re-initialized (e.g.
new window for vc is created in case of detaching/reattaching of the tab)
v2: call egl_dmabuf_release_texutre instead of putting 0 to dmabuf->texture
(Vivek Kasireddy)
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk-egl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 2164995098..f2026e4b5c 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -155,6 +155,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
}
+ if (vc->gfx.guest_fb.dmabuf) {
+ egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
+ gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
+ }
}
graphic_hw_update(dcl->con);
--
2.30.2
- Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts, Gerd Hoffmann, 2021/11/02
- Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts, Dongwon Kim, 2021/11/02
- Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts, Gerd Hoffmann, 2021/11/03
- [PATCH v2 1/6] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context, Dongwon Kim, 2021/11/04
- [PATCH 2/6] ui/gtk-egl: make sure the right context is set as the current, Dongwon Kim, 2021/11/04
- [PATCH v2 3/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl,
Dongwon Kim <=
- [PATCH v3 5/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts, Dongwon Kim, 2021/11/04
- [PATCH 4/6] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound, Dongwon Kim, 2021/11/04
- [PATCH v2 6/6] ui/gtk-egl: blitting partial guest fb to the proper scanout surface, Dongwon Kim, 2021/11/04
- Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts, Dongwon Kim, 2021/11/04
- Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts, Gerd Hoffmann, 2021/11/04