In gpuweb/gpuweb#4387, the WebGPU API spec was changed such that, if there's only one appropriate entry point in the shader module, pipeline creation will just use that one automatically: you can omit its name from the GPUProgrammableStage when you create the pipeline.
This is a cute readability hack for small (and maybe not-so-small) examples, so folks are excited about using it in the WebGPU examples repo: webgpu/webgpu-samples#334
In our code, this would mean that wgpu_core::pipeline::ProgrammableStageDescriptor::entry_point would become an Option, consumers would use reflection to find the right entry point, and then callers in wgpu/Firefox/etc. would be changed to accommodate.
Since wgpu_core takes care of producing a naga::Module, it has enough information to choose an entry point before passing the module to wgpu_hal, so wgpu_hal can continue to require a specific name.
In gpuweb/gpuweb#4387, the WebGPU API spec was changed such that, if there's only one appropriate entry point in the shader module, pipeline creation will just use that one automatically: you can omit its name from the
GPUProgrammableStagewhen you create the pipeline.This is a cute readability hack for small (and maybe not-so-small) examples, so folks are excited about using it in the WebGPU examples repo: webgpu/webgpu-samples#334
In our code, this would mean that
wgpu_core::pipeline::ProgrammableStageDescriptor::entry_pointwould become anOption, consumers would use reflection to find the right entry point, and then callers inwgpu/Firefox/etc. would be changed to accommodate.Since
wgpu_coretakes care of producing anaga::Module, it has enough information to choose an entry point before passing the module towgpu_hal, sowgpu_halcan continue to require a specific name.