|
From: | Richard Henderson |
Subject: | Re: [PULL 33/33] ui/dbus: use shared D3D11 Texture2D when possible |
Date: | Thu, 29 Jun 2023 09:45:12 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 6/29/23 09:40, Richard Henderson wrote:
On 6/27/23 15:02, marcandre.lureau@redhat.com wrote:static void dbus_update_gl_cb(GObject *source_object, - GAsyncResult *res, - gpointer user_data) + GAsyncResult *res, + gpointer user_data) { g_autoptr(GError) err = NULL; DBusDisplayListener *ddl = user_data; + bool success; + +#ifdef CONFIG_GBM + success = qemu_dbus_display1_listener_call_update_dmabuf_finish( + ddl->proxy, res, &err); +#endif + +#ifdef WIN32 + success = qemu_dbus_display1_listener_win32_d3d11_call_update_texture2d_finish( + ddl->d3d11_proxy, res, &err); + d3d_texture2d_acquire0(ddl->d3d_texture, &error_warn); +#endif - if (!qemu_dbus_display1_listener_call_update_dmabuf_finish(ddl->proxy, - res, &err)) { + if (!success) { error_report("Failed to call update: %s", err->message); }With neither CONFIG_GBM nor WIN32, success is not set:../alt/ui/dbus-listener.c:199:10: error: variable 'success' is uninitialized when used here [-Werror,-Wuninitialized]if (!success) { ^~~~~~~
Bah. Working around that, the whole function isn't used under these same conditions:../alt/ui/dbus-listener.c:180:13: error: unused function 'dbus_update_gl_cb' [-Werror,-Wunused-function]
static void dbus_update_gl_cb(GObject *source_object, GAsyncResult *res, ^ 1 error generated. Definitely some cleanup to the ifdefs required... r~
[Prev in Thread] | Current Thread | [Next in Thread] |