WgslValidator
인터페이스, 배리언트 분류
The slice of GPUDevice that validating a WGSL module needs.
import type { WgslValidator } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface WgslValidator<Module = unknown> { createShaderModule(descriptor: { code: string }): Module;}설명
A real GPUDevice satisfies this as-is: pass it straight in. The interface is structural
for the same two reasons as GlLinker: the package builds without WebGPU type
definitions, and a test can drive the result aggregation with a recorder while the real
run goes through the browser’s WGSL compiler.
인스턴스 메서드
createShaderModule(descriptor: { code: string }): Module
함께 보기
소스
src/core/variant-link.ts, 181행, 커밋 c66579bf 기준