@grepp/detect-gpu 5.0.87 → 5.0.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/benchmarks/d-amd.json +9 -14
- package/dist/benchmarks/d-geforce.json +7 -2
- package/dist/benchmarks/d-intel.json +5 -0
- package/dist/benchmarks/d-nvidia.json +7 -2
- package/dist/benchmarks/d-radeon.json +9 -14
- package/dist/benchmarks/m-apple-ipad.json +4 -4
- package/dist/benchmarks/m-apple.json +4 -4
- package/dist/detect-gpu.esm.js +1 -1
- package/dist/detect-gpu.esm.js.map +1 -1
- package/dist/detect-gpu.umd.js +1 -1
- package/dist/detect-gpu.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -2957,6 +2957,11 @@
|
|
|
2957
2957
|
"860m amd radeon",
|
|
2958
2958
|
0,
|
|
2959
2959
|
[
|
|
2960
|
+
[
|
|
2961
|
+
1920,
|
|
2962
|
+
1200,
|
|
2963
|
+
59
|
|
2964
|
+
],
|
|
2960
2965
|
[
|
|
2961
2966
|
2880,
|
|
2962
2967
|
1800,
|
|
@@ -7506,7 +7511,7 @@
|
|
|
7506
7511
|
[
|
|
7507
7512
|
3584,
|
|
7508
7513
|
2240,
|
|
7509
|
-
|
|
7514
|
+
60
|
|
7510
7515
|
]
|
|
7511
7516
|
]
|
|
7512
7517
|
],
|
|
@@ -8224,8 +8229,8 @@
|
|
|
8224
8229
|
0,
|
|
8225
8230
|
[
|
|
8226
8231
|
[
|
|
8227
|
-
|
|
8228
|
-
|
|
8232
|
+
5120,
|
|
8233
|
+
2880,
|
|
8229
8234
|
60
|
|
8230
8235
|
]
|
|
8231
8236
|
]
|
|
@@ -11539,11 +11544,6 @@
|
|
|
11539
11544
|
1920,
|
|
11540
11545
|
1080,
|
|
11541
11546
|
75
|
|
11542
|
-
],
|
|
11543
|
-
[
|
|
11544
|
-
3840,
|
|
11545
|
-
2160,
|
|
11546
|
-
59
|
|
11547
11547
|
]
|
|
11548
11548
|
]
|
|
11549
11549
|
],
|
|
@@ -12075,12 +12075,7 @@
|
|
|
12075
12075
|
[
|
|
12076
12076
|
1920,
|
|
12077
12077
|
1080,
|
|
12078
|
-
|
|
12079
|
-
],
|
|
12080
|
-
[
|
|
12081
|
-
3840,
|
|
12082
|
-
2160,
|
|
12083
|
-
701
|
|
12078
|
+
1502
|
|
12084
12079
|
]
|
|
12085
12080
|
]
|
|
12086
12081
|
],
|
|
@@ -5921,7 +5921,7 @@
|
|
|
5921
5921
|
[
|
|
5922
5922
|
1920,
|
|
5923
5923
|
1080,
|
|
5924
|
-
|
|
5924
|
+
611
|
|
5925
5925
|
]
|
|
5926
5926
|
]
|
|
5927
5927
|
],
|
|
@@ -5987,6 +5987,11 @@
|
|
|
5987
5987
|
1920,
|
|
5988
5988
|
1080,
|
|
5989
5989
|
164
|
|
5990
|
+
],
|
|
5991
|
+
[
|
|
5992
|
+
2560,
|
|
5993
|
+
1440,
|
|
5994
|
+
179
|
|
5990
5995
|
]
|
|
5991
5996
|
]
|
|
5992
5997
|
],
|
|
@@ -6301,7 +6306,7 @@
|
|
|
6301
6306
|
[
|
|
6302
6307
|
2560,
|
|
6303
6308
|
1600,
|
|
6304
|
-
|
|
6309
|
+
240
|
|
6305
6310
|
]
|
|
6306
6311
|
]
|
|
6307
6312
|
],
|
|
@@ -6160,7 +6160,7 @@
|
|
|
6160
6160
|
[
|
|
6161
6161
|
1920,
|
|
6162
6162
|
1080,
|
|
6163
|
-
|
|
6163
|
+
611
|
|
6164
6164
|
]
|
|
6165
6165
|
]
|
|
6166
6166
|
],
|
|
@@ -6226,6 +6226,11 @@
|
|
|
6226
6226
|
1920,
|
|
6227
6227
|
1080,
|
|
6228
6228
|
164
|
|
6229
|
+
],
|
|
6230
|
+
[
|
|
6231
|
+
2560,
|
|
6232
|
+
1440,
|
|
6233
|
+
179
|
|
6229
6234
|
]
|
|
6230
6235
|
]
|
|
6231
6236
|
],
|
|
@@ -6540,7 +6545,7 @@
|
|
|
6540
6545
|
[
|
|
6541
6546
|
2560,
|
|
6542
6547
|
1600,
|
|
6543
|
-
|
|
6548
|
+
240
|
|
6544
6549
|
]
|
|
6545
6550
|
]
|
|
6546
6551
|
],
|
|
@@ -995,6 +995,11 @@
|
|
|
995
995
|
"860m amd radeon",
|
|
996
996
|
0,
|
|
997
997
|
[
|
|
998
|
+
[
|
|
999
|
+
1920,
|
|
1000
|
+
1200,
|
|
1001
|
+
59
|
|
1002
|
+
],
|
|
998
1003
|
[
|
|
999
1004
|
2880,
|
|
1000
1005
|
1800,
|
|
@@ -5544,7 +5549,7 @@
|
|
|
5544
5549
|
[
|
|
5545
5550
|
3584,
|
|
5546
5551
|
2240,
|
|
5547
|
-
|
|
5552
|
+
60
|
|
5548
5553
|
]
|
|
5549
5554
|
]
|
|
5550
5555
|
],
|
|
@@ -6262,8 +6267,8 @@
|
|
|
6262
6267
|
0,
|
|
6263
6268
|
[
|
|
6264
6269
|
[
|
|
6265
|
-
|
|
6266
|
-
|
|
6270
|
+
5120,
|
|
6271
|
+
2880,
|
|
6267
6272
|
60
|
|
6268
6273
|
]
|
|
6269
6274
|
]
|
|
@@ -9577,11 +9582,6 @@
|
|
|
9577
9582
|
1920,
|
|
9578
9583
|
1080,
|
|
9579
9584
|
75
|
|
9580
|
-
],
|
|
9581
|
-
[
|
|
9582
|
-
3840,
|
|
9583
|
-
2160,
|
|
9584
|
-
59
|
|
9585
9585
|
]
|
|
9586
9586
|
]
|
|
9587
9587
|
],
|
|
@@ -10113,12 +10113,7 @@
|
|
|
10113
10113
|
[
|
|
10114
10114
|
1920,
|
|
10115
10115
|
1080,
|
|
10116
|
-
|
|
10117
|
-
],
|
|
10118
|
-
[
|
|
10119
|
-
3840,
|
|
10120
|
-
2160,
|
|
10121
|
-
701
|
|
10116
|
+
1502
|
|
10122
10117
|
]
|
|
10123
10118
|
]
|
|
10124
10119
|
],
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
[
|
|
62
62
|
2160,
|
|
63
63
|
1620,
|
|
64
|
-
|
|
64
|
+
59,
|
|
65
65
|
"apple ipad 8th gen (wifi+cellular)"
|
|
66
66
|
],
|
|
67
67
|
[
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
2266,
|
|
191
191
|
1488,
|
|
192
192
|
60,
|
|
193
|
-
"apple ipad mini (a17)"
|
|
193
|
+
"apple ipad mini 7th gen cellular (a17)"
|
|
194
194
|
]
|
|
195
195
|
]
|
|
196
196
|
],
|
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
2732,
|
|
345
345
|
2048,
|
|
346
346
|
60,
|
|
347
|
-
"apple ipad air 13-inch 7th gen (wifi
|
|
347
|
+
"apple ipad air 13-inch 7th gen (wifi)"
|
|
348
348
|
]
|
|
349
349
|
]
|
|
350
350
|
],
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
[
|
|
384
384
|
2752,
|
|
385
385
|
2064,
|
|
386
|
-
|
|
386
|
+
120,
|
|
387
387
|
"apple ipad pro m5 13 inch"
|
|
388
388
|
]
|
|
389
389
|
]
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
[
|
|
94
94
|
1334,
|
|
95
95
|
750,
|
|
96
|
-
|
|
96
|
+
75,
|
|
97
97
|
"apple iphone se (2nd gen)"
|
|
98
98
|
],
|
|
99
99
|
[
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
[
|
|
152
152
|
1334,
|
|
153
153
|
750,
|
|
154
|
-
|
|
154
|
+
60,
|
|
155
155
|
"apple iphone se (2022)"
|
|
156
156
|
],
|
|
157
157
|
[
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
2532,
|
|
165
165
|
1170,
|
|
166
166
|
60,
|
|
167
|
-
"apple iphone
|
|
167
|
+
"apple iphone 13 pro"
|
|
168
168
|
],
|
|
169
169
|
[
|
|
170
170
|
2778,
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
2778,
|
|
191
191
|
1284,
|
|
192
192
|
60,
|
|
193
|
-
"apple iphone
|
|
193
|
+
"apple iphone 14 pro max"
|
|
194
194
|
]
|
|
195
195
|
]
|
|
196
196
|
],
|
package/dist/detect-gpu.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{d(n.next(e))}catch(e){a(e)}}function c(e){try{d(n.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}d((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const t=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function r(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const n=34962,o="undefined"==typeof window,a=(()=>{if(o)return;const{userAgent:e,platform:t,maxTouchPoints:r}=window.navigator,n=/(iphone|ipod|ipad)/i.test(e),a="iPad"===t||"MacIntel"===t&&r>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(e)||n||a,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e)}})();function i(e,t,r){if(!r)return[t];const o=function(e){const t="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",r="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",o=e.createShader(35633),a=e.createShader(35632),i=e.createProgram();if(!(a&&o&&i))return;e.shaderSource(o,t),e.shaderSource(a,r),e.compileShader(o),e.compileShader(a),e.attachShader(i,o),e.attachShader(i,a),e.linkProgram(i),e.detachShader(i,o),e.detachShader(i,a),e.deleteShader(o),e.deleteShader(a),e.useProgram(i);const c=e.createBuffer();e.bindBuffer(n,c),e.bufferData(n,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const d=e.getAttribLocation(i,"aPosition");e.vertexAttribPointer(d,3,5126,!1,0,0),e.enableVertexAttribArray(d),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const l=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,l),e.deleteProgram(i),e.deleteBuffer(c),l.join("")}(e),i="801621810",c="8016218135",d="80162181161",l=(null==a?void 0:a.isIpad)?[["a7",d,12],["a8",c,15],["a8x",c,15],["a9",c,15],["a9x",c,15],["a10",c,15],["a10x",c,15],["a12",i,15],["a12x",i,15],["a12z",i,15],["a14",i,15],["a15",i,15],["m1",i,15],["m2",i,15]]:[["a7",d,12],["a8",c,12],["a9",c,15],["a10",c,15],["a11",i,15],["a12",i,15],["a13",i,15],["a14",i,15],["a15",i,15],["a16",i,15],["a17",i,15]];let s;"80162181255"===o?s=l.filter(([,,e])=>e>=14):(s=l.filter(([,e])=>e===o),s.length||(s=l));return s.map(([e])=>`apple ${e} gpu`)}class c extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const d=[],l=[];function s(e,t){if(e===t)return 0;const r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let a,i=0;for(;i<n&&e.charCodeAt(i)===t.charCodeAt(i);)i++;if(n-=i,o-=i,0===n)return o;let c,s,f=0,u=0,g=0;for(;u<n;)l[u]=e.charCodeAt(i+u),d[u]=++u;for(;g<o;)for(a=t.charCodeAt(i+g),c=g++,f=g,u=0;u<n;u++)s=a===l[u]?c:c+1,c=d[u],f=d[u]=c>f?s>f?f+1:s:s>c?c+1:s;return f}function f(e){return null!=e}const u=(...n)=>e(void 0,[...n],void 0,function*({mobileTiers:n=[0,15,30,60],desktopTiers:d=[0,15,30,60],override:l={},glContext:u,failIfMajorPerformanceCaveat:g=!1,benchmarksURL:h="https://unpkg.com/@grepp/detect-gpu@5.0.
|
|
1
|
+
function e(e,t,r,n){return new(r||(r=Promise))(function(o,a){function i(e){try{d(n.next(e))}catch(e){a(e)}}function c(e){try{d(n.throw(e))}catch(e){a(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,c)}d((n=n.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const t=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function r(e){return e=e.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const n=34962,o="undefined"==typeof window,a=(()=>{if(o)return;const{userAgent:e,platform:t,maxTouchPoints:r}=window.navigator,n=/(iphone|ipod|ipad)/i.test(e),a="iPad"===t||"MacIntel"===t&&r>0&&!window.MSStream;return{isIpad:a,isMobile:/android/i.test(e)||n||a,isSafari12:/Version\/12.+Safari/.test(e),isFirefox:/Firefox/.test(e)}})();function i(e,t,r){if(!r)return[t];const o=function(e){const t="\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n ",r="\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n ",o=e.createShader(35633),a=e.createShader(35632),i=e.createProgram();if(!(a&&o&&i))return;e.shaderSource(o,t),e.shaderSource(a,r),e.compileShader(o),e.compileShader(a),e.attachShader(i,o),e.attachShader(i,a),e.linkProgram(i),e.detachShader(i,o),e.detachShader(i,a),e.deleteShader(o),e.deleteShader(a),e.useProgram(i);const c=e.createBuffer();e.bindBuffer(n,c),e.bufferData(n,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const d=e.getAttribLocation(i,"aPosition");e.vertexAttribPointer(d,3,5126,!1,0,0),e.enableVertexAttribArray(d),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const l=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,l),e.deleteProgram(i),e.deleteBuffer(c),l.join("")}(e),i="801621810",c="8016218135",d="80162181161",l=(null==a?void 0:a.isIpad)?[["a7",d,12],["a8",c,15],["a8x",c,15],["a9",c,15],["a9x",c,15],["a10",c,15],["a10x",c,15],["a12",i,15],["a12x",i,15],["a12z",i,15],["a14",i,15],["a15",i,15],["m1",i,15],["m2",i,15]]:[["a7",d,12],["a8",c,12],["a9",c,15],["a10",c,15],["a11",i,15],["a12",i,15],["a13",i,15],["a14",i,15],["a15",i,15],["a16",i,15],["a17",i,15]];let s;"80162181255"===o?s=l.filter(([,,e])=>e>=14):(s=l.filter(([,e])=>e===o),s.length||(s=l));return s.map(([e])=>`apple ${e} gpu`)}class c extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const d=[],l=[];function s(e,t){if(e===t)return 0;const r=e;e.length>t.length&&(e=t,t=r);let n=e.length,o=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-o);)n--,o--;let a,i=0;for(;i<n&&e.charCodeAt(i)===t.charCodeAt(i);)i++;if(n-=i,o-=i,0===n)return o;let c,s,f=0,u=0,g=0;for(;u<n;)l[u]=e.charCodeAt(i+u),d[u]=++u;for(;g<o;)for(a=t.charCodeAt(i+g),c=g++,f=g,u=0;u<n;u++)s=a===l[u]?c:c+1,c=d[u],f=d[u]=c>f?s>f?f+1:s:s>c?c+1:s;return f}function f(e){return null!=e}const u=(...n)=>e(void 0,[...n],void 0,function*({mobileTiers:n=[0,15,30,60],desktopTiers:d=[0,15,30,60],override:l={},glContext:u,failIfMajorPerformanceCaveat:g=!1,benchmarksURL:h="https://unpkg.com/@grepp/detect-gpu@5.0.90/dist/benchmarks"}={}){const p={};if(o)return{tier:0,type:"SSR"};const{isIpad:m=!!(null==a?void 0:a.isIpad),isMobile:v=!!(null==a?void 0:a.isMobile),screenSize:w=window.screen,loadBenchmarks:x=t=>e(void 0,void 0,void 0,function*(){const e=h.endsWith("/")?h:`${h}/`,r=yield fetch(`${e}${t}`).then(e=>e.json());if(parseInt(r.shift().split(".")[0],10)<4)throw new c("Detect GPU benchmark data is out of date. Please update to version 4x");return r})}=l;let{renderer:A}=l;const P=(e,t,r,n,o)=>({device:o,fps:n,gpu:r,isMobile:v,tier:e,type:t});let S,b="";if(A)A=r(A),S=[A];else{const e=u||function(e,t=!1){const r={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete r.powerPreference;const n=window.document.createElement("canvas"),o=n.getContext("webgl",r)||n.getContext("experimental-webgl",r);return null!=o?o:void 0}(null==a?void 0:a.isSafari12,g);if(!e)return P(0,"WEBGL_UNSUPPORTED");const t=(null==a?void 0:a.isFirefox)?null:e.getExtension("WEBGL_debug_renderer_info");if(A=t?e.getParameter(t.UNMASKED_RENDERER_WEBGL):e.getParameter(e.RENDERER),!A)return P(1,"FALLBACK");b=A,A=r(A),S=function(e,t,r){return"apple gpu"===t?i(e,t,r):[t]}(e,A,v)}const E=(yield Promise.all(S.map(function(t){return e(this,void 0,void 0,function*(){var e;const r=(e=>{const t=v?["adreno","apple","mali-t","mali","nvidia","powervr","samsung"]:["intel","apple","amd","radeon","nvidia","geforce","adreno"];for(const r of t)if(e.includes(r))return r})(t);if(!r)return;const n=`${v?"m":"d"}-${r}${m?"-ipad":""}.json`,o=p[n]=null!==(e=p[n])&&void 0!==e?e:x(n);let a;try{a=yield o}catch(e){if(e instanceof c)throw e;return}const i=function(e){var t;const r=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==r?void 0:r.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(t);let d=a.filter(([,e])=>e===i);d.length||(d=a.filter(([e])=>e.includes(t)));const l=d.length;if(0===l)return;const f=t.split(/[.,()\[\]/\s]/g).sort().filter((e,t,r)=>0===t||e!==r[t-1]).join(" ");let u,[g,,,,h]=l>1?d.map(e=>[e,s(f,e[2])]).sort(([,e],[,t])=>e-t)[0][0]:d[0],A=Number.MAX_VALUE;const{devicePixelRatio:P}=window,S=w.width*P*w.height*P;for(const e of h){const[t,r]=e,n=t*r,o=Math.abs(S-n);o<A&&(A=o,u=e)}if(!u)return;const[,,b,E]=u;return[A,b,g,E]})}))).filter(f).sort(([e=Number.MAX_VALUE,t],[r=Number.MAX_VALUE,n])=>e===r?t-n:e-r);if(!E.length){const e=t.find(e=>A.includes(e));return e?P(0,"BLOCKLISTED",e):P(1,"FALLBACK",`${A} (${b})`)}const[,y,C,L]=E[0];if(-1===y)return P(0,"BLOCKLISTED",C,y,L);const $=v?n:d;let M=0;for(let e=0;e<$.length;e++)y>=$[e]&&(M=e);return P(M,"BENCHMARK",C,y,L)});export{u as getGPUTier};
|
|
2
2
|
//# sourceMappingURL=detect-gpu.esm.js.map
|