primitive-index
Adds the primitive_index builtin so fragment shaders can read which primitive in the current draw produced the fragment. A primitive is one triangle, line, or point from the draw call.
Check your device: WebGPU Capabilities Report.
More details: Developer Docs (MDN) Specification (W3C)
Overall Support
Percentage supporting this feature among reports tested for it.
80.9%
of browsers tested for this feature
Platform Support
Browser Support
| Browser | Support |
|---|---|
| Chrome/Chromium | 94.53% |
| Edge | 97.73% |
| Firefox | 0.22% |
| Opera | 96.37% |
| Other | 56.11% |
| Safari | 12.4% |
| Samsung Internet | 95.74% |
Vendor Support
| Vendor | Support |
|---|---|
| amd | 92.88% |
| apple | 59.15% |
| arm | 98.16% |
| 0% | |
| img-tec | 99.15% |
| intel | 95.33% |
| intelr | 0% |
| mesa | 100% |
| microsoft | 80% |
| nvidia | 97.64% |
| qualcomm | 97.27% |
| samsung | 100% |
Vendor Architecture Support
| Vendor - Architecture | Support |
|---|---|
| amd - gcn-4 | 74.28% |
| amd - gcn-5 | 96.33% |
| amd - rdna-1 | 35.06% |
| amd - rdna-2 | 98.33% |
| amd - rdna-3 | 99.58% |
| apple - apple | 14.6% |
| apple - metal-3 | 99.53% |
| arm - bifrost | 98.48% |
| arm - valhall | 97.92% |
| intel - gen-11 | 93.05% |
| intel - gen-12lp | 98.57% |
| intel - gen-8 | 6.62% |
| intel - gen-9 | 93.12% |
| intel - xe-2lpg | 100% |
| intel - xe-lpg | 99.12% |
| nvidia - ampere | 97.55% |
| nvidia - blackwell | 98.91% |
| nvidia - kepler | 93.84% |
| nvidia - lovelace | 97.52% |
| nvidia - maxwell | 99.35% |
| nvidia - pascal | 97.15% |
| nvidia - turing | 98% |
| qualcomm - adreno-6xx | 97.69% |
| qualcomm - adreno-7xx | 97.22% |
| qualcomm - adreno-8xx | 99.31% |