webgl2 1.2.3 → 1.2.4

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,49 +4,43 @@
4
4
 
5
5
  | File | Lines Covered | Lines Missed | Total Lines | Coverage |
6
6
  |---|---|---|---|---:|
7
- | src/coverage.rs | 22 | 1 | 23 | 95.65% 🟢 |
7
+ | src/coverage.rs | 18 | 1 | 19 | 94.74% 🟢 |
8
8
  | src/decompiler/ast.rs | 4 | 0 | 4 | 100.00% 🟢 |
9
- | src/decompiler/emitter.rs | 19 | 4 | 23 | 82.61% 🟢 |
10
- | src/decompiler/lifter.rs | 19 | 10 | 29 | 65.52% 🟡 |
11
- | src/decompiler/mod.rs | 19 | 2 | 21 | 90.48% 🟢 |
12
- | src/decompiler/module.rs | 1 | 0 | 1 | 100.00% 🟢 |
13
- | src/decompiler/parser.rs | 9 | 10 | 19 | 47.37% 🟠 |
14
- | src/decompiler/simplifier.rs | 35 | 1 | 36 | 97.22% 🟢 |
15
- | src/error.rs | 35 | 4 | 39 | 89.74% 🟢 |
16
- | src/lib.rs | 109 | 310 | 419 | 26.01% 🟠 |
17
- | src/naga_wasm_backend/backend.rs | 107 | 9 | 116 | 92.24% 🟢 |
18
- | src/naga_wasm_backend/call_lowering.rs | 30 | 2 | 32 | 93.75% 🟢 |
19
- | src/naga_wasm_backend/control_flow.rs | 37 | 42 | 79 | 46.84% 🟠 |
20
- | src/naga_wasm_backend/debug/stub.rs | 10 | 0 | 10 | 100.00% 🟢 |
21
- | src/naga_wasm_backend/expressions.rs | 157 | 121 | 278 | 56.47% 🟡 |
22
- | src/naga_wasm_backend/function_abi.rs | 5 | 8 | 13 | 38.46% 🟠 |
23
- | src/naga_wasm_backend/functions/prep.rs | 10 | 0 | 10 | 100.00% 🟢 |
24
- | src/naga_wasm_backend/memory_layout.rs | 4 | 0 | 4 | 100.00% 🟢 |
25
- | src/naga_wasm_backend/mod.rs | 7 | 2 | 9 | 77.78% 🟡 |
26
- | src/naga_wasm_backend/output_layout.rs | 10 | 1 | 11 | 90.91% 🟢 |
27
- | src/naga_wasm_backend/types.rs | 6 | 1 | 7 | 85.71% 🟢 |
28
- | src/wasm_gl_emu/device.rs | 32 | 4 | 36 | 88.89% 🟢 |
29
- | src/wasm_gl_emu/framebuffer.rs | 3 | 3 | 6 | 50.00% 🟡 |
30
- | src/wasm_gl_emu/rasterizer.rs | 17 | 46 | 63 | 26.98% 🟠 |
31
- | src/wasm_gl_emu/transfer.rs | 13 | 44 | 57 | 22.81% 🟠 |
32
- | src/webgl2_context/drawing.rs | 1 | 1 | 2 | 50.00% 🟡 |
33
- | src/webgl2_context/registry.rs | 9 | 1 | 10 | 90.00% 🟢 |
34
- | src/webgl2_context/shaders.rs | 164 | 17 | 181 | 90.61% 🟢 |
35
- | src/webgl2_context/state.rs | 58 | 6 | 64 | 90.63% 🟢 |
36
- | src/webgl2_context/textures.rs | 11 | 0 | 11 | 100.00% 🟢 |
37
- | src/webgl2_context/types.rs | 45 | 20 | 65 | 69.23% 🟡 |
38
- | src/webgpu/adapter.rs | 4 | 5 | 9 | 44.44% 🟠 |
39
- | src/webgpu/backend.rs | 106 | 25 | 131 | 80.92% 🟢 |
40
- | src/webgpu/buffer.rs | 3 | 2 | 5 | 60.00% 🟡 |
41
- | src/webgpu/command.rs | 4 | 1 | 5 | 80.00% 🟢 |
42
- | src/webgpu/shader.rs | 7 | 0 | 7 | 100.00% 🟢 |
43
- | **Total** | **1132** | **703** | **1835** | **61.69% 🟡** |
9
+ | src/decompiler/emitter.rs | 35 | 2 | 37 | 94.59% 🟢 |
10
+ | src/decompiler/lifter.rs | 11 | 14 | 25 | 44.00% 🟠 |
11
+ | src/decompiler/simplifier.rs | 30 | 1 | 31 | 96.77% 🟢 |
12
+ | src/error.rs | 13 | 2 | 15 | 86.67% 🟢 |
13
+ | src/lib.rs | 87 | 299 | 386 | 22.54% 🟠 |
14
+ | src/naga_wasm_backend/backend.rs | 173 | 24 | 197 | 87.82% 🟢 |
15
+ | src/naga_wasm_backend/call_lowering.rs | 22 | 3 | 25 | 88.00% 🟢 |
16
+ | src/naga_wasm_backend/control_flow.rs | 37 | 41 | 78 | 47.44% 🟠 |
17
+ | src/naga_wasm_backend/debug/stub.rs | 25 | 9 | 34 | 73.53% 🟡 |
18
+ | src/naga_wasm_backend/expressions.rs | 143 | 155 | 298 | 47.99% 🟠 |
19
+ | src/naga_wasm_backend/function_abi.rs | 31 | 0 | 31 | 100.00% 🟢 |
20
+ | src/naga_wasm_backend/functions/prep.rs | 4 | 2 | 6 | 66.67% 🟡 |
21
+ | src/naga_wasm_backend/functions/registry.rs | 0 | 1 | 1 | 0.00% 🟡 |
22
+ | src/naga_wasm_backend/memory_layout.rs | 16 | 4 | 20 | 80.00% 🟢 |
23
+ | src/naga_wasm_backend/mod.rs | 5 | 5 | 10 | 50.00% 🟡 |
24
+ | src/naga_wasm_backend/output_layout.rs | 2 | 1 | 3 | 66.67% 🟡 |
25
+ | src/wasm_gl_emu/device.rs | 49 | 12 | 61 | 80.33% 🟢 |
26
+ | src/wasm_gl_emu/framebuffer.rs | 3 | 1 | 4 | 75.00% 🟡 |
27
+ | src/wasm_gl_emu/rasterizer.rs | 52 | 58 | 110 | 47.27% 🟠 |
28
+ | src/wasm_gl_emu/transfer.rs | 11 | 16 | 27 | 40.74% 🟠 |
29
+ | src/webgl2_context/shaders.rs | 160 | 14 | 174 | 91.95% 🟢 |
30
+ | src/webgl2_context/state.rs | 80 | 1 | 81 | 98.77% 🟢 |
31
+ | src/webgl2_context/textures.rs | 22 | 7 | 29 | 75.86% 🟡 |
32
+ | src/webgl2_context/types.rs | 52 | 14 | 66 | 78.79% 🟡 |
33
+ | src/webgl2_context/vaos.rs | 25 | 19 | 44 | 56.82% 🟡 |
34
+ | src/webgpu/adapter.rs | 3 | 2 | 5 | 60.00% 🟡 |
35
+ | src/webgpu/backend.rs | 68 | 20 | 88 | 77.27% 🟡 |
36
+ | src/webgpu/command.rs | 1 | 1 | 2 | 50.00% 🟡 |
37
+ | **Total** | **1182** | **729** | **1911** | **61.85% 🟡** |
44
38
 
