supportsStencil property

  1. @override
bool get supportsStencil

Whether the depth attachment this device hands out carries a stencil that PassEncoder.setStencil can test against.

Ask before requesting it, as with supportsWireframe: a stencil test configured against an attachment that has none passes always on one API and is an invalid descriptor on another, and neither is the silhouette somebody asked for. The renderer's x-ray stage draws nothing at all on a device that answers false, which is a picture without silhouettes rather than a frame with something wrong in it.

True on all three backends here — every depth format the engine names packs eight stencil bits beside the depth, and the software rasteriser keeps a byte per pixel for the purpose. It is a question rather than a constant because defaultDepthStencilFormat is allowed to be TextureFormat.unknown, and a device with no depth-stencil format has no stencil either.

Implementation

@override
bool get supportsStencil => true;