webgpu: Support pipeline-overridable constants (#33291)

* Impl pipeline constants

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* More relaxed lifetimes

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Update expectations

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Replace convert function with `From` implementation

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-09-04 13:31:07 +02:00 committed by GitHub
parent a976db3ec0
commit 3c6ca33832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 32 additions and 395 deletions

View file

@ -625,8 +625,11 @@ interface mixin GPUPipelineBase {
dictionary GPUProgrammableStage {
required GPUShaderModule module;
USVString entryPoint;
record<USVString, GPUPipelineConstantValue> constants;
};
typedef double GPUPipelineConstantValue; // May represent WGSL's bool, f32, i32, u32, and f16 if enabled.
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
interface GPUComputePipeline {
};