1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { kMaximumLimitBaseParams, makeLimitTestGroup } from './limit_utils.js';
const limit = 'maxTextureArrayLayers';
export const { g, description } = makeLimitTestGroup(limit);
g.test('createTexture,at_over')
.desc(`Test using at and over ${limit} limit`)
.params(kMaximumLimitBaseParams)
.fn(async t => {
const { limitTest, testValueName } = t.params;
await t.testDeviceWithRequestedMaximumLimits(
limitTest,
testValueName,
async ({ device, testValue, shouldError }) => {
await t.testForValidationErrorWithPossibleOutOfMemoryError(() => {
const texture = device.createTexture({
size: [1, 1, testValue],
format: 'rgba8unorm',
usage: GPUTextureUsage.TEXTURE_BINDING,
});
if (!shouldError) {
texture.destroy();
}
}, shouldError);
}
);
});
|