23 | | /* |
24 | | |
25 | | This script is for adjusting the game's default settings based on the |
26 | | user's system configuration details. |
27 | | |
28 | | The game engine itself does some detection of capabilities, so it will |
29 | | enable certain graphical features only when they are supported. |
30 | | This script is for the messier task of avoiding performance problems |
31 | | and driver bugs based on experience of particular system configurations. |
32 | | |
| 23 | /* This script is for adjusting the game's default settings based on the |
| 24 | * user's system configuration details. |
| 25 | * The game engine itself does some detection of capabilities, so it will |
| 26 | * enable certain graphical features only when they are supported. |
| 27 | * This script is for the messier task of avoiding performance problems |
| 28 | * and driver bugs based on experience of particular system configurations. |
35 | | var g_IntelMesaChipsets = [ |
36 | | "Intel(R) 845G", |
37 | | "Intel(R) 830M", |
38 | | "Intel(R) 852GM/855GM", |
39 | | "Intel(R) 865G", |
40 | | "Intel(R) 915G", |
41 | | "Intel (R) E7221G (i915)", |
42 | | "Intel(R) 915GM", |
43 | | "Intel(R) 945G", |
44 | | "Intel(R) 945GM", |
45 | | "Intel(R) 945GME", |
46 | | "Intel(R) G33", |
47 | | "Intel(R) Q35", |
48 | | "Intel(R) Q33", |
49 | | "Intel(R) IGD", |
50 | | "Intel(R) 965Q", |
51 | | "Intel(R) 965G", |
52 | | "Intel(R) 946GZ", |
53 | | "Intel(R) GMA500", // not in current Mesa |
54 | | "Intel(R) 965GM", |
55 | | "Intel(R) 965GME/GLE", |
56 | | "Mobile Intel\xC2\xAE GM45 Express Chipset", // utf-8 decoded as iso-8859-1 |
57 | | "Intel(R) Integrated Graphics Device", |
58 | | "Intel(R) G45/G43", |
59 | | "Intel(R) Q45/Q43", |
60 | | "Intel(R) G41", |
61 | | "Intel(R) B43", |
62 | | "Intel(R) IGDNG_D", // not in current Mesa; looks somewhat like Ironlake |
63 | | "Intel(R) IGDNG_M", // not in current Mesa; looks somewhat like Ironlake |
64 | | "Intel(R) Ironlake Desktop", |
65 | | "Intel(R) Ironlake Mobile", |
66 | | "Intel(R) Sandybridge Desktop", |
67 | | "Intel(R) Sandybridge Mobile", |
68 | | "Intel(R) Sandybridge Server", |
69 | | "Intel(R) Ivybridge Desktop", |
70 | | "Intel(R) Ivybridge Mobile", |
71 | | "Intel(R) Ivybridge Server", |
72 | | "Intel(R) Haswell Desktop", |
73 | | "Intel(R) Haswell Mobile", |
74 | | "Intel(R) Haswell Server", |
75 | | "Unknown Intel Chipset", |
76 | | "*", // dummy value to support IsWorseThanIntelMesa("*") to detect all Intel Mesa devices |
77 | | ]; |
78 | | // Originally generated from Mesa with |
79 | | // perl -lne'print "\t$1," if /chipset = (".*")/' src/mesa/drivers/dri/intel/intel_context.c |
80 | | // Assumed to be roughly ordered by performance. |
81 | | |
82 | | var g_IntelWindowsChipsets = [ |
83 | | "Intel 845G", |
84 | | "Intel 855GM", |
85 | | "Intel 865G", |
86 | | "Intel 915G", |
87 | | "Intel 915GM", |
88 | | "Intel 945G", |
89 | | "Intel 945GM", |
90 | | "Intel 965/963 Graphics Media Accelerator", |
91 | | "Intel Broadwater G", |
92 | | "Intel Bear Lake B", |
93 | | "Intel Pineview Platform", |
94 | | "Intel Eaglelake", |
95 | | "Intel(R) G41 Express Chipset", // Eaglelake |
96 | | "Intel(R) G45/G43 Express Chipset", // Eaglelake |
97 | | "Intel Cantiga", |
98 | | "Mobile Intel(R) 4 Series Express Chipset Family", // probably Cantiga |
99 | | "Intel(R) HD Graphics", // probably Ironlake |
100 | | "Intel(R) Graphics Media Accelerator HD", // no idea |
101 | | "*", |
102 | | ]; |
103 | | // Determined manually from data reports. |
104 | | // See http://en.wikipedia.org/wiki/Intel_GMA for useful listing. |
105 | | |
106 | | var g_IntelMacChipsets = [ |
107 | | "Intel GMA 950", |
108 | | "Intel GMA X3100", |
109 | | "Intel HD Graphics", |
110 | | "Intel HD Graphics 3000", |
111 | | "Unknown Intel Chipset", |
112 | | "*", |
113 | | ]; |
114 | | // Determined manually from data reports. |
115 | | // See http://support.apple.com/kb/HT3246 for useful listing. |
116 | | |
117 | | function IsWorseThanIntelMesa(renderer, chipset) |
118 | | { |
119 | | var target = g_IntelMesaChipsets.indexOf(chipset); |
120 | | if (target == -1) |
121 | | error("Invalid chipset "+chipset); |
122 | | |
123 | | // GL_RENDERER is "Mesa DRI $chipset" or "Mesa DRI $chipset $otherstuff" |
124 | | for (var i = 0; i < target; ++i) |
125 | | { |
126 | | var str = "Mesa DRI " + g_IntelMesaChipsets[i]; |
127 | | if (renderer == str || renderer.substr(0, str.length+1) == str+" ") |
128 | | return true; |
129 | | } |
130 | | |
131 | | return false; |
132 | | } |
133 | | |
134 | | function IsWorseThanIntelWindows(renderer, chipset) |
135 | | { |
136 | | var target = g_IntelWindowsChipsets.indexOf(chipset); |
137 | | if (target == -1) |
138 | | error("Invalid chipset "+chipset); |
139 | | |
140 | | var match = g_IntelWindowsChipsets.indexOf(renderer); |
141 | | if (match != -1 && match < target) |
142 | | return true; |
143 | | |
144 | | return false; |
145 | | } |
146 | | |
147 | | function IsWorseThanIntelMac(renderer, chipset) |
148 | | { |
149 | | var target = g_IntelMacChipsets.indexOf(chipset); |
150 | | if (target == -1) |
151 | | error("Invalid chipset "+chipset); |
152 | | |
153 | | // GL_RENDERER is "$chipset OpenGL Engine" |
154 | | for (var i = 0; i < target; ++i) |
155 | | { |
156 | | var str = g_IntelMacChipsets[i]+" OpenGL Engine"; |
157 | | if (renderer == str) |
158 | | return true; |
159 | | } |
160 | | |
161 | | return false; |
162 | | } |
163 | | |