Failed to handle value constructor in module scope
bbbbx opened this issue · comments
tint will generate some code like this:
const v2 = vec2f(0.0f, 0.0f);
const v3 = vec3f(0.0f, 0.0f, 0.0f);
const v4 = vec4f(0.0f, 0.0f, 0.0f, 0.0f);
const M3 = mat3x3f(v3, v3, v3);
const M4 = mat4x4f(v4, v4, v4, v4);
fn fv2(outVar : ptr<function, vec2f>) {
*(outputValue) = v2;
return;
}
fn fv3(outVar : ptr<function, vec3f>) {
*(outputValue) = v3;
return;
}
fn fv4(outVar : ptr<function, vec4f>) {
*(outVar ) = v4;
return;
}
fn fM3(outVar : ptr<function, mat3x3<f32>>) {
*(outVar) = M3;
return;
}
fn fM4(outVar : ptr<function, mat4x4<f32>>) {
*(outVar) = M4;
return;
}
Error: Non const function: vec3f
Error: Non const function: vec2f
Error: Non const function: vec4f
Error: Non const function: mat3x3f
Error: Non const function: mat4x4f
I'll get that fixed up soon.
By "soon" I guess I meant a couple months. Fixed in ffdb63c