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 |
瀏覽器相容性
載入中…