Skip to content

Commit

Permalink
texture builtin offset subcase to case
Browse files Browse the repository at this point in the history
Several GPUs have bugs with offset. Making it a case
isntead of a subcase means it's easier to suppress these
failures without losing other coverage.
  • Loading branch information
greggman committed Oct 14, 2024
1 parent 00c3c50 commit 93eda29
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ Parameters:
.combine('format', kTestableColorFormats)
.filter(t => isFillable(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('C', ['i32', 'u32'] as const)
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
Expand Down Expand Up @@ -514,11 +514,11 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('offset', [false, true] as const)
)
.fn(async t => {
const { format, stage, samplePoints, addressModeU, addressModeV, minFilter, offset } = t.params;
Expand Down Expand Up @@ -696,12 +696,12 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('compare', kCompareFunctions)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
Expand Down Expand Up @@ -293,12 +293,12 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('C', ['i32', 'u32'] as const)
.combine('samplePoints', kSamplePointMethods)
.combine('addressMode', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('compare', kCompareFunctions)
.combine('offset', [false, true] as const)
)
.fn(async t => {
const { format, C, stage, samplePoints, addressMode, compare, minFilter, offset } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ Parameters:
u
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('samplePoints', kSamplePointMethods)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -229,15 +229,15 @@ Parameters:
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('viewDimension', ['3d', 'cube'] as const)
.filter(t => isSupportedViewFormatCombo(t.format, t.viewDimension))
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
.beginSubcases()
.combine('samplePoints', kCubeSamplePointMethods)
.filter(t => t.samplePoints !== 'cube-edges' || t.viewDimension !== '3d')
.beginSubcases()
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeW', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -351,12 +351,12 @@ Parameters:
.filter(t => isDepthTextureFormat(t.format))
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.fn(async t => {
const { format, samplePoints, addressModeU, addressModeV, minFilter, offset } = t.params;
Expand Down Expand Up @@ -435,13 +435,13 @@ Parameters:
u
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -714,12 +714,12 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.beginSubcases()
.combine('offset', [false, true] as const)
.combine('samplePoints', kSamplePointMethods)
.combine('addressMode', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('A', ['i32', 'u32'] as const)
.combine('L', ['i32', 'u32'] as const)
.combine('offset', [false, true] as const)
)
.fn(async t => {
const { format, samplePoints, addressMode, minFilter, A, L, offset } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ Parameters:
u
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('samplePoints', kSamplePointMethods)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -149,15 +149,15 @@ Parameters:
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('viewDimension', ['3d', 'cube'] as const)
.filter(t => isSupportedViewFormatCombo(t.format, t.viewDimension))
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
.beginSubcases()
.combine('samplePoints', kCubeSamplePointMethods)
.filter(t => t.samplePoints !== 'cube-edges' || t.viewDimension !== '3d')
.beginSubcases()
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeW', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -273,13 +273,13 @@ Parameters:
u
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('compare', kCompareFunctions)
.combine('offset', [false, true] as const)
)
.fn(async t => {
const { format, samplePoints, addressModeU, addressModeV, minFilter, compare, offset } =
Expand Down Expand Up @@ -240,13 +240,13 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('compare', kCompareFunctions)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('compare', kCompareFunctions)
.combine('offset', [false, true] as const)
)
.fn(async t => {
const { format, stage, samplePoints, addressModeU, addressModeV, minFilter, compare, offset } =
Expand Down Expand Up @@ -268,13 +268,13 @@ Parameters:
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('compare', kCompareFunctions)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ Parameters:
.combine('stage', kShaderStages)
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -160,15 +160,15 @@ Parameters:
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('viewDimension', ['3d', 'cube'] as const)
.filter(t => isSupportedViewFormatCombo(t.format, t.viewDimension))
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
.beginSubcases()
.combine('samplePoints', kCubeSamplePointMethods)
.filter(t => t.samplePoints !== 'cube-edges' || t.viewDimension !== '3d')
.beginSubcases()
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeW', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -296,13 +296,13 @@ Parameters:
.combine('stage', kShaderStages)
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ Parameters:
.combine('stage', kShaderStages)
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -172,13 +172,13 @@ Parameters:
.combine('stage', kShaderStages)
.combine('format', kTestableColorFormats)
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('A', ['i32', 'u32'] as const)
.combine('addressModeU', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -281,13 +281,13 @@ Parameters:
.filter(t => isPotentiallyFilterableAndFillable(t.format))
.combine('viewDimension', ['3d', 'cube'] as const)
.filter(t => !isCompressedTextureFormat(t.format) || t.viewDimension === 'cube')
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
.beginSubcases()
.combine('samplePoints', kCubeSamplePointMethods)
.filter(t => t.samplePoints !== 'cube-edges' || t.viewDimension !== '3d')
.combine('addressMode', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('offset', [false, true] as const)
.filter(t => t.viewDimension !== 'cube' || t.offset !== true)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -515,12 +515,12 @@ Parameters:
.filter(t => isDepthTextureFormat(t.format))
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressMode', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('L', ['i32', 'u32'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down Expand Up @@ -621,13 +621,13 @@ Parameters:
.filter(t => isDepthTextureFormat(t.format))
// MAINTENANCE_TODO: Remove when support for depth24plus, depth24plus-stencil8, and depth32float-stencil8 is added.
.filter(t => isEncodableTextureFormat(t.format))
.combine('offset', [false, true] as const)
.beginSubcases()
.combine('samplePoints', kSamplePointMethods)
.combine('addressMode', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
.combine('A', ['i32', 'u32'] as const)
.combine('L', ['i32', 'u32'] as const)
.combine('offset', [false, true] as const)
)
.beforeAllSubcases(t =>
skipIfTextureFormatNotSupportedNotAvailableOrNotFilterable(t, t.params.format)
Expand Down

0 comments on commit 93eda29

Please sign in to comment.