@@ -12,19 +12,15 @@ import {
12
12
import { makeTestGroup } from '../../../../../common/framework/test_group.js' ;
13
13
import { raceWithRejectOnTimeout , unreachable , assert } from '../../../../../common/util/util.js' ;
14
14
import { kTextureUsages } from '../../../../capability_info.js' ;
15
- import {
16
- kTextureFormatInfo ,
17
- kAllTextureFormats ,
18
- kValidTextureFormatsForCopyE2T ,
19
- } from '../../../../format_info.js' ;
15
+ import { kAllTextureFormats , kValidTextureFormatsForCopyE2T } from '../../../../format_info.js' ;
20
16
import { kResourceStates } from '../../../../gpu_test.js' ;
21
17
import {
22
18
CanvasType ,
23
19
createCanvas ,
24
20
createOnscreenCanvas ,
25
21
createOffscreenCanvas ,
26
22
} from '../../../../util/create_elements.js' ;
27
- import { ValidationTest } from '../../validation_test.js' ;
23
+ import { AllFeaturesMaxLimitsValidationTest } from '../../validation_test.js' ;
28
24
29
25
const kDefaultBytesPerPixel = 4 ; // using 'bgra8unorm' or 'rgba8unorm'
30
26
const kDefaultWidth = 32 ;
@@ -136,7 +132,7 @@ function generateCopySizeForDstOOB({ mipLevel, dstOrigin }: WithDstOriginMipLeve
136
132
] ;
137
133
}
138
134
139
- class CopyExternalImageToTextureTest extends ValidationTest {
135
+ class CopyExternalImageToTextureTest extends AllFeaturesMaxLimitsValidationTest {
140
136
onlineCrossOriginUrl = 'https://raw.githubusercontent.com/gpuweb/gpuweb/main/logo/webgpu.png' ;
141
137
142
138
getImageData ( width : number , height : number ) : ImageData {
@@ -541,9 +537,7 @@ g.test('destination_texture,device_mismatch')
541
537
'Tests copyExternalImageToTexture cannot be called with a destination texture created from another device'
542
538
)
543
539
. paramsSubcasesOnly ( u => u . combine ( 'mismatched' , [ true , false ] ) )
544
- . beforeAllSubcases ( t => {
545
- t . selectMismatchedDeviceOrSkipTestCase ( undefined ) ;
546
- } )
540
+ . beforeAllSubcases ( t => t . usesMismatchedDevice ( ) )
547
541
. fn ( async t => {
548
542
const { mismatched } = t . params ;
549
543
const sourceDevice = mismatched ? t . mismatchedDevice : t . device ;
@@ -678,13 +672,9 @@ g.test('destination_texture,format')
678
672
{ width : 1 , height : 1 , depthOrArrayLayers : 1 } ,
679
673
] )
680
674
)
681
- . beforeAllSubcases ( t => {
682
- const { format } = t . params ;
683
- t . skipIfTextureFormatNotSupportedDeprecated ( format ) ;
684
- t . selectDeviceOrSkipTestCase ( kTextureFormatInfo [ format ] . feature ) ;
685
- } )
686
675
. fn ( async t => {
687
676
const { format, copySize } = t . params ;
677
+ t . skipIfTextureFormatNotSupported ( format ) ;
688
678
689
679
const imageBitmap = await t . createImageBitmap ( t . getImageData ( 1 , 1 ) ) ;
690
680
0 commit comments