webgl2 1.2.6 → 1.2.7

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/coverage.md CHANGED
@@ -4,48 +4,47 @@
4
4
 
5
5
  | File | Lines Covered | Lines Missed | Total Lines | Coverage |
6
6
  |---|---|---|---|---:|
7
- | src/coverage.rs | 4 | 1 | 5 | 80.00% 🟢 |
8
- | src/decompiler/ast.rs | 5 | 0 | 5 | 100.00% 🟢 |
9
- | src/decompiler/emitter.rs | 25 | 5 | 30 | 83.33% 🟢 |
10
- | src/decompiler/lifter.rs | 7 | 1 | 8 | 87.50% 🟢 |
11
- | src/decompiler/mod.rs | 2 | 1 | 3 | 66.67% 🟡 |
12
- | src/decompiler/module.rs | 1 | 2 | 3 | 33.33% 🟡 |
13
- | src/decompiler/parser.rs | 24 | 2 | 26 | 92.31% 🟢 |
14
- | src/decompiler/simplifier.rs | 32 | 0 | 32 | 100.00% 🟢 |
15
- | src/error.rs | 34 | 2 | 36 | 94.44% 🟢 |
16
- | src/lib.rs | 83 | 317 | 400 | 20.75% 🟠 |
17
- | src/naga_wasm_backend/backend.rs | 147 | 42 | 189 | 77.78% 🟡 |
18
- | src/naga_wasm_backend/call_lowering.rs | 23 | 3 | 26 | 88.46% 🟢 |
19
- | src/naga_wasm_backend/control_flow.rs | 37 | 37 | 74 | 50.00% 🟡 |
20
- | src/naga_wasm_backend/debug/stub.rs | 8 | 0 | 8 | 100.00% 🟢 |
21
- | src/naga_wasm_backend/expressions.rs | 130 | 151 | 281 | 46.26% 🟠 |
22
- | src/naga_wasm_backend/function_abi.rs | 22 | 19 | 41 | 53.66% 🟡 |
7
+ | src/coverage.rs | 5 | 0 | 5 | 100.00% 🟢 |
8
+ | src/decompiler/ast.rs | 2 | 0 | 2 | 100.00% 🟢 |
9
+ | src/decompiler/emitter.rs | 2 | 1 | 3 | 66.67% 🟡 |
10
+ | src/decompiler/lifter.rs | 4 | 2 | 6 | 66.67% 🟡 |
11
+ | src/decompiler/simplifier.rs | 44 | 0 | 44 | 100.00% 🟢 |
12
+ | src/error.rs | 31 | 6 | 37 | 83.78% 🟢 |
13
+ | src/lib.rs | 99 | 314 | 413 | 23.97% 🟠 |
14
+ | src/naga_wasm_backend/backend.rs | 148 | 47 | 195 | 75.90% 🟡 |
15
+ | src/naga_wasm_backend/call_lowering.rs | 26 | 3 | 29 | 89.66% 🟢 |
16
+ | src/naga_wasm_backend/control_flow.rs | 38 | 44 | 82 | 46.34% 🟠 |
17
+ | src/naga_wasm_backend/debug/stub.rs | 11 | 0 | 11 | 100.00% 🟢 |
18
+ | src/naga_wasm_backend/expressions.rs | 158 | 153 | 311 | 50.80% 🟡 |
19
+ | src/naga_wasm_backend/function_abi.rs | 24 | 11 | 35 | 68.57% 🟡 |
23
20
  | src/naga_wasm_backend/functions/prep.rs | 7 | 2 | 9 | 77.78% 🟡 |
24
- | src/naga_wasm_backend/functions/registry.rs | 3 | 0 | 3 | 100.00% 🟢 |
25
- | src/naga_wasm_backend/mod.rs | 6 | 1 | 7 | 85.71% 🟢 |
26
- | src/naga_wasm_backend/output_layout.rs | 10 | 1 | 11 | 90.91% 🟢 |
27
- | src/naga_wasm_backend/types.rs | 19 | 3 | 22 | 86.36% 🟢 |
28
- | src/wasm_gl_emu/device.rs | 2 | 1 | 3 | 66.67% 🟡 |
29
- | src/wasm_gl_emu/framebuffer.rs | 3 | 0 | 3 | 100.00% 🟢 |
30
- | src/wasm_gl_emu/transfer.rs | 11 | 10 | 21 | 52.38% 🟡 |
21
+ | src/naga_wasm_backend/functions/registry.rs | 4 | 1 | 5 | 80.00% 🟢 |
22
+ | src/naga_wasm_backend/mod.rs | 5 | 3 | 8 | 62.50% 🟡 |
23
+ | src/naga_wasm_backend/output_layout.rs | 11 | 2 | 13 | 84.62% 🟢 |
24
+ | src/naga_wasm_backend/types.rs | 18 | 4 | 22 | 81.82% 🟢 |
25
+ | src/wasm_gl_emu/device.rs | 2 | 0 | 2 | 100.00% 🟢 |
26
+ | src/wasm_gl_emu/framebuffer.rs | 4 | 1 | 5 | 80.00% 🟢 |
27
+ | src/wasm_gl_emu/rasterizer.rs | 25 | 24 | 49 | 51.02% 🟡 |
28
+ | src/wasm_gl_emu/transfer.rs | 11 | 12 | 23 | 47.83% 🟠 |
31
29
  | src/webgl2_context/buffers.rs | 4 | 0 | 4 | 100.00% 🟢 |
