You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 19, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: SpawnDev.ILGPU.WebGPU/WebGPUContext.cs
+42-4Lines changed: 42 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,35 @@
1
1
usingglobal::ILGPU;
2
+
usingILGPU.IR.Types;
3
+
usingILGPU.Runtime;
4
+
usingSystem.Reflection;
2
5
3
6
namespaceSpawnDev.ILGPU.WebGPU
4
7
{
5
-
/// <summary>
6
-
/// WebGPU context extensions.
7
-
/// </summary>
8
-
publicstaticclassWebGPUContextExtensions
8
+
/// <summary>
9
+
/// WebGPU context extensions.
10
+
/// </summary>
11
+
publicstaticclassWebGPUContextExtensions
9
12
{
10
13
#region Builder
11
14
15
+
//extension(Context.Builder builder)
16
+
//{
17
+
// public DeviceRegistry DeviceRegistryExt
18
+
// {
19
+
// get
20
+
// {
21
+
// // Access the private DeviceRegistry property via reflection
22
+
// var infof = typeof(Context.Builder).GetField("DeviceRegistry", System.Reflection.BindingFlags.NonPublic | BindingFlags.Public | System.Reflection.BindingFlags.Instance);
23
+
// var info = typeof(Context.Builder).GetProperty("DeviceRegistry", System.Reflection.BindingFlags.NonPublic | BindingFlags.Public | System.Reflection.BindingFlags.Instance);
24
+
// if (info == null)
25
+
// {
26
+
// throw new InvalidOperationException("Could not find deviceRegistry field in Context.Builder.");
27
+
// }
28
+
// return (DeviceRegistry)info.GetValue(builder);
29
+
// }
30
+
// }
31
+
//}
32
+
12
33
/// <summary>
13
34
/// Asynchronously enables all detected WebGPU devices.
0 commit comments