diff options
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/stress/memory')
3 files changed, 63 insertions, 0 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/stress/memory/README.txt b/dom/webgpu/tests/cts/checkout/src/stress/memory/README.txt new file mode 100644 index 0000000000..ac0c90bfb7 --- /dev/null +++ b/dom/webgpu/tests/cts/checkout/src/stress/memory/README.txt @@ -0,0 +1 @@ +Stress tests covering allocation and usage of various types of GPUBuffer objects. diff --git a/dom/webgpu/tests/cts/checkout/src/stress/memory/churn.spec.ts b/dom/webgpu/tests/cts/checkout/src/stress/memory/churn.spec.ts new file mode 100644 index 0000000000..fcb899eb29 --- /dev/null +++ b/dom/webgpu/tests/cts/checkout/src/stress/memory/churn.spec.ts @@ -0,0 +1,17 @@ +export const description = ` +Stress tests covering robustness in the presence of heavy buffer and texture +memory churn. +`; + +import { makeTestGroup } from '../../common/framework/test_group.js'; +import { GPUTest } from '../../webgpu/gpu_test.js'; + +export const g = makeTestGroup(GPUTest); + +g.test('churn') + .desc( + `Allocates and populates a huge number of buffers and textures over time, +retaining some while dropping or explicitly destroying others. When finished, +verifies the expected contents of any remaining buffers and textures.` + ) + .unimplemented(); diff --git a/dom/webgpu/tests/cts/checkout/src/stress/memory/oom.spec.ts b/dom/webgpu/tests/cts/checkout/src/stress/memory/oom.spec.ts new file mode 100644 index 0000000000..3ab542c940 --- /dev/null +++ b/dom/webgpu/tests/cts/checkout/src/stress/memory/oom.spec.ts @@ -0,0 +1,45 @@ +export const description = ` +Stress tests covering robustness when available VRAM is exhausted. +`; + +import { makeTestGroup } from '../../common/framework/test_group.js'; +import { GPUTest } from '../../webgpu/gpu_test.js'; +import { exhaustVramUntilUnder64MB } from '../../webgpu/util/memory.js'; + +export const g = makeTestGroup(GPUTest); + +g.test('vram_oom') + .desc(`Tests that we can allocate buffers until we run out of VRAM.`) + .fn(async t => { + await exhaustVramUntilUnder64MB(t.device); + }); + +g.test('get_mapped_range') + .desc( + `Tests getMappedRange on a mappedAtCreation GPUBuffer that failed allocation due +to OOM. This should throw a RangeError, but below a certain threshold may just +crash the page.` + ) + .unimplemented(); + +g.test('map_after_vram_oom') + .desc( + `Allocates tons of buffers and textures with varying mapping states (unmappable, +mappable, mapAtCreation, mapAtCreation-then-unmapped) until OOM; then attempts +to mapAsync all the mappable objects.` + ) + .unimplemented(); + +g.test('validation_vs_oom') + .desc( + `Tests that calls affected by both OOM and validation errors expose the +validation error with precedence.` + ) + .unimplemented(); + +g.test('recovery') + .desc( + `Tests that after going VRAM-OOM, destroying allocated resources eventually +allows new resources to be allocated.` + ) + .unimplemented(); |