@gnsx/three 0.185.4 → 0.185.6

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.
@@ -77408,6 +77408,17 @@ class WebGPUTextureUtils {
77408
77408
  if ( bindingData.sampler !== undefined ) {
77409
77409
 
77410
77410
  const samplerData = this._samplerCache.get( bindingData.samplerKey );
77411
+ // WITH_GENESYS
77412
+ // Binding disposal can be reached more than once during renderer teardown; tolerate stale sampler cache data.
77413
+ if ( samplerData === undefined ) {
77414
+
77415
+ bindingData.sampler = undefined;
77416
+ bindingData.samplerKey = undefined;
77417
+ return;
77418
+
77419
+ }
77420
+
77421
+ // !WITH_GENESYS
77411
77422
  samplerData.usedTimes --;
77412
77423
 
77413
77424
  if ( samplerData.usedTimes === 0 ) {
@@ -86883,6 +86894,11 @@ class WebGPUBackend extends Backend {
86883
86894
 
86884
86895
  const baseOffset = timestampQueryPool.allocateQueriesForContext( uid );
86885
86896
 
86897
+ // WITH_GENESYS
86898
+ // If query allocation fails, leave timestampWrites unset so WebGPU doesn't receive a null querySet.
86899
+ if ( baseOffset === null || timestampQueryPool.querySet === null ) return;
86900
+ // !WITH_GENESYS
86901
+
86886
86902
  _renderPassTimestampWrites.querySet = timestampQueryPool.querySet;
86887
86903
  _renderPassTimestampWrites.beginningOfPassWriteIndex = baseOffset;
86888
86904
  _renderPassTimestampWrites.endOfPassWriteIndex = baseOffset + 1;