Contact emails
bajo...@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 (eg links to known github issues in the project 
for the feature specification) whose resolution may introduce web 
compat/interop risk (eg, 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.

-- 
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+unsubscr...@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.

Reply via email to