---
title: MTLVisibilityResultMode.counting
framework: metal
role: symbol
role_heading: Case
path: metal/mtlvisibilityresultmode/counting
---

# MTLVisibilityResultMode.counting

The result records how many samples passed depth and stencil tests.

## Declaration

```swift
case counting
```

## Discussion

Discussion The GPU writes a 64-bit integer to the visibility result buffer that is the number of samples that passed depth and stencil tests; this can be zero. Counting is not supported by all GPUs. Check the following documents to see whether a GPU family supports counting occlusion queries: Metal feature set tables (PDF) Metal feature set tables (Numbers)

## See Also

### Result modes

- [MTLVisibilityResultMode.disabled](metal/mtlvisibilityresultmode/disabled.md)
- [MTLVisibilityResultMode.boolean](metal/mtlvisibilityresultmode/boolean.md)
