@@ -14,7 +14,7 @@ public partial class ComputeBoids : IDisposable
1414 [ Inject ]
1515 ShaderLoader ShaderLoader { get ; set ; } = default ! ;
1616
17- string _log = "Ready " ;
17+ string _log = "" ;
1818 bool _running = false ;
1919
2020 ElementReference canvasRef ;
@@ -152,30 +152,13 @@ async Task Init()
152152 return ;
153153 }
154154
155- var hasTimestampQuery = adapter . Features . Has ( "timestamp-query" ) ;
156- device = await adapter . RequestDevice ( new GPUDeviceDescriptor
157- {
158- RequiredFeatures = hasTimestampQuery ? new List < string > { "timestamp-query" } : null ,
159- } ) ;
155+ device = await adapter . RequestDevice ( ) ;
160156 if ( device == null )
161157 {
162158 Log ( "WebGPU not supported" ) ;
163159 return ;
164160 }
165161
166- var perfDisplayContainer = document . CreateElement < HTMLDivElement > ( "div" ) ;
167- perfDisplayContainer . Style [ "color" ] = "white" ;
168- perfDisplayContainer . Style [ "background" ] = "black" ;
169- perfDisplayContainer . Style [ "position" ] = "absolute" ;
170- perfDisplayContainer . Style [ "bottom" ] = "10px" ;
171- perfDisplayContainer . Style [ "left" ] = "10px" ;
172- perfDisplayContainer . Style [ "textAlign" ] = "left" ;
173-
174- var perfDisplay = document . CreateElement < HTMLElement > ( "pre" ) ;
175- perfDisplay . Style [ "margin" ] = ".5em" ;
176- perfDisplayContainer . AppendChild ( perfDisplay ) ;
177- canvas . ParentNode ! . AppendChild ( perfDisplayContainer ) ;
178-
179162 context = canvas . GetWebGPUContext ( ) ;
180163 var devicePixelRatio = window . DevicePixelRatio ;
181164 canvas . Width = ( int ) Math . Round ( canvas . ClientWidth * devicePixelRatio ) ;
@@ -270,11 +253,6 @@ async Task Init()
270253
271254 computePassDescriptor = new GPUComputePassDescriptor ( ) ;
272255
273- if ( hasTimestampQuery )
274- {
275- // omitted
276- }
277-
278256 var vertexBufferData = new float [ ] {
279257 - 0.01f , - 0.02f , 0.01f ,
280258 - 0.02f , 0.0f , 0.02f
0 commit comments