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.
85.11%
of browsers tested for this feature
Platform Support
Browser Support
| Browser | Support |
|---|---|
| Chrome/Chromium | 95.65% |
| Edge | 97.87% |
| Firefox | 0.69% |
| Opera | 98.48% |
| Other | 75.71% |
| Safari | 52.05% |
| Samsung Internet | 94.99% |
Vendor Support
| Vendor | Support |
|---|---|
| 0x10de | 0% |
| 0x8086 | 0% |
| adreno | 100% |
| amd | 94.33% |
| AMD | 0% |
| apple | 75.29% |
| arm | 97.39% |
| 0% | |
| huawei | 100% |
| img-tec | 100% |
| intel | 95.73% |
| intelr | 52.38% |
| microsoft | 94.12% |
| nvidia | 98.22% |
| qualcomm | 97.03% |
| samsung | 83.33% |
Vendor Architecture Support
| Vendor - Architecture | Support |
|---|---|
| amd - gcn-4 | 77.47% |
| amd - gcn-5 | 96.9% |
| amd - rdna-1 | 43.75% |
| amd - rdna-2 | 98.77% |
| amd - rdna-3 | 99.45% |
| apple - apple | 53.37% |
| apple - metal-3 | 99.56% |
| arm - bifrost | 95.88% |
| arm - valhall | 98.17% |
| intel - gen-11 | 95.02% |
| intel - gen-12lp | 98.9% |
| intel - gen-8 | 2.78% |
| intel - gen-9 | 93.18% |
| intel - xe-2lpg | 99.4% |
| intel - xe-lpg | 99.6% |
| nvidia - ampere | 98.1% |
| nvidia - blackwell | 99.32% |
| nvidia - kepler | 93.33% |
| nvidia - lovelace | 98.64% |
| nvidia - maxwell | 97.1% |
| nvidia - pascal | 98% |
| nvidia - turing | 98.26% |
| qualcomm - adreno-6xx | 96.17% |
| qualcomm - adreno-7xx | 98% |
| qualcomm - adreno-8xx | 99.12% |