Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update validation tests for 3D textures with compression #3762

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/webgpu/api/validation/createTexture.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export const description = `createTexture validation tests.`;

import { SkipTestCase } from '../../../common/framework/fixture.js';
import { makeTestGroup } from '../../../common/framework/test_group.js';
import { assert, makeValueTestVariant } from '../../../common/util/util.js';
import { kTextureDimensions, kTextureUsages } from '../../capability_info.js';
Expand Down Expand Up @@ -101,7 +100,8 @@ g.test('zero_size_and_usage')

g.test('dimension_type_and_format_compatibility')
.desc(
`Test every dimension type on every format. Note that compressed formats and depth/stencil formats are not valid for 1D/3D dimension types.`
`Test every dimension type on every format. Note that compressed formats are not valid for 1D dimension type and
depth/stencil formats are not valid for 1D/3D dimension types.`
)
.params(u =>
u //
Expand Down Expand Up @@ -220,7 +220,6 @@ g.test('mipLevelCount,bound_check')
({ format, size, dimension }) =>
format === 'bc1-rgba-unorm' &&
(dimension === '1d' ||
dimension === '3d' ||
size[0] % kTextureFormatInfo[format].blockWidth !== 0 ||
size[1] % kTextureFormatInfo[format].blockHeight !== 0)
)
Expand Down Expand Up @@ -459,8 +458,8 @@ g.test('texture_size,default_value_and_smallest_size,compressed_format')
)
.params(u =>
u
// Compressed formats are invalid for 1D and 3D.
.combine('dimension', [undefined, '2d'] as const)
// Compressed formats are invalid for 1D.
.combine('dimension', [undefined, '2d', '3d'] as const)
.combine('format', kCompressedTextureFormats)
.beginSubcases()
.expandWithParams(p => {
Expand Down Expand Up @@ -989,11 +988,9 @@ g.test('texture_size,3d_texture,compressed_format')
})
)
.beforeAllSubcases(t => {
// Compressed formats are not supported in 3D in WebGPU v1 because they are complicated but not very useful for now.
throw new SkipTestCase('Compressed 3D texture is not supported');

const { format } = t.params;
const info = kTextureFormatInfo[format];
t.skipIfTextureFormatNotSupported(format);
t.selectDeviceOrSkipTestCase(info.feature);
})
.fn(t => {
Expand Down
Loading