这是indexloc提供的服务,不要输入任何密码
Skip to content

Consider making ShaderModule compilation errors special #2119

@Kangz

Description

@Kangz

We'd like to be able to put most of the work involved by createShaderModule off-thread but this is awkward because of the way createShaderModule reports errors. We want to compile shader modules off-thread so that an application can create tons of shadermodule and async pipelines without stalling the rest of the WebGPU processing.

Currently errors during compilation of shader modules happen immediately during the createShaderModule call. This means that due to promise ordering of error scopes, either shader modules are created immediately, or (under the as-if rule) other device-timeline callbacks are delayed until we know the result of createShaderModule. What if we said that createShaderModule errors only appeared inside 1) the compilation messages or 2) when the shader module is used to create a pipeline?

FYI @Jiawei-Shao

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions