[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/10] ui/gtk-egl: Fix build failure when libgbm is not available
From: |
Paolo Bonzini |
Subject: |
[PULL 10/10] ui/gtk-egl: Fix build failure when libgbm is not available |
Date: |
Mon, 8 Nov 2021 15:36:16 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs
to be regenerated when reinitializing egl") we get on Ubuntu
18.04.4 LTS and Debian Buster (oldstable):
$ ../configure --enable-virglrenderer
[...]
ui/gtk-egl.c: In function 'gd_egl_refresh':
ui/gtk-egl.c:159:13: error: implicit declaration of function
'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
159 | egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
[-Werror,-Wstrict-prototypes]
ui/gtk-egl.c:159:13: error: nested extern declaration of
'egl_dmabuf_release_texture' [-Werror=nested-externs]
Fix by restricting the egl_dmabuf_release_texture() call to the
availability of the generic buffer management library (libgbm).
Fixes: 4872a023a593e6519b272a
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reported-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211108083129.1262040-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
ui/gtk-egl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index f2026e4b5c..45cb67712d 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -155,10 +155,12 @@ 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);
}
+#ifdef CONFIG_GBM
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);
}
+#endif
}
graphic_hw_update(dcl->con);
--
2.33.1
- [PULL 00/10] Misc QEMU bugfixes for 6.2 hard freeze, Paolo Bonzini, 2021/11/08
- [PULL 01/10] target-i386: mmu: use pg_mode instead of HF_LMA_MASK, Paolo Bonzini, 2021/11/08
- [PULL 06/10] configure: simplify calls to meson_quote, Paolo Bonzini, 2021/11/08
- [PULL 08/10] configure: propagate --extra-cflags and --extra-ldflags to meson compile tests, Paolo Bonzini, 2021/11/08
- [PULL 02/10] target-i386: mmu: fix handling of noncanonical virtual addresses, Paolo Bonzini, 2021/11/08
- [PULL 04/10] meson: perform snappy test with the C++ compiler if used, Paolo Bonzini, 2021/11/08
- [PULL 07/10] configure: preserve CFLAGS, CXXFLAGS and LDFLAGS in config.status, Paolo Bonzini, 2021/11/08
- [PULL 03/10] hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands, Paolo Bonzini, 2021/11/08
- [PULL 09/10] configure: ignore preexisting QEMU_*FLAGS envvars, Paolo Bonzini, 2021/11/08
- [PULL 10/10] ui/gtk-egl: Fix build failure when libgbm is not available,
Paolo Bonzini <=
- [PULL 05/10] docs: adjust for demise of scripts/create_config, Paolo Bonzini, 2021/11/08
- Re: [PULL 00/10] Misc QEMU bugfixes for 6.2 hard freeze, Richard Henderson, 2021/11/08