Files
camoufox/pythonlib/tests/data/webgl-gtx980-linux.json
T
Jake WriterandClaude Opus 5.5 0d859b3a3d feat(python): draw every identity's WebGL from fpgen
WebGL vendor, renderer, context attributes, extensions, parameters and
shader precisions, for WebGL1 and WebGL2, now come from fpgen's recorded
Firefox devices instead of webgl_data.db, which is deleted with the
camoufox/webgl/ package.

camoufox/webgl.py:
- webgl_for_gpu() traces `webgl` given Firefox, the OS and the GPU, then
  `webgl2` given the chosen `webgl` too, and draws each with one seeded
  random.Random. The GPU and the webgl value are pinned by their fpgen
  lookup index: a dict condition is flattened into leaves that overwrite
  each other, so only the renderer applied and Linux "Mesa" and "AMD"
  Radeon HD 3200 devices came back mixed.
- sample_webgl_for_screen() draws the GPU of a generated identity from
  fpgen's per-OS weights, filtering out software rasterisers, GPUs the OS
  cannot report, discrete GPUs behind a netbook screen and the
  resistFingerprinting "Mozilla" mask before the weighted choice, so there
  is no rejection loop. An empty pool raises.
- The draft/host-dependent extension filter moves over unchanged.

A preset's GPU and a caller's webgl_config pair are looked up as given;
a pair fpgen has never seen from Firefox on that OS raises instead of
falling back to another GPU. generate_context_fingerprint no longer
falls back to the host GPU when the draw fails.

For 10 of the 15 (GPU, OS) pairs the two sources share, one of fpgen's
records converts to exactly the database row on every value the browser
reads. The other five rows (Linux R9 200 and Radeon HD 3200, macOS
Intel HD, and two software rasterisers) are devices fpgen does not carry;
those GPUs now present fpgen's recorded devices instead. The Linux
GTX 980 row is kept as a test fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 21:59:27 -06:00

568 lines
9.2 KiB
JSON

