mesa/lima: don't call 'close()' for non-libc fd

Fixes #4702
This commit is contained in:
Christian Prochaska 2022-12-14 09:15:55 +01:00 committed by Christian Helmuth
parent 2c92fc4b6f
commit 16ce6b7acc
2 changed files with 18 additions and 1 deletions

View File

@ -1 +1 @@
5762ad18c4b5d48ad6b8651fc554e65d656e144f
a5a32fe6f44a46ff1eed62bf585a2b445b939e44

View File

@ -1,3 +1,20 @@
--- a/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c
--- b/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c
@@ -90,8 +93,14 @@ lima_fence_get_fd(struct pipe_screen *pscreen,
static void
lima_fence_destroy(struct pipe_fence_handle *fence)
{
+#if 0
+ /*
+ * On Genode the fd is not created by the libc
+ * (see ioctl_lima.cc).
+ */
if (fence->fd >= 0)
close(fence->fd);
+#endif
FREE(fence);
}
--- a/src/lib/mesa/src/loader/loader.c
--- b/src/lib/mesa/src/loader/loader.c
@@ -473,6 +473,9 @@