textureFormatSupport method

  1. @override
TextureFormatSupport textureFormatSupport(
  1. TextureFormat format
)
override

inner's answer, with a masked compression family answering TextureFormatSupport.none and the masked float32 features taking their half of the 32-bit float formats' answer away.

Implementation

@override
TextureFormatSupport textureFormatSupport(TextureFormat format) {
  for (final MapEntry(key: feature, value: formats) in _families.entries) {
    if (_off(feature) && formats.contains(format)) {
      return TextureFormatSupport.none;
    }
  }
  final s = inner.textureFormatSupport(format);
  if (!_float32.contains(format)) return s;
  final renderable = s.renderable && !_off(DeviceFeature.float32Renderable);
  return TextureFormatSupport(
    sampled: s.sampled,
    filterable: s.filterable && !_off(DeviceFeature.float32Filterable),
    renderable: renderable,
    blendable:
        renderable && s.blendable && !_off(DeviceFeature.float32Blendable),
    multisample: renderable && s.multisample,
    resolve: renderable && s.resolve,
    depthStencil: s.depthStencil,
    storage: s.storage,
    storageReadWrite: s.storageReadWrite,
  );
}