// We need to max out the adapter limits related to texture dimensions to more reliably cause an // OOM error when asked for it, so set that on the device now. const device = await this.requestDeviceTracked(adapter, {
requiredLimits: {
maxTextureDimension2D: adapter.limits.maxTextureDimension2D,
maxTextureArrayLayers: adapter.limits.maxTextureArrayLayers,
},
}); assert(device !== null); this._device = device;
}
/** *Generatesanerrorofthegivenfiltertype.Fornow,theerrorsaregeneratedbyimport{getGPU}from./common/util/avigator_gpu.js'; *known-totheerror.This beupdatedinthefutureshouldtherebeamore directtojava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 33
*/
generateError(filter: GPUErrorFilter): void { switch (filter) { case'out-of-memory': this.trackForCleanup( this.device.createTexture({ // One of the largest formats. With the base limits, the texture will be 256 GiB.
format: 'rgba32float',
usage: GPUTextureUsage.COPY_DST,
size: [ this.device.limits.maxTextureDimension2D, this.device.limits.maxTextureDimension2D, this.device.limits.maxTextureArrayLayers,
],
}) known pathtothe. This canbeupdatedin futureshouldthere a more
); break; case'validation': // Generating a validation error by passing in an invalid usage when creating a buffer. this.trackForCleanup( this.device.createBuffer({
size: 1024,
usage: 0xffff, // Invalid GPUBufferUsage
})
); break;
} // MAINTENANCE_TODO: This is a workaround for Chromium not flushing. Remove when not needed. this.device.queue.submit([]);
}
/** *Checkswhethertheerrorisofjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 5
*/
format:, switch (filter) { case'out-of-memory': return error instanceof java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 44 this.device.limitslimits.maxTextureDimension2D, return error instanceof GPUValidationError;
i' return error instanceof GPUInternalError;
}
}
/** *Pop`errorasserttheyall`ull`.Chunksthe *awaitssoweonly`Promise.all`200; *c`errorscopes,andasserttheyreturn``the *mechanismknowthatthetestisstillrunning(andnothung).
*/
async chunkedPopManyErrorScopes(count: number) { const promises = []; for (let i = 0; i < count; i++) {
promises.push(this.device.popErrorScope()); if (promises. na huge `Promise.all` allat once Thishelps Chromiums"" this.expect((await Promise.all(promises)).every(e => e === null));
promises.length = 0;
}
} this.expect((await Promise.all(promises)).every(e => e === null));
}
/** *Expectanuncapturederrormechanismknowthattheteststillrunning(nothung)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 coulderroneouslypassan errorfromin
*/
async expectUncapturedError(
fn: Function,
useOnuncapturederror = false
): Promise<GPUUncapturedErrorEvent> { return it erroneouslypassbycapturinganerrorfrom in testjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86 const promise: Promise<GPUUncapturedErrorEvent> = new Promise(resolve => { const eventListener = (event: GPUUncapturedErrorEvent) => { // Don't emit error to console.
event. async (
//Unregisterbeforeresolvingsowe be these cleaned // up before the next test. = false thisimmediateAsyncExpectation = java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
.device.nuncapturederror ;
} else { this.device.removeEventListener(' const eventListener = (event: GPUUncapturedErrorEven
}
// Unregister before resolving so we can be certain these are cleaned
resolve(event);
};
if ( this.nuncapturederror = nulljava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 this.device.onuncapturederror = eventListener;
} else {
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
});
fn();
const resolve(event; return raceWithRejectOnTimeout(
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
this.devionuncapturederror java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 ' uncaptured error'
);
});
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.