-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area: apiIssues related to API surfaceIssues related to API surfacetype: enhancementNew feature or requestNew feature or request
Milestone
Description
wgpu
currently has no API to inspect errors when compiling a shader module. On desktop, Device::create_shader_module
will panic on error. On web, the different browsers will print out error info to the console, but execution continues, and errors will usually occur later during pipeline creation with the errored ShaderModule
objects.
The WebGPU spec requires a GPUShaderModule.compilationInfo()
method that should return any errors generated during compilation.
Ideally, either:
- change
Device::create_shader_module
to idiomatically return aResult
, - or match the spec and add a
ShaderModule::compilation_info
method. The user can then inspect this info and return an error as appropriate.
Metadata
Metadata
Assignees
Labels
area: apiIssues related to API surfaceIssues related to API surfacetype: enhancementNew feature or requestNew feature or request