GPUCompilationMessage: type 属性
注意:此功能在 Web Workers 中可用。
GPUCompilationMessage 接口的只读属性 type 是一个枚举值,表示消息的类型。每种类型代表不同的严重级别。
值
一个枚举值。可能的值是:
示例
js
const shaderModule = device.createShaderModule({
code: shaders,
});
const shaderInfo = await shaderModule.getCompilationInfo();
const firstMessage = shaderInfo.messages[0];
console.log(firstMessage.type);
有关更详细的示例,请参阅主要的 GPUCompilationInfo 页面。
规范
| 规范 |
|---|
| WebGPU # dom-gpucompilationmessage-type |
浏览器兼容性
加载中…