Skip to content

Commit

Permalink
Fix textureNumLayers view_type subcase (#3963)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao authored Sep 24, 2024
1 parent 815ff2b commit 2cce943
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ Parameters
.params(u =>
u
.combine('texture_type', ['texture_2d_array', 'texture_cube_array'] as const)
.combine('view_type', ['full', 'partial'] as const)
.beginSubcases()
.combine('sampled_type', ['f32', 'i32', 'u32'] as const)
.combine('view_type', ['full', 'partial'] as const)
)
.beforeAllSubcases(t => {
t.skipIf(
t.isCompatibility && t.params.view === 'partial',
t.isCompatibility && t.params.view_type === 'partial',
'compatibility mode does not support partial layer views'
);
t.skipIf(
Expand Down Expand Up @@ -110,12 +110,11 @@ Parameters
.params(u =>
u
.combine('texture_type', ['texture_depth_2d_array', 'texture_depth_cube_array'] as const)
.beginSubcases()
.combine('view_type', ['full', 'partial'] as const)
)
.beforeAllSubcases(t => {
t.skipIf(
t.isCompatibility && t.params.view === 'partial',
t.isCompatibility && t.params.view_type === 'partial',
'compatibility mode does not support partial layer views'
);
t.skipIf(
Expand Down Expand Up @@ -184,14 +183,20 @@ Parameters
.params(u =>
u
.combineWithParams(TexelFormats)
.combine('view_type', ['full', 'partial'] as const)
.beginSubcases()
.combine('access_mode', ['read', 'write', 'read_write'] as const)
.filter(
t => t.access_mode !== 'read_write' || kTextureFormatInfo[t.format].color?.readWriteStorage
)
.combine('view_type', ['full', 'partial'] as const)
)
.beforeAllSubcases(t => t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format))
.beforeAllSubcases(t => {
t.skipIf(
t.isCompatibility && t.params.view_type === 'partial',
'compatibility mode does not support partial layer views'
);
t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format);
})
.fn(t => {
const { format, access_mode, view_type } = t.params;

Expand Down

0 comments on commit 2cce943

Please sign in to comment.