32
- | src/webgl2_context/drawing.rs | 32 | 1 | 33 | 96.97% 🟢 |
33
- | src/webgl2_context/renderbuffers.rs | 5 | 6 | 11 | 45.45% 🟠 |
34
- | src/webgl2_context/shaders.rs | 179 | 33 | 212 | 84.43% 🟢 |
35
- | src/webgl2_context/state.rs | 13 | 2 | 15 | 86.67% 🟢 |
36
- | src/webgl2_context/textures.rs | 47 | 8 | 55 | 85.45% 🟢 |
37
- | src/webgl2_context/types.rs | 11 | 3 | 14 | 78.57% 🟡 |
30
+ | src/webgl2_context/drawing.rs | 36 | 1 | 37 | 97.30% 🟢 |
31
+ | src/webgl2_context/renderbuffers.rs | 12 | 1 | 13 | 92.31% 🟢 |
32
+ | src/webgl2_context/shaders.rs | 176 | 52 | 228 | 77.19% 🟡 |
33
+ | src/webgl2_context/state.rs | 11 | 3 | 14 | 78.57% 🟡 |
34
+ | src/webgl2_context/textures.rs | 10 | 3 | 13 | 76.92% 🟡 |
35
+ | src/webgl2_context/types.rs | 5 | 1 | 6 | 83.33% 🟢 |
38
36
  | src/webgpu/adapter.rs | 8 | 0 | 8 | 100.00% 🟢 |
39
- | src/webgpu/backend.rs | 124 | 25 | 149 | 83.22% 🟢 |
40
- | src/webgpu/command.rs | 7 | 0 | 7 | 100.00% 🟢 |
41
- | src/webgpu/texture.rs | 1 | 0 | 1 | 100.00% 🟢 |
42
- | **Total** | **1076** | **679** | **1755** | **61.31% 🟡** |
37
+ | src/webgpu/backend.rs | 112 | 25 | 137 | 81.75% 🟢 |
38
+ | src/webgpu/buffer.rs | 1 | 3 | 4 | 25.00% 🟡 |
39
+ | src/webgpu/command.rs | 5 | 6 | 11 | 45.45% 🟠 |
40
+ | src/webgpu/pipeline.rs | 0 | 1 | 1 | 0.00% 🟡 |
41
+ | **Total** | **1059** | **726** | **1785** | **59.33% 🟡** |
43
42
 
44
43
  ## Top Missed Files
45
44
 
46
45
  | File | Lines Missed | Illustrative Line | Coverage |
47
46
  |---|---|---|---:|
48
- | src/lib.rs | 317/400 | [1994] `///` | 20.75% 🟠 |
49
- | src/naga_wasm_backend/expressions.rs | 151/281 | [1426] `}` | 46.26% 🟠 |
50
- | src/naga_wasm_backend/backend.rs | 42/189 | [325] `func.instruction(&Instruction::LocalGet(l_bpp));` | 77.78% 🟡 |
51
- | src/naga_wasm_backend/control_flow.rs | 37/74 | [464] `for arg in arguments {` | 50.00% 🟡 |
47
+ | src/lib.rs | 314/413 | [1994] `}` | 23.97% 🟠 |
48
+ | src/naga_wasm_backend/expressions.rs | 153/311 | [1555] `ctx.wasm_func.instruction(&Instruction::LocalSet(temp_b));` | 50.80% 🟡 |
49
+ | src/webgl2_context/shaders.rs | 52/228 | [428] `used_locations.insert(loc, (name.clone(), origin));` | 77.19% 🟡 |
50
+ | src/naga_wasm_backend/backend.rs | 47/195 | [110] `code: CodeSection::new(),` | 75.90% 🟡 |
package/index.js CHANGED
@@ -282,6 +282,7 @@ async function initWASM({ debug } = {}) {
282
282
  env.gl_log = Math.log;
283
283
  env.gl_log2 = Math.log2;
284
284
  env.gl_pow = Math.pow;
285
+ env.gl_ldexp = (mant, exp) => mant * Math.pow(2, exp);
285
286
  env.gl_sinh = Math.sinh;
286
287
  env.gl_cosh = Math.cosh;
287
288
  env.gl_tanh = Math.tanh;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webgl2",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "WebGL2 tools to derisk large GPU projects on the web beyond toys and demos.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/webgl2.debug.wasm CHANGED
Binary file
package/webgl2.wasm CHANGED
Binary file