CapSupport
이 페이지에서

CapSupport

인터페이스, 백엔드 분류

What one capability costs on one target: the row of a backend's capProfile.

import type { CapSupport } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

interface CapSupport {
readonly directive?: string;
readonly hostFeature?: string;
}

설명

What one capability costs on one target: the row of a backend’s capProfile. Both fields are optional and mean different things.

An empty row ({}) means the target supports the capability outright, with no directive and no host activation (storage buffers on WGSL, float render targets on WebGPU).

인스턴스 속성

directive선택 사항읽기 전용 string

The token the emitted source must carry for this target to accept the feature: WGSL enable <directive>;, GLSL ES 3.00 #extension <directive> : require. When absent, the feature adds nothing to the emitted source.

hostFeature선택 사항읽기 전용 string

What the host must activate before pipeline creation: gl.getExtension('<hostFeature>') on WebGL2, a requiredFeatures: ['<hostFeature>'] entry on WebGPU. When absent, the feature is core on that target and there is nothing to request.

소스

src/core/backend.ts, 38행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고