@@ -530,7 +530,6 @@ struct Context {
530530 // Default constructor
531531 Context () = default ;
532532
533- // Move constructor: steals GPU handles so the source destructor won't free them.
534533 Context (Context&& other) noexcept
535534 : instance(other.instance),
536535 adapter (other.adapter),
@@ -542,6 +541,7 @@ struct Context {
542541 adapterStatus(other.adapterStatus),
543542 deviceStatus(other.deviceStatus)
544543 {
544+ LOG (kDefLog , kTrace , " Moving Context ownership" );
545545 // Move over the resources in the pools:
546546 pool.data = std::move (other.pool .data );
547547 kernelPool.data = std::move (other.kernelPool .data );
@@ -555,7 +555,6 @@ struct Context {
555555 // other.deviceStatus = 0;
556556 }
557557
558- // Optional move‐assignment operator, similarly stealing resources:
559558 Context& operator =(Context&& other) noexcept {
560559 if (this != &other) {
561560 // Free any existing resources. In most cases, this should be a no-op
@@ -573,26 +572,26 @@ struct Context {
573572 if (queue) {
574573 wgpuQueueRelease (queue);
575574 } else {
576- LOG (kDefLog , kWarn , " Queue is null" );
575+ LOG (kDefLog , kTrace , " Queue is null" );
577576 }
578577 if (device) {
579578 wgpuDeviceRelease (device);
580579 processEvents (instance);
581580 } else {
582- LOG (kDefLog , kWarn , " Device is null" );
581+ LOG (kDefLog , kTrace , " Device is null" );
583582 }
584583 if (adapter) {
585584 wgpuAdapterRelease (adapter);
586585 processEvents (instance);
587586 } else {
588- LOG (kDefLog , kWarn , " Adapter is null" );
587+ LOG (kDefLog , kTrace , " Adapter is null" );
589588 }
590589 if (instance) {
591590 wgpuInstanceRelease (instance);
592591 } else {
593- LOG (kDefLog , kWarn , " Instance is null" );
592+ LOG (kDefLog , kTrace , " Instance is null" );
594593 }
595- LOG (kDefLog , kInfo , " Context destroyed" );
594+ LOG (kDefLog , kTrace , " Context destroyed" );
596595 }
597596};
598597
@@ -827,7 +826,7 @@ inline Context createContext(
827826#endif
828827 check (ctx.instance , " Initialize WebGPU" , __FILE__, __LINE__);
829828
830- LOG (kDefLog , kInfo , " Requesting adapter" );
829+ LOG (kDefLog , kTrace , " Requesting adapter" );
831830 {
832831 struct AdapterData {
833832 WGPUAdapter adapter = nullptr ;
@@ -869,7 +868,7 @@ inline Context createContext(
869868 ctx.adapterStatus = adapterData.status ;
870869 }
871870
872- LOG (kDefLog , kInfo , " Requesting device" );
871+ LOG (kDefLog , kTrace , " Requesting device" );
873872 {
874873 struct DeviceData {
875874 WGPUDevice device = nullptr ;
@@ -900,11 +899,11 @@ inline Context createContext(
900899 };
901900 wgpuAdapterRequestDevice (ctx.adapter , &devDescriptor, deviceCallbackInfo);
902901
903- LOG (kDefLog , kInfo , " Waiting for device request to end" );
902+ LOG (kDefLog , kTrace , " Waiting for device request to end" );
904903 while (!devData.requestEnded ) {
905904 processEvents (ctx.instance );
906905 }
907- LOG (kDefLog , kInfo , " Device request ended" );
906+ LOG (kDefLog , kTrace , " Device request ended" );
908907
909908 ctx.device = devData.device ;
910909 ctx.deviceStatus = devData.status ;
0 commit comments