Skip to content

Commit

Permalink
Skip tests failing when VideoFrame is not supported. (#3917)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kangz authored Aug 28, 2024
1 parent 19bb6db commit a72996c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ Parameters:
.combine('C', ['i32', 'u32'] as const)
.combine('L', ['i32', 'u32'] as const)
)
.beforeAllSubcases(t =>
t.skipIf(typeof VideoFrame === 'undefined', 'VideoFrames are not supported')
)
.fn(async t => {
const { samplePoints, C, L } = t.params;

Expand All @@ -483,6 +486,7 @@ Parameters:
size,
usage: GPUTextureUsage.COPY_DST,
};

const { texels, videoFrame } = createVideoFrameWithRandomDataAndGetTexels(descriptor.size);
const texture = t.device.importExternalTexture({ source: videoFrame });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ Parameters:
.combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const)
.combine('minFilter', ['nearest', 'linear'] as const)
)
.beforeAllSubcases(t =>
t.skipIf(
t.params.textureType === 'texture_external' && typeof VideoFrame === 'undefined',
'VideoFrames are not supported'
)
)
.fn(async t => {
const { textureType, samplePoints, addressModeU, addressModeV, minFilter } = t.params;

Expand Down

0 comments on commit a72996c

Please sign in to comment.