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.
84.23%
of browsers tested for this feature
Platform Support
Browser Support
| Browser | Support |
|---|---|
| Chrome/Chromium | 95.37% |
| Edge | 97.57% |
| Firefox | 0.47% |
| Opera | 98.44% |
| Other | 69.97% |
| Safari | 38.64% |
| Samsung Internet | 95.25% |
Vendor Support
| Vendor | Support |
|---|---|
| 0x10de | 0% |
| 0x8086 | 0% |
| amd | 93.88% |
| apple | 71.76% |
| arm | 96.8% |
| 0% | |
| huawei | 100% |
| img-tec | 100% |
| intel | 95.91% |
| intelr | 18.18% |
| microsoft | 100% |
| nvidia | 98.02% |
| qualcomm | 97.26% |
| samsung | 100% |
Vendor Architecture Support
| Vendor - Architecture | Support |
|---|---|
| amd - gcn-4 | 73.82% |
| amd - gcn-5 | 96.97% |
| amd - rdna-1 | 38.14% |
| amd - rdna-2 | 98.8% |
| amd - rdna-3 | 99.78% |
| apple - apple | 45.19% |
| apple - metal-3 | 99.48% |
| arm - bifrost | 95.62% |
| arm - valhall | 97.74% |
| intel - gen-11 | 95.3% |
| intel - gen-12lp | 98.89% |
| intel - gen-8 | 0.86% |
| intel - gen-9 | 93.52% |
| intel - xe-2lpg | 99.8% |
| intel - xe-lpg | 99.46% |
| nvidia - ampere | 98.41% |
| nvidia - blackwell | 99.19% |
| nvidia - kepler | 91.09% |
| nvidia - lovelace | 98.54% |
| nvidia - maxwell | 97.01% |
| nvidia - pascal | 96.79% |
| nvidia - turing | 97.86% |
| qualcomm - adreno-6xx | 97.17% |
| qualcomm - adreno-7xx | 97.67% |
| qualcomm - adreno-8xx | 98.93% |