SD0044
이 페이지에서

SD0044

코어 코드

f64 in an interpolated @location IO field

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

프런트엔드에서

같은 실수를 한 "use typeshade" 파일은 이 검사까지 오지 않습니다. 프런트엔드가 자기 코드로 먼저 거부하기 때문입니다. 빌드할 때 컴파일한 아래 프로그램에는 다음 진단이 나옵니다.

example.shade.ts
"use typeshade"
@fragment
export function main(@location(0) d: f64): vec4 {
return vec4(f32(d), 0., 0., 1.)
}

TS8038 error, 4행: Parameter "d" carries f64: an emulated double is a pair of f32 words, and a @location varying interpolates each word on its own, which is not the interpolation of the double. Narrow it with f32(x), or compute the double in the stage that needs it — a uniform or storage binding carries an f64 and every stage can read one.

고치는 법

레지스트리의 힌트: interpolating hi/lo pairs is numerically wrong — narrow first (f32(x), or toF32(x) in the fn() EDSL), or read the double where it is needed: a uniform or storage binding carries an f64 and every stage can read one

함께 보기

TS8038 F64_ENTRY_IO
An emulated double (f64, a vec64) on an entry's IO boundary — a @location parameter, a @location field of an IO struct, or an entry's return.

소스

커밋 c66579bf에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

이 페이지 편집 문제 보고