45
39
  ## Top Missed Files
46
40
 
47
41
  | File | Lines Missed | Illustrative Line | Coverage |
48
42
  |---|---|---|---:|
49
- | src/lib.rs | 310/419 | [1994] `data_ptr: *const u8,` | 26.01% 🟠 |
50
- | src/naga_wasm_backend/expressions.rs | 121/278 | [33] `let expr = &ctx.module.global_expressions[expr_handle];` | 56.47% 🟡 |
51
- | src/wasm_gl_emu/rasterizer.rs | 46/63 | [1015] `if state.color_mask.r {` | 26.98% 🟠 |
52
- | src/wasm_gl_emu/transfer.rs | 44/57 | [387] `dest[dst_off] = (r5 << 3) | (r5 >> 2);` | 22.81% 🟠 |
43
+ | src/lib.rs | 299/386 | [1994] `) -> u32 {` | 22.54% 🟠 |
44
+ | src/naga_wasm_backend/expressions.rs | 155/298 | [1845] `translate_expression(*argument, ctx)?;` | 47.99% 🟠 |
45
+ | src/wasm_gl_emu/rasterizer.rs | 58/110 | [370] `match eq {` | 47.27% 🟠 |
46
+ | src/naga_wasm_backend/control_flow.rs | 41/78 | [535] `let types = super::types::naga_to_wasm_types(` | 47.44% 🟠 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webgl2",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
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",
@@ -172,9 +172,9 @@ export class WasmWebGL2RenderingContext {
172
172
  RGB32I = 0x8D83;
173
173
  RGBA32I = 0x8D82;
174
174
  RED_INTEGER = 0x8D94;
175
- RG_INTEGER = 0x8D95;
176
- RGB_INTEGER = 0x8D96;
177
- RGBA_INTEGER = 0x8D99;
175
+ RG_INTEGER = 0x8228;
176
+ RGB_INTEGER = 0x8D98;
177
+ RGBA_INTEGER = 0x8D9E;
178
178
  R32F = 0x822E;
179
179
  RG32F = 0x8230;
180
180
  R16F = 0x822D;
@@ -608,6 +608,10 @@ export class WasmWebGL2RenderingContext {
608
608
  if (format === 0x1908) bpp = 16; // GL_RGBA
609
609
  else if (format === 0x8227) bpp = 8; // GL_RG
610
610
  else if (format === 0x1903) bpp = 4; // GL_RED
611
+ } else if (type_ === 0x1405 || type_ === 0x1404) { // GL_UNSIGNED_INT or GL_INT
612
+ if (format === 0x8D9E) bpp = 16; // GL_RGBA_INTEGER
613
+ else if (format === 0x8228) bpp = 8; // GL_RG_INTEGER
614
+ else if (format === 0x8D94) bpp = 4; // GL_RED_INTEGER
611
615
  } else if (type_ === 0x1401) { // GL_UNSIGNED_BYTE
612
616
  if (format === 0x1908) bpp = 4;
613
617
  }
package/webgl2.debug.wasm CHANGED
Binary file
package/webgl2.wasm CHANGED
Binary file