tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

amdgpu progress



With the patch to MesaLib below, X11 starts up for me using the
xf86-video-amdgpu driver and seems to work.

Not sure what acceleration is working though, everything looks to be
enabled in Xorg.0.log but glxinfo reports that it is using llvmpipe.

Index: os_file.c
===================================================================
RCS file: /cvsroot/xsrc/external/mit/MesaLib/dist/src/util/os_file.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 os_file.c
--- os_file.c   9 May 2022 01:23:43 -0000       1.1.1.2
+++ os_file.c   19 Jul 2023 10:17:48 -0000
@@ -213,15 +213,27 @@
 
 #else
 
+#include <sys/stat.h>
+
 int
 os_same_file_description(int fd1, int fd2)
 {
+   struct stat st1, st2;
+
    /* Same file descriptor trivially implies same file description */
    if (fd1 == fd2)
       return 0;
 
-   /* Otherwise we can't tell */
-   return -1;
+   if (fstat(fd1, &st1) != 0)
+      return -1;
+
+   if (fstat(fd2, &st2) != 0)
+      return -1;
+
+   if ((st1.st_dev == st2.st_dev) && (st1.st_ino == st2.st_ino))
+      return 0;
+   else
+      return 3;
 }
 
 #endif


Home | Main Index | Thread Index | Old Index