@@ -542,6 +542,7 @@ g.test('check_capability_guarantees')
542542 `check any adapter returned by requestAdapter() must provide the following guarantees:
543543 - "texture-compression-bc" is supported or both "texture-compression-etc2" and "texture-compression-astc" are supported
544544 - either "texture-compression-bc" or "texture-compression-bc-sliced-3d" is supported, both must be supported.
545+ - if "texture-compression-astc-sliced-3d" is supported, then "texture-compression-astc" must be supported.
545546 `
546547 )
547548 . fn ( async t => {
@@ -551,16 +552,24 @@ g.test('check_capability_guarantees')
551552 const features = adapter . features ;
552553
553554 const supportsBC = features . has ( 'texture-compression-bc' ) ;
554- const supportsETC2ASTC =
555- features . has ( 'texture-compression-etc2' ) && features . has ( 'texture-compression-astc' ) ;
556555 const supportsBCSliced3D = features . has ( 'texture-compression-bc-sliced-3d' ) ;
556+ const supportsASTC = features . has ( 'texture-compression-astc' ) ;
557+ const supportsASTCSliced3D = features . has ( 'texture-compression-astc-sliced-3d' ) ;
558+ const supportsETC2 = features . has ( 'texture-compression-etc2' ) ;
557559
558- t . expect ( supportsBC || supportsETC2ASTC , 'Adapter must support BC or both ETC2 and ASTC' ) ;
560+ t . expect (
561+ supportsBC || ( supportsETC2 && supportsASTC ) ,
562+ 'Adapter must support BC or both ETC2 and ASTC'
563+ ) ;
559564
560565 if ( supportsBC || supportsBCSliced3D ) {
561566 t . expect (
562567 supportsBC && supportsBCSliced3D ,
563568 'If BC or BC Sliced 3D is supported, both must be'
564569 ) ;
565570 }
571+
572+ if ( supportsASTCSliced3D ) {
573+ t . expect ( supportsASTC , 'If ASTC Sliced 3D is supported, ASTC must be supported' ) ;
574+ }
566575 } ) ;
0 commit comments