TS8027
On this page

TS8027

Front-end code MAT_UNSUPPORTED

A non-square matCxR<f64>: the fp64 pass carries one double-float body for each dimension, so only a square matrix of doubles lowers. Every matCxR<f32> is a type.

The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.

The registry text and every compiler message on these pages are the compiler's own English.

Example

example.shade.ts
"use typeshade"
class Uniforms {
m: mat3x2<f64>
}
declare const u: uniform<Uniforms>
@fragment
export function main(uv: location<0, vec2>): vec4 {
return vec4(uv, 0., 1.)
}

Compiled at build time against the pinned compiler, this program gets:

TS8027 error, line 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.

How to fix it

The same program, corrected. It compiles with no diagnostic.

example.shade.ts
"use typeshade"
class Uniforms {
m: mat3<f64>
}
declare const u: uniform<Uniforms>
@fragment
export function main(uv: location<0, vec2>): vec4 {
return vec4(uv, 0., 1.)
}

The rule this enforces

Rule 4.8 Test
Every matCxR with C and R in 2, 3, 4 must be a type, and a square one must also answer to matN.

See also

Source

Where the compiler raises this code at commit af54ddad5, one line per file:

Edit this page Report a problem