Intent to Ship: WebGPU: 'primitive_index' feature

333 views
Skip to first unread message

Chromestatus

unread,
Aug 22, 2025, 4:17:05 PM (13 days ago) Aug 22
to blin...@chromium.org, baj...@chromium.org

Contact emails

baj...@chromium.org

Explainer

https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/tint/extensions/chromium_experimental_primitive_id.md

Specification

https://gpuweb.github.io/gpuweb/#dom-gpufeaturename-primitive-index

Summary

This feature adds a new optional capability to WebGPU that exposes a new WGSL shader builtin, 'primitive_index'. This builtin provides a per-primitive index to fragment shaders on supported hardware, similar to the existing vertex_index and instance_index builtins. The primitive index is useful for advanced graphical techniques, such as virtualized geometry.



Blink component

Blink>WebGPU

Search tags

webgpu, primitive

TAG review

None

TAG review status

Pending

Risks



Interoperability and Compatibility

Little to none. It's a fairly minor feature that all implementors have voiced support for. The feature is optional and support for it must be explicitly queried through the standard WebGPU supported features mechanism. Some hardware doesn't expose it yet, so developers need to structure their apps to have a fallback path anyway.



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

Ergonomics

None.



Activation

None.



Security

None.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

WGSL shader feature. Shaders generally lack debugging support in browsers.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Feature is widely supported and has equivalents in all Native APIs that WebGPU is implemented on top of. Some older hardware lacks ability to report the value, which is why it's an optional feature.



Is this feature fully tested by web-platform-tests?

No

WebGPU CTS tests are a WIP: https://github.com/gpuweb/cts/pull/4435



Flag name on about://flags

enable-unsafe-webgpu

Finch feature name

None

Non-finch justification

None

Rollout plan

Will ship enabled for all users

Requires code in //chrome?

False

Tracking bug

https://issues.chromium.org/issues/342172182

Estimated milestones

No milestones specified



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6467722716250112?gate=4665168428662784

This intent message was generated by Chrome Platform Status.

Yoav Weiss (@Shopify)

unread,
Aug 25, 2025, 4:56:32 AM (11 days ago) Aug 25
to Chromestatus, blin...@chromium.org, baj...@chromium.org
Can you request reviews for security/privacy/etc in chromestatus?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68a8d032.050a0220.8fac8.a218.GAE%40google.com.

Daniel Bratell

unread,
Aug 27, 2025, 4:03:12 AM (9 days ago) Aug 27
to Yoav Weiss (@Shopify), Chromestatus, blin...@chromium.org, baj...@chromium.org

The Explainer link is a 404 or has restricted access. We need the explainer to be public.

/Daniel

Brandon Jones

unread,
Aug 27, 2025, 2:17:40 PM (8 days ago) Aug 27
to Daniel Bratell, Yoav Weiss (@Shopify), Chromestatus, blin...@chromium.org
Apologies! We're currently trying to decide where docs like that should live after we move them out of experimental status. In the meantime you can see the historical copy of the explainer here: https://dawn.googlesource.com/dawn/+/2819d509eff7e314e5ebce15cc3a7cb13370a505/docs/tint/extensions/chromium_experimental_primitive_id.md

(Note that at the time the explainer was written the feature was going to be named primitive_id, the rename to primitive_index was a relatively late change by the working group.)

--Brandon

Alex Russell

unread,
Sep 3, 2025, 10:13:26 AM (2 days ago) Sep 3
to blink-dev, Brandon Jones, Yoav Weiss, Chromestatus, blin...@chromium.org, Daniel Bratell
Thanks for this, Brandon.

As you know, the collateral we need to go first is much higher than when closing compatibility gaps.

This explainer doesn't indicate why anyone needs the feature, show the before/after state of example code, or discuss considered alternatives. I'm inclined to support the feature, but can't without more to go on. Can you produce and updated explainer with the various things we usually expect to see? 

Best,

Alex
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Brandon Jones

unread,
Sep 3, 2025, 2:49:21 PM (2 days ago) Sep 3
to Alex Russell, blink-dev, Yoav Weiss, Chromestatus, Daniel Bratell
Hey Alex!

An updated explainer is now hosted at https://github.com/gpuweb/gpuweb/blob/main/proposals/primitive-index.md. It's still fairly brief because this is a relatively small feature.

--Brandon

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Reply all
Reply to author
Forward
0 new messages