TS8027
프런트엔드 코드 MAT_UNSUPPORTED
A non-square matCxR<f64>: the fp64 pass carries one df64 body per dimension (DF64MatN, matmul, matvec, transpose), so only a square matrix of doubles lowers.
레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.
발생 조건
A non-square matCxR<f64>: the fp64 pass carries one df64 body per dimension (DF64MatN, matmul, matvec, transpose), so only a square matrix of doubles lowers. Every matCxR<f32> is a type, so this no longer marks mat2/mat3.
예제
"use typeshade"
class Uniforms { m: mat3x2<f64>}
declare const u: uniform<Uniforms>
@fragmentexport function main(@location(0) uv: vec2): vec4 { return vec4(uv, 0., 1.)}빌드할 때 고정된 컴파일러로 이 프로그램을 컴파일하면 다음 진단이 나옵니다.
TS8027 error, 4행: mat3x2<f64> has no emulated-double form: the fp64 pass carries a square matrix of doubles only (mat2, mat3, mat4). Declare it mat3x2 and narrow, or use a square shape.
고치는 법
같은 프로그램을 고친 모습입니다. 진단 없이 컴파일됩니다.
"use typeshade"
class Uniforms { m: mat3<f64>}
declare const u: uniform<Uniforms>
@fragmentexport function main(@location(0) uv: vec2): vec4 { return vec4(uv, 0., 1.)}이 코드가 적용하는 규칙
- 규칙 4.8 테스트
- Every
matCxRwithCandRin 2, 3, 4 must be a type, and a square one must also answer tomatN.
함께 보기
소스
커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.