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.
82.52%
of browsers tested for this feature
Platform Support
Browser Support
| Browser | Support |
|---|---|
| Chrome/Chromium | 94.96% |
| Edge | 97.91% |
| Firefox | 0.34% |
| Opera | 97.45% |
| Other | 70.83% |
| Safari | 31.23% |
| Samsung Internet | 96.5% |
Vendor Support
| Vendor | Support |
|---|---|
| amd | 93.49% |
| apple | 66.01% |
| arm | 97.99% |
| 0% | |
| img-tec | 100% |
| intel | 95.63% |
| intelr | 41.67% |
| microsoft | 100% |
| nvidia | 98.59% |
| qualcomm | 96.75% |
| samsung | 100% |
| venus | 0% |
Vendor Architecture Support
| Vendor - Architecture | Support |
|---|---|
| amd - gcn-4 | 71.07% |
| amd - gcn-5 | 96.86% |
| amd - rdna-1 | 35.52% |
| amd - rdna-2 | 99.09% |
| amd - rdna-3 | 99.73% |
| apple - apple | 33.73% |
| apple - metal-3 | 99.66% |
| arm - bifrost | 98.29% |
| arm - valhall | 97.81% |
| intel - gen-11 | 93.75% |
| intel - gen-12lp | 99% |
| intel - gen-8 | 4.23% |
| intel - gen-9 | 92.97% |
| intel - xe-2lpg | 100% |
| intel - xe-lpg | 99.58% |
| nvidia - ampere | 98.68% |
| nvidia - blackwell | 99.63% |
| nvidia - kepler | 90.44% |
| nvidia - lovelace | 99.14% |
| nvidia - maxwell | 97.77% |
| nvidia - pascal | 98.93% |
| nvidia - turing | 98.46% |
| qualcomm - adreno-6xx | 96.41% |
| qualcomm - adreno-7xx | 97.6% |
| qualcomm - adreno-8xx | 97.94% |