Commit 51f4efc9 authored by Kai Ninomiya's avatar Kai Ninomiya Committed by Commit Bot

Roll CTS and fix extract_expectation_names.py

https://chromium.googlesource.com/external/github.com/gpuweb/cts/+log/ec18cc3262922e7dcdbe70243c6f40606f979144..02b62c256590b040d514ec15c0f12041be8d1575

Change-Id: I6db0043cf844a81d1ccdecb4e7c0a51de5430fb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050036Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Reviewed-by: default avatarRakib Hasan <rmhasan@google.com>
Reviewed-by: default avatarAustin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743007}
parent 431a4574
...@@ -1435,7 +1435,7 @@ deps = { ...@@ -1435,7 +1435,7 @@ deps = {
Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '4f3976e9b368ccfe7b9dd02014351936296dc72c', Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '4f3976e9b368ccfe7b9dd02014351936296dc72c',
'src/third_party/webgpu-cts/src': 'src/third_party/webgpu-cts/src':
Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'ec18cc3262922e7dcdbe70243c6f40606f979144', Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '02b62c256590b040d514ec15c0f12041be8d1575',
'src/third_party/webrtc': 'src/third_party/webrtc':
Var('webrtc_git') + '/src.git' + '@' + '1282babe6621d3a2084bbd24e77652e0b3a4eb93', Var('webrtc_git') + '/src.git' + '@' + '1282babe6621d3a2084bbd24e77652e0b3a4eb93',
......
...@@ -7,7 +7,11 @@ ...@@ -7,7 +7,11 @@
# Given an expectations file (e.g. web_tests/WebGPUExpectations), extracts only # Given an expectations file (e.g. web_tests/WebGPUExpectations), extracts only
# the test name from each expectation (e.g. wpt_internal/webgpu/cts.html?...). # the test name from each expectation (e.g. wpt_internal/webgpu/cts.html?...).
from blinkpy.web_tests.models.test_expectations import TestExpectationLine from blinkpy.common import path_finder
path_finder.add_typ_dir_to_sys_path()
from typ.expectations_parser import TaggedTestListParser
import sys import sys
...@@ -19,9 +23,7 @@ class StubPort(object): ...@@ -19,9 +23,7 @@ class StubPort(object):
filename = sys.argv[1] filename = sys.argv[1]
with open(filename) as f: with open(filename) as f:
port = StubPort() port = StubPort()
line_number = 1 parser = TaggedTestListParser(f.read())
for line in f: for test_expectation in parser.expectations:
test_expectation = TestExpectationLine.tokenize_line(filename, line, line_number, port) if test_expectation.test:
if test_expectation.name: print test_expectation.test
print test_expectation.name
line_number += 1
// AUTO-GENERATED - DO NOT EDIT. See tools/gen_version. // AUTO-GENERATED - DO NOT EDIT. See tools/gen_version.
export const version = 'ec18cc3262922e7dcdbe70243c6f40606f979144'; export const version = '02b62c256590b040d514ec15c0f12041be8d1575';
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts * AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
**/ **/
export const textureFormatInfo = import { C } from '../../framework/index.js'; // Textures
export const kTextureFormatInfo =
/* prettier-ignore */ /* prettier-ignore */
{ {
// Try to keep these manually-formatted in a readable grid. // Try to keep these manually-formatted in a readable grid.
...@@ -167,36 +169,61 @@ export const textureFormatInfo = ...@@ -167,36 +169,61 @@ export const textureFormatInfo =
color: false color: false
} }
}; };
export const textureFormats = Object.keys(textureFormatInfo); export const kTextureFormats = Object.keys(kTextureFormatInfo); // Bindings
export const bindingTypeInfo =
export const kMaxBindingsPerBindGroup = 16;
export const kPerStageBindingLimits =
/* prettier-ignore */
{
'uniform-buffer': 12,
'storage-buffer': 4,
'sampler': 16,
'sampled-texture': 16,
'storage-texture': 4
};
const kStagesAll = C.ShaderStage.Vertex | C.ShaderStage.Fragment | C.ShaderStage.Compute;
const kStagesNonVertex = C.ShaderStage.Fragment | C.ShaderStage.Compute;
export const kBindingTypeInfo =
/* prettier-ignore */ /* prettier-ignore */
{ {
'uniform-buffer': { 'uniform-buffer': {
type: 'buffer', type: 'buffer',
validStages: kStagesAll,
perStageLimitType: 'uniform-buffer',
maxDynamicCount: 8 maxDynamicCount: 8
}, },
'storage-buffer': { 'storage-buffer': {
type: 'buffer', type: 'buffer',
validStages: kStagesNonVertex,
perStageLimitType: 'storage-buffer',
maxDynamicCount: 4 maxDynamicCount: 4
}, },
'readonly-storage-buffer': { 'readonly-storage-buffer': {
type: 'buffer', type: 'buffer',
validStages: kStagesAll,
perStageLimitType: 'storage-buffer',
maxDynamicCount: 4 maxDynamicCount: 4
}, },
'sampler': { 'sampler': {
type: 'sampler', type: 'sampler',
validStages: kStagesAll,
perStageLimitType: 'sampler',
maxDynamicCount: 0 maxDynamicCount: 0
}, },
'sampled-texture': { 'sampled-texture': {
type: 'texture', type: 'texture',
validStages: kStagesAll,
perStageLimitType: 'sampled-texture',
maxDynamicCount: 0 maxDynamicCount: 0
}, },
'storage-texture': { 'storage-texture': {
type: 'texture', type: 'texture',
validStages: kStagesAll,
perStageLimitType: 'storage-texture',
maxDynamicCount: 0 maxDynamicCount: 0
} }
}; };
export const bindingTypes = Object.keys(bindingTypeInfo); export const kBindingTypes = Object.keys(kBindingTypeInfo);
export const shaderStages = [1, 2, 4]; export const kShaderStages = [C.ShaderStage.Vertex, C.ShaderStage.Fragment, C.ShaderStage.Compute];
export const shaderStageCombinations = [0, 1, 2, 3, 4, 5, 6, 7]; export const kShaderStageCombinations = [0, 1, 2, 3, 4, 5, 6, 7];
//# sourceMappingURL=format_info.js.map //# sourceMappingURL=capability_info.js.map
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
export const description = ` export const description = `
copy imageBitmap To texture tests. copy imageBitmap To texture tests.
`; `;
import { TestGroup, assert, pcombine, poptions } from '../../framework/index.js'; import { TestGroup, pcombine, poptions } from '../../framework/index.js';
import { GPUTest } from './gpu_test.js'; import { GPUTest } from './gpu_test.js';
function calculateRowPitch(width, bytesPerPixel) { function calculateRowPitch(width, bytesPerPixel) {
...@@ -60,17 +60,6 @@ class F extends GPUTest { ...@@ -60,17 +60,6 @@ class F extends GPUTest {
} }
return failedPixels > 0 ? lines.join('\n') : undefined; return failedPixels > 0 ? lines.join('\n') : undefined;
} // Using drawImage to extract imageBitmap content.
imageBitmapToData(imageBitmap) {
const imageCanvas = document.createElement('canvas');
imageCanvas.width = imageBitmap.width;
imageCanvas.height = imageBitmap.height;
const imageCanvasContext = imageCanvas.getContext('2d');
assert(imageCanvasContext !== null, 'Cannot create canvas context for reading back contents from imageBitmap.');
imageCanvasContext.drawImage(imageBitmap, 0, 0, imageBitmap.width, imageBitmap.height);
return imageCanvasContext.getImageData(0, 0, imageBitmap.width, imageBitmap.height).data;
} }
} }
...@@ -113,7 +102,6 @@ g.test('from ImageData', async t => { ...@@ -113,7 +102,6 @@ g.test('from ImageData', async t => {
height: imageBitmap.height, height: imageBitmap.height,
depth: 1 depth: 1
}); });
const data = t.imageBitmapToData(imageBitmap);
const rowPitchValue = calculateRowPitch(imageBitmap.width, bytesPerPixel); const rowPitchValue = calculateRowPitch(imageBitmap.width, bytesPerPixel);
const testBuffer = t.device.createBuffer({ const testBuffer = t.device.createBuffer({
size: rowPitchValue * imageBitmap.height, size: rowPitchValue * imageBitmap.height,
...@@ -138,7 +126,7 @@ g.test('from ImageData', async t => { ...@@ -138,7 +126,7 @@ g.test('from ImageData', async t => {
depth: 1 depth: 1
}); });
t.device.defaultQueue.submit([encoder.finish()]); t.device.defaultQueue.submit([encoder.finish()]);
t.checkCopyImageBitmapResult(testBuffer, data, imageBitmap.width, imageBitmap.height, bytesPerPixel); t.checkCopyImageBitmapResult(testBuffer, imagePixels, imageBitmap.width, imageBitmap.height, bytesPerPixel);
}).params(pcombine(poptions('width', [1, 2, 4, 15, 255, 256]), // }).params(pcombine(poptions('width', [1, 2, 4, 15, 255, 256]), //
poptions('height', [1, 2, 4, 15, 255, 256]))); poptions('height', [1, 2, 4, 15, 255, 256])));
//# sourceMappingURL=copyImageBitmapToTexture.spec.js.map //# sourceMappingURL=copyImageBitmapToTexture.spec.js.map
\ No newline at end of file
...@@ -6,7 +6,7 @@ export const description = ` ...@@ -6,7 +6,7 @@ export const description = `
createBindGroup validation tests. createBindGroup validation tests.
`; `;
import { C, TestGroup, pcombine, poptions, unreachable } from '../../../framework/index.js'; import { C, TestGroup, pcombine, poptions, unreachable } from '../../../framework/index.js';
import { bindingTypes } from '../format_info.js'; import { kBindingTypes } from '../capability_info.js';
import { BindingResourceType, ValidationTest, resourceBindingMatches } from './validation_test.js'; import { BindingResourceType, ValidationTest, resourceBindingMatches } from './validation_test.js';
function clone(descriptor) { function clone(descriptor) {
...@@ -107,7 +107,7 @@ g.test('buffer binding must contain exactly one buffer of its type', t => { ...@@ -107,7 +107,7 @@ g.test('buffer binding must contain exactly one buffer of its type', t => {
}] }]
}); });
}, shouldError); }, shouldError);
}).params(pcombine(poptions('bindingType', bindingTypes), poptions('resourceType', Object.keys(BindingResourceType)))); }).params(pcombine(poptions('bindingType', kBindingTypes), poptions('resourceType', Object.keys(BindingResourceType))));
g.test('texture binding must have correct usage', async t => { g.test('texture binding must have correct usage', async t => {
const type = t.params.type; const type = t.params.type;
const usage = t.params._usage; const usage = t.params._usage;
...@@ -389,11 +389,6 @@ g.test('buffer offset and size for bind groups match', async t => { ...@@ -389,11 +389,6 @@ g.test('buffer offset and size for bind groups match', async t => {
offset: 1024, offset: 1024,
size: 1, size: 1,
_success: false _success: false
}, // offset+size is OOB } // offset+size is OOB
{
offset: 256,
size: -256,
_success: false
} // offset+size overflows to be 0
]); ]);
//# sourceMappingURL=createBindGroup.spec.js.map //# sourceMappingURL=createBindGroup.spec.js.map
\ No newline at end of file
...@@ -6,7 +6,7 @@ export const description = ` ...@@ -6,7 +6,7 @@ export const description = `
createBindGroupLayout validation tests. createBindGroupLayout validation tests.
`; `;
import { C, TestGroup, poptions } from '../../../framework/index.js'; import { C, TestGroup, poptions } from '../../../framework/index.js';
import { bindingTypeInfo, bindingTypes } from '../format_info.js'; import { kBindingTypeInfo, kBindingTypes, kMaxBindingsPerBindGroup, kPerStageBindingLimits, kShaderStages } from '../capability_info.js';
import { ValidationTest } from './validation_test.js'; import { ValidationTest } from './validation_test.js';
function clone(descriptor) { function clone(descriptor) {
...@@ -35,23 +35,6 @@ g.test('some binding index was specified more than once', async t => { ...@@ -35,23 +35,6 @@ g.test('some binding index was specified more than once', async t => {
t.device.createBindGroupLayout(badDescriptor); t.device.createBindGroupLayout(badDescriptor);
}); });
}); });
g.test('negative binding index', async t => {
const goodDescriptor = {
bindings: [{
binding: 0,
visibility: GPUShaderStage.COMPUTE,
type: C.BindingType.StorageBuffer
}]
}; // Control case
t.device.createBindGroupLayout(goodDescriptor); // Negative binding index can't be specified.
const badDescriptor = clone(goodDescriptor);
badDescriptor.bindings[0].binding = -1;
t.expectValidationError(() => {
t.device.createBindGroupLayout(badDescriptor);
});
});
g.test('Visibility of bindings can be 0', async t => { g.test('Visibility of bindings can be 0', async t => {
t.device.createBindGroupLayout({ t.device.createBindGroupLayout({
bindings: [{ bindings: [{
...@@ -102,7 +85,7 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => { ...@@ -102,7 +85,7 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => {
}]); }]);
g.test('dynamic set to true is allowed only for buffers', async t => { g.test('dynamic set to true is allowed only for buffers', async t => {
const type = t.params.type; const type = t.params.type;
const success = bindingTypeInfo[type].type === 'buffer'; const success = kBindingTypeInfo[type].type === 'buffer';
const descriptor = { const descriptor = {
bindings: [{ bindings: [{
binding: 0, binding: 0,
...@@ -114,5 +97,133 @@ g.test('dynamic set to true is allowed only for buffers', async t => { ...@@ -114,5 +97,133 @@ g.test('dynamic set to true is allowed only for buffers', async t => {
t.expectValidationError(() => { t.expectValidationError(() => {
t.device.createBindGroupLayout(descriptor); t.device.createBindGroupLayout(descriptor);
}, !success); }, !success);
}).params(poptions('type', bindingTypes)); }).params(poptions('type', kBindingTypes));
let kCasesForMaxResourcesPerStageTests;
{
// One bind group layout will be filled with kPerStageBindingLimit[...] of the type |type|.
// For each item in the array returned here, a case will be generated which tests a pipeline
// layout with one extra bind group layout with one extra binding. That extra binding will have:
//
// - If extraTypeSame, any of the binding types which counts toward the same limit as |type|.
// (i.e. 'storage-buffer' <-> 'readonly-storage-buffer').
// - Otherwise, an arbitrary other type.
function pickExtraBindingTypes(type, extraTypeSame) {
if (extraTypeSame) {
switch (type) {
case 'storage-buffer':
case 'readonly-storage-buffer':
return ['storage-buffer', 'readonly-storage-buffer'];
default:
return [type];
}
} else {
return type === 'sampler' ? ['sampled-texture'] : ['sampler'];
}
}
kCasesForMaxResourcesPerStageTests = [];
for (const maxedType of kBindingTypes) {
for (const maxedVisibility of kShaderStages) {
// Don't generate a case where maxedType isn't valid in maxedVisibility.
if (!(kBindingTypeInfo[maxedType].validStages & maxedVisibility)) continue;
for (const extraTypeSame of [true, false]) {
for (const extraType of pickExtraBindingTypes(maxedType, extraTypeSame)) {
for (const extraVisibility of kShaderStages) {
// Don't generate a case where extraType isn't valid in extraVisibility.
if (!(kBindingTypeInfo[extraType].validStages & extraVisibility)) continue;
kCasesForMaxResourcesPerStageTests.push({
maxedType,
maxedVisibility,
extraType,
extraVisibility
});
}
}
}
}
}
} // Should never fail unless kMaxBindingsPerBindGroup is exceeded, because the validation for
// resources-of-type-per-stage is in pipeline layout creation.
g.test('max resources per stage/in bind group layout', async t => {
const maxedType = t.params.maxedType;
const extraType = t.params.extraType;
const {
maxedVisibility,
extraVisibility
} = t.params;
const maxedCount = kPerStageBindingLimits[kBindingTypeInfo[maxedType].perStageLimitType];
const maxResourceBindings = [];
for (let i = 0; i < maxedCount; i++) {
maxResourceBindings.push({
binding: i,
visibility: maxedVisibility,
type: maxedType
});
}
const goodDescriptor = {
bindings: maxResourceBindings
}; // Control
t.device.createBindGroupLayout(goodDescriptor);
const newDescriptor = clone(goodDescriptor);
newDescriptor.bindings.push({
binding: maxedCount,
visibility: extraVisibility,
type: extraType
});
const shouldError = maxedCount >= kMaxBindingsPerBindGroup;
t.expectValidationError(() => {
t.device.createBindGroupLayout(newDescriptor);
}, shouldError);
}).params(kCasesForMaxResourcesPerStageTests); // One pipeline layout can have a maximum number of each type of binding *per stage* (which is
// different for each type). Test that the max works, then add one more binding of same-or-different
// type and same-or-different visibility.
g.test('max resources per stage/in pipeline layout', async t => {
const maxedType = t.params.maxedType;
const extraType = t.params.extraType;
const {
maxedVisibility,
extraVisibility
} = t.params;
const maxedCount = kPerStageBindingLimits[kBindingTypeInfo[maxedType].perStageLimitType];
const maxResourceBindings = [];
for (let i = 0; i < maxedCount; i++) {
maxResourceBindings.push({
binding: i,
visibility: maxedVisibility,
type: maxedType
});
}
const goodLayout = t.device.createBindGroupLayout({
bindings: maxResourceBindings
}); // Control
t.device.createPipelineLayout({
bindGroupLayouts: [goodLayout]
});
const extraLayout = t.device.createBindGroupLayout({
bindings: [{
binding: 0,
visibility: extraVisibility,
type: extraType
}]
}); // Some binding types use the same limit, e.g. 'storage-buffer' and 'readonly-storage-buffer'.
const newBindingCountsTowardSamePerStageLimit = (maxedVisibility & extraVisibility) !== 0 && kBindingTypeInfo[maxedType].perStageLimitType === kBindingTypeInfo[extraType].perStageLimitType;
const layoutExceedsPerStageLimit = newBindingCountsTowardSamePerStageLimit;
t.expectValidationError(() => {
t.device.createPipelineLayout({
bindGroupLayouts: [goodLayout, extraLayout]
});
}, layoutExceedsPerStageLimit);
}).params(kCasesForMaxResourcesPerStageTests);
//# sourceMappingURL=createBindGroupLayout.spec.js.map //# sourceMappingURL=createBindGroupLayout.spec.js.map
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
export const description = ` export const description = `
createPipelineLayout validation tests. createPipelineLayout validation tests.
`; `;
import { TestGroup, pcombine, poptions } from '../../../framework/index.js'; import { TestGroup, pbool, pcombine, poptions } from '../../../framework/index.js';
import { bindingTypeInfo, bindingTypes, shaderStageCombinations } from '../format_info.js'; import { kBindingTypeInfo, kBindingTypes, kShaderStageCombinations } from '../capability_info.js';
import { ValidationTest } from './validation_test.js'; import { ValidationTest } from './validation_test.js';
function clone(descriptor) { function clone(descriptor) {
...@@ -19,7 +19,7 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => { ...@@ -19,7 +19,7 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => {
type, type,
visibility visibility
} = t.params; } = t.params;
const maxDynamicCount = bindingTypeInfo[type].maxDynamicCount; const maxDynamicCount = kBindingTypeInfo[type].maxDynamicCount;
const maxDynamicBufferBindings = []; const maxDynamicBufferBindings = [];
for (let binding = 0; binding < maxDynamicCount; binding++) { for (let binding = 0; binding < maxDynamicCount; binding++) {
...@@ -58,44 +58,32 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => { ...@@ -58,44 +58,32 @@ g.test('number of dynamic buffers exceeds the maximum value', async t => {
}); });
}).params(pcombine(poptions('visibility', [0, 2, 4, 6]), // }).params(pcombine(poptions('visibility', [0, 2, 4, 6]), //
poptions('type', ['uniform-buffer', 'storage-buffer', 'readonly-storage-buffer']))); poptions('type', ['uniform-buffer', 'storage-buffer', 'readonly-storage-buffer'])));
g.test('dynamic offsets are only allowed on buffers', t => { g.test('visibility and dynamic offsets', t => {
const { const hasDynamicOffset = t.params.hasDynamicOffset;
type, const type = t.params.type;
visibility const visibility = t.params.visibility;
} = t.params; const info = kBindingTypeInfo[type];
const info = bindingTypeInfo[type]; const descriptor = {
const goodDescriptor = {
bindings: [{ bindings: [{
binding: 0, binding: 0,
visibility, visibility,
type, type,
hasDynamicOffset: false hasDynamicOffset
}] }]
}; };
t.device.createPipelineLayout({ let success = true;
bindGroupLayouts: [t.device.createBindGroupLayout(goodDescriptor)] if (info.type !== 'buffer' && hasDynamicOffset) success = false;
}); if ((visibility & ~info.validStages) !== 0) success = false;
const badDescriptor = clone(goodDescriptor);
badDescriptor.bindings[0].hasDynamicOffset = true;
const success = info.type === 'buffer';
t.expectValidationError(() => { t.expectValidationError(() => {
t.device.createPipelineLayout({ t.device.createPipelineLayout({
bindGroupLayouts: [t.device.createBindGroupLayout(badDescriptor)] bindGroupLayouts: [t.device.createBindGroupLayout(descriptor)]
}); });
}, !success); }, !success);
}).params(pcombine(poptions('visibility', shaderStageCombinations), // }).params(pcombine(poptions('type', kBindingTypes), //
poptions('type', bindingTypes))); pbool('hasDynamicOffset'), poptions('visibility', kShaderStageCombinations)));
g.test('number of bind group layouts exceeds the maximum value', async t => { g.test('number of bind group layouts exceeds the maximum value', async t => {
const {
visibility,
type
} = t.params;
const bindGroupLayoutDescriptor = { const bindGroupLayoutDescriptor = {
bindings: [{ bindings: []
binding: 0,
visibility,
type
}]
}; // 4 is the maximum number of bind group layouts. }; // 4 is the maximum number of bind group layouts.
const maxBindGroupLayouts = [1, 2, 3, 4].map(() => t.device.createBindGroupLayout(bindGroupLayoutDescriptor)); const maxBindGroupLayouts = [1, 2, 3, 4].map(() => t.device.createBindGroupLayout(bindGroupLayoutDescriptor));
...@@ -111,5 +99,5 @@ g.test('number of bind group layouts exceeds the maximum value', async t => { ...@@ -111,5 +99,5 @@ g.test('number of bind group layouts exceeds the maximum value', async t => {
t.expectValidationError(() => { t.expectValidationError(() => {
t.device.createPipelineLayout(badPipelineLayoutDescriptor); t.device.createPipelineLayout(badPipelineLayoutDescriptor);
}); });
}).params(pcombine(poptions('visibility', shaderStageCombinations), poptions('type', bindingTypes))); });
//# sourceMappingURL=createPipelineLayout.spec.js.map //# sourceMappingURL=createPipelineLayout.spec.js.map
\ No newline at end of file
...@@ -6,7 +6,7 @@ export const description = ` ...@@ -6,7 +6,7 @@ export const description = `
createRenderPipeline validation tests. createRenderPipeline validation tests.
`; `;
import { TestGroup, poptions } from '../../../framework/index.js'; import { TestGroup, poptions } from '../../../framework/index.js';
import { textureFormatInfo, textureFormats } from '../format_info.js'; import { kTextureFormatInfo, kTextureFormats } from '../capability_info.js';
import { ValidationTest } from './validation_test.js'; import { ValidationTest } from './validation_test.js';
class F extends ValidationTest { class F extends ValidationTest {
...@@ -127,7 +127,7 @@ g.test('at least one color state is required', async t => { ...@@ -127,7 +127,7 @@ g.test('at least one color state is required', async t => {
}); });
g.test('color formats must be renderable', async t => { g.test('color formats must be renderable', async t => {
const format = t.params.format; const format = t.params.format;
const info = textureFormatInfo[format]; const info = kTextureFormatInfo[format];
const descriptor = t.getDescriptor({ const descriptor = t.getDescriptor({
colorStates: [{ colorStates: [{
format format
...@@ -143,7 +143,7 @@ g.test('color formats must be renderable', async t => { ...@@ -143,7 +143,7 @@ g.test('color formats must be renderable', async t => {
t.device.createRenderPipeline(descriptor); t.device.createRenderPipeline(descriptor);
}); });
} }
}).params(poptions('format', textureFormats)); }).params(poptions('format', kTextureFormats));
g.test('sample count must be valid', async t => { g.test('sample count must be valid', async t => {
const { const {
sampleCount, sampleCount,
......
...@@ -6,7 +6,7 @@ export const description = ` ...@@ -6,7 +6,7 @@ export const description = `
createTexture validation tests. createTexture validation tests.
`; `;
import { TestGroup, poptions } from '../../../framework/index.js'; import { TestGroup, poptions } from '../../../framework/index.js';
import { textureFormatInfo, textureFormats } from '../format_info.js'; import { kTextureFormatInfo, kTextureFormats } from '../capability_info.js';
import { ValidationTest } from './validation_test.js'; import { ValidationTest } from './validation_test.js';
class F extends ValidationTest { class F extends ValidationTest {
...@@ -223,7 +223,7 @@ g.test('it is invalid to submit a destroyed texture before and after encode', as ...@@ -223,7 +223,7 @@ g.test('it is invalid to submit a destroyed texture before and after encode', as
}]); }]);
g.test('it is invalid to have an output attachment texture with non renderable format', async t => { g.test('it is invalid to have an output attachment texture with non renderable format', async t => {
const format = t.params.format; const format = t.params.format;
const info = textureFormatInfo[format]; const info = kTextureFormatInfo[format];
const descriptor = t.getDescriptor({ const descriptor = t.getDescriptor({
width: 1, width: 1,
height: 1, height: 1,
...@@ -232,5 +232,5 @@ g.test('it is invalid to have an output attachment texture with non renderable f ...@@ -232,5 +232,5 @@ g.test('it is invalid to have an output attachment texture with non renderable f
t.expectValidationError(() => { t.expectValidationError(() => {
t.device.createTexture(descriptor); t.device.createTexture(descriptor);
}, !info.renderable); }, !info.renderable);
}).params(poptions('format', textureFormats)); // TODO: Add tests for compressed texture formats }).params(poptions('format', kTextureFormats)); // TODO: Add tests for compressed texture formats
//# sourceMappingURL=createTexture.spec.js.map //# sourceMappingURL=createTexture.spec.js.map
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment