qemu-e2k/hw/display
Marc-André Lureau a41e2d97f9 virtio-gpu: reset gfx resources in main thread
Calling OpenGL from different threads can have bad consequences if not
carefully reviewed. It's not generally supported. In my case, I was
debugging a crash in glDeleteTextures from OPENGL32.DLL, where I asked
qemu for gl=es, and thus ANGLE implementation was expected. libepoxy did
resolution of the global pointer for glGenTexture to the GLES version
from the main thread. But it resolved glDeleteTextures to the GL
version, because it was done from a different thread without correct
context. Oops.

Let's stick to the main thread for GL calls by using a BH.

Note: I didn't use atomics for reset_finished check, assuming the BQL
will provide enough of sync, but I might be wrong.

Acked-by: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230726173929.690601-3-marcandre.lureau@redhat.com>
2023-08-07 15:45:45 +04:00
..
acpi-vga-stub.c
acpi-vga.c
artist.c
ati_2d.c
ati_dbg.c
ati_int.h
ati_regs.h
ati.c
bcm2835_fb.c
blizzard.c
bochs-display.c
cg3.c
cirrus_vga_internal.h
cirrus_vga_isa.c
cirrus_vga_rop2.h
cirrus_vga_rop.h
cirrus_vga.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
dpcd.c
edid-generate.c
edid-region.c
exynos4210_fimd.c
framebuffer.c
framebuffer.h
g364fb.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
i2c-ddc.c
jazz_led.c
Kconfig
macfb.c
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
next-fb.c
omap_dss.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
omap_lcdc.c hw/arm/omap: Drop useless casts from void * to pointer 2023-01-12 17:15:09 +00:00
pl110_template.h
pl110.c
pxa2xx_lcd.c
qxl-logger.c
qxl-render.c ui: rename cursor_{put->unref} 2023-03-13 22:57:39 +04:00
qxl.c hw: replace most qemu_bh_new calls with qemu_bh_new_guarded 2023-04-28 11:31:54 +02:00
qxl.h ui/spice: Require spice-server >= 0.14.0 2023-01-19 13:30:01 +01:00
ramfb-standalone.c
ramfb.c
sii9022.c
sm501.c hw/display/sm501: Remove unneeded increment from loop 2023-05-05 12:34:22 -03:00
ssd0303.c
ssd0323.c
tc6393xb.c
tcx.c
trace-events ui/spice: QXLInterface method set_mm_time() is now dead, drop 2023-01-19 13:30:01 +01:00
trace.h
vga_int.h
vga_regs.h
vga-access.h
vga-helpers.h
vga-isa.c
vga-mmio.c
vga-pci.c
vga.c hw/display: Compile vga.c as target-independent code 2023-04-20 11:25:32 +02:00
vhost-user-gpu-pci.c
vhost-user-gpu.c hw/virtio: fix typo in VIRTIO_CONFIG_IRQ_IDX comments 2023-07-10 18:59:32 -04:00
vhost-user-vga.c
virtio-gpu-base.c virtio-gpu: free BHs, by implementing unrealize 2023-08-07 15:45:25 +04:00
virtio-gpu-gl.c
virtio-gpu-pci-gl.c
virtio-gpu-pci.c
virtio-gpu-udmabuf-stubs.c
virtio-gpu-udmabuf.c virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties 2023-07-17 15:22:28 +04:00
virtio-gpu-virgl.c virtio-gpu-virgl: use D3D11_SHARE_TEXTURE when available 2023-06-27 17:08:56 +02:00
virtio-gpu.c virtio-gpu: reset gfx resources in main thread 2023-08-07 15:45:45 +04:00
virtio-vga-gl.c
virtio-vga.c
virtio-vga.h
vmware_vga.c ui: rename cursor_{put->unref} 2023-03-13 22:57:39 +04:00
xenfb.c hw/xen: Use XEN_PAGE_SIZE in PV backend drivers 2023-03-07 17:04:30 +00:00
xlnx_dp.c