{
"webGl:renderer": "NVIDIA GeForce GTX 980, or similar",
"webGl:vendor": "NVIDIA Corporation",
"webGl:contextAttributes": {
"alpha": true,
"antialias": true,
"depth": true,
"failIfMajorPerformanceCaveat": false,
"powerPreference": "default",
"premultipliedAlpha": true,
"preserveDrawingBuffer": false,
"stencil": false
},
"webGl:supportedExtensions": [
"ANGLE_instanced_arrays",
"EXT_blend_minmax",
"EXT_color_buffer_half_float",
"EXT_depth_clamp",
"EXT_float_blend",
"EXT_frag_depth",
"EXT_shader_texture_lod",
"EXT_sRGB",
"EXT_texture_compression_bptc",
"EXT_texture_compression_rgtc",
"EXT_texture_filter_anisotropic",
"OES_element_index_uint",
"OES_fbo_render_mipmap",
"OES_standard_derivatives",
"OES_texture_float",
"OES_texture_float_linear",
"OES_texture_half_float",
"OES_texture_half_float_linear",
"OES_vertex_array_object",
"WEBGL_color_buffer_float",
"WEBGL_compressed_texture_etc",
"WEBGL_compressed_texture_s3tc",
"WEBGL_compressed_texture_s3tc_srgb",
"WEBGL_debug_renderer_info",
"WEBGL_debug_shaders",
"WEBGL_depth_texture",
"WEBGL_draw_buffers",
"WEBGL_lose_context"
],
"webGl:parameters": {
"2849": 1,
"2884": false,
"2885": 1029,
"2886": 2305,
"2928": [
0,
1
],
"2929": false,
"2930": true,
"2931": 1,
"2932": 513,
"2960": false,
"2961": 0,
"2962": 519,
"2963": 4294967295,
"2964": 7680,
"2965": 7680,
"2966": 7680,
"2967": 0,
"2968": 4294967295,
"2978": [
0,
0,
300,
150
],
"3024": true,
"3042": false,
"3074": null,
"3088": [
0,
0,
300,
150
],
"3089": false,
"3106": [
0,
0,
0,
0
],
"3107": [
true,
true,
true,
true
],
"3314": null,
"3315": null,
"3316": null,
"3317": 4,
"3330": null,
"3331": null,
"3332": null,
"3333": 4,
"3379": 32768,
"3386": [
32768,
32768
],
"3408": 8,
"3410": 8,
"3411": 8,
"3412": 8,
"3413": 8,
"3414": 24,
"3415": 0,
"7936": "Mozilla",
"7937": "NVIDIA GeForce GTX 980, or similar",
"7938": "WebGL 1.0",
"10752": 0,
"32773": [
0,
0,
0,
0
],
"32777": 32774,
"32823": false,
"32824": 0,
"32873": null,
"32877": null,
"32878": null,
"32883": null,
"32926": false,
"32928": false,
"32936": 1,
"32937": 4,
"32938": 1,
"32939": false,
"32968": 0,
"32969": 1,
"32970": 0,
"32971": 1,
"33000": null,
"33001": null,
"33170": 4352,
"33901": [
1,
2047
],
"33902": [
1,
10
],
"34016": 33984,
"34024": 32768,
"34045": null,
"34047": null,
"34068": null,
"34076": 32768,
"34467": null,
"34816": 519,
"34817": 7680,
"34818": 7680,
"34819": 7680,
"34852": null,
"34853": null,
"34854": null,
"34855": null,
"34856": null,
"34857": null,
"34858": null,
"34859": null,
"34860": null,
"34877": 32774,
"34921": 16,
"34930": 32,
"34964": null,
"34965": null,
"35071": null,
"35076": null,
"35077": null,
"35371": null,
"35373": null,
"35374": null,
"35375": null,
"35376": null,
"35377": null,
"35379": null,
"35380": null,
"35657": null,
"35658": null,
"35659": null,
"35660": 32,
"35661": 192,
"35723": null,
"35724": "WebGL GLSL ES 1.0",
"35725": null,
"35738": 5121,
"35739": 6408,
"35968": null,
"35977": null,
"35978": null,
"35979": null,
"36003": 0,
"36004": 4294967295,
"36005": 4294967295,
"36006": null,
"36007": null,
"36063": null,
"36183": null,
"36203": null,
"36345": null,
"36347": 1024,
"36348": 32,
"36349": 1024,
"36387": null,
"36388": null,
"36392": null,
"36795": null,
"37137": null,
"37154": null,
"37157": null,
"37440": false,
"37441": false,
"37443": 37444,
"37444": null,
"37445": "NVIDIA Corporation",
"37446": "NVIDIA GeForce GTX 980, or similar",
"37447": null,
"38449": null
},
"webGl:shaderPrecisionFormats": {
"35633,36336": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35633,36337": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35633,36338": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35633,36339": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35633,36340": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35633,36341": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35632,36336": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35632,36337": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35632,36338": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35632,36339": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35632,36340": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35632,36341": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
}
},
"webGl2:contextAttributes": {
"alpha": true,
"antialias": true,
"depth": true,
"failIfMajorPerformanceCaveat": false,
"powerPreference": "default",
"premultipliedAlpha": true,
"preserveDrawingBuffer": false,
"stencil": false
},
"webGl2:supportedExtensions": [
"EXT_color_buffer_float",
"EXT_depth_clamp",
"EXT_float_blend",
"EXT_texture_compression_bptc",
"EXT_texture_compression_rgtc",
"EXT_texture_filter_anisotropic",
"OES_draw_buffers_indexed",
"OES_texture_float_linear",
"WEBGL_compressed_texture_etc",
"WEBGL_compressed_texture_s3tc",
"WEBGL_compressed_texture_s3tc_srgb",
"WEBGL_debug_renderer_info",
"WEBGL_debug_shaders",
"WEBGL_lose_context"
],
"webGl2:parameters": {
"2849": 1,
"2884": false,
"2885": 1029,
"2886": 2305,
"2928": [
0,
1
],
"2929": false,
"2930": true,
"2931": 1,
"2932": 513,
"2960": false,
"2961": 0,
"2962": 519,
"2963": 4294967295,
"2964": 7680,
"2965": 7680,
"2966": 7680,
"2967": 0,
"2968": 4294967295,
"2978": [
0,
0,
300,
150
],
"3024": true,
"3042": false,
"3074": 1029,
"3088": [
0,
0,
300,
150
],
"3089": false,
"3106": [
0,
0,
0,
0
],
"3107": [
true,
true,
true,
true
],
"3314": 0,
"3315": 0,
"3316": 0,
"3317": 4,
"3330": 0,
"3331": 0,
"3332": 0,
"3333": 4,
"3379": 32768,
"3386": [
32768,
32768
],
"3408": 8,
"3410": 8,
"3411": 8,
"3412": 8,
"3413": 8,
"3414": 24,
"3415": 0,
"7936": "Mozilla",
"7937": "NVIDIA GeForce GTX 980, or similar",
"7938": "WebGL 2.0",
"10752": 0,
"32773": [
0,
0,
0,
0
],
"32777": 32774,
"32823": false,
"32824": 0,
"32873": null,
"32877": 0,
"32878": 0,
"32883": 16384,
"32926": false,
"32928": false,
"32936": 1,
"32937": 4,
"32938": 1,
"32939": false,
"32968": 0,
"32969": 1,
"32970": 0,
"32971": 1,
"33000": 1048576,
"33001": 1048576,
"33170": 4352,
"33901": [
1,
2047
],
"33902": [
1,
1
],
"34016": 33984,
"34024": 32768,
"34045": 15,
"34047": null,
"34068": null,
"34076": 32768,
"34467": null,
"34816": 519,
"34817": 7680,
"34818": 7680,
"34819": 7680,
"34852": 8,
"34853": 1029,
"34854": 0,
"34855": 0,
"34856": 0,
"34857": 0,
"34858": 0,
"34859": 0,
"34860": 0,
"34877": 32774,
"34921": 16,
"34930": 32,
"34964": null,
"34965": null,
"35071": 2048,
"35076": -8,
"35077": 7,
"35371": 14,
"35373": 14,
"35374": 84,
"35375": 84,
"35376": 65536,
"35377": 233472,
"35379": 233472,
"35380": 256,
"35657": 4096,
"35658": 4096,
"35659": 124,
"35660": 32,
"35661": 192,
"35723": 4352,
"35724": "WebGL GLSL ES 3.00",
"35725": null,
"35738": 5121,
"35739": 6408,
"35968": 4,
"35977": false,
"35978": 128,
"35979": 4,
"36003": 0,
"36004": 4294967295,
"36005": 4294967295,
"36006": null,
"36007": null,
"36063": 8,
"36183": 32,
"36203": 4294967295,
"36345": null,
"36347": 1024,
"36348": 32,
"36349": 1024,
"36387": false,
"36388": false,
"36392": null,
"36795": null,
"37137": 1.8446744073709552e+19,
"37154": 128,
"37157": 128,
"37440": false,
"37441": false,
"37443": 37444,
"37444": null,
"37445": "NVIDIA Corporation",
"37446": "NVIDIA GeForce GTX 980, or similar",
"37447": 1000000000,
"38449": null
},
"webGl2:shaderPrecisionFormats": {
"35633,36336": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35633,36337": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35633,36338": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35633,36339": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35633,36340": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35633,36341": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35632,36336": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35632,36337": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35632,36338": {
"rangeMin": 127,
"rangeMax": 127,
"precision": 23
},
"35632,36339": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35632,36340": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
},
"35632,36341": {
"rangeMin": 24,
"rangeMax": 24,
"precision": 0
}
},
"webGl2Enabled": true
}