summaryrefslogtreecommitdiff
path: root/user/mesa/intel.patch
blob: 10871fc7ccf12023ffaab78d0087328f0da7ffca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
--- mesa-18.1.3/src/mesa/drivers/dri/i965/brw_bufmgr.h	2018-06-29 13:47:29.000000000 -0400
+++ mesa-18.1.3/src/mesa/drivers/dri/i965/brw_bufmgr.h	2018-07-24 03:18:37.479847335 -0400
@@ -37,6 +37,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
+#include <time.h>
 #include "util/u_atomic.h"
 #include "util/list.h"
 
--- mesa-18.1.3/src/intel/vulkan/anv_entrypoints_gen.py	2018-07-24 03:15:05.009848837 -0400
+++ mesa-18.1.3/src/intel/vulkan/anv_entrypoints_gen.py	2018-07-24 03:12:21.739849990 -0400
@@ -91,7 +91,7 @@
 % endfor
 """, output_encoding='utf-8')
 
-TEMPLATE_C = Template(u"""\
+TEMPLATE_C = Template("""\
 /*
  * Copyright © 2015 Intel Corporation
  *
@@ -145,7 +145,7 @@
 /* Hash table stats:
  * size ${len(strmap.sorted_strings)} entries
  * collisions entries:
-% for i in xrange(10):
+% for i in range(10):
  *     ${i}${'+' if i == 9 else ' '}     ${strmap.collisions[i]}
 % endfor
  */
@@ -388,7 +388,7 @@
 
     def bake(self):
         self.sorted_strings = \
-            sorted(self.strings.values(), key=lambda x: x.string)
+            sorted(list(self.strings.values()), key=lambda x: x.string)
         offset = 0
         for entry in self.sorted_strings:
             entry.offset = offset
@@ -507,7 +507,7 @@
             assert e.core_version is None
             e.extensions.append(ext)
 
-    return [e for e in entrypoints.itervalues() if e.enabled]
+    return [e for e in list(entrypoints.values()) if e.enabled]
 
 
 def get_entrypoints_defines(doc):
--- mesa-18.1.3/src/intel/vulkan/anv_extensions.py	2018-06-29 13:47:29.000000000 -0400
+++ mesa-18.1.3/src/intel/vulkan/anv_extensions.py	2018-07-24 03:07:13.599852168 -0400
@@ -146,14 +146,32 @@
         patch = self.patch if self.patch is not None else 0
         return (self.major << 22) | (self.minor << 12) | patch
 
-    def __cmp__(self, other):
+    def __lt__(self, other):
         # If only one of them has a patch version, "ignore" it by making
         # other's patch version match self.
         if (self.patch is None) != (other.patch is None):
             other = copy.copy(other)
             other.patch = self.patch
 
-        return self.__int_ver().__cmp__(other.__int_ver())
+        return self.__int_ver() < other.__int_ver()
+
+    def __gt__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() > other.__int_ver()
+
+    def __eq__(self, other):
+        # If only one of them has a patch version, "ignore" it by making
+        # other's patch version match self.
+        if (self.patch is None) != (other.patch is None):
+            other = copy.copy(other)
+            other.patch = self.patch
+
+        return self.__int_ver() == other.__int_ver()
 
 
 MAX_API_VERSION = VkVersion('0.0.0')