Regression: conversion of Half4x3
cybik opened this issue · 1 comments
cybik commented
Before,
half4x3 name = {name2[0*2 + 1], name2[1*2 + 1], name2[2*2 + 1], name2[3*2 + 1]};
was translated to
mat4x3 name = mat4x3(name2[0 * 2 + 1], name2[1 * 2 + 1], name2[2 * 2 + 1], name2[3 * 2 + 1]);
Now it translates to
context error (somefile.psh:109:22) : invalid number of elements in initializer expression for type 'half4x3' (expected 12, but got 4)
half4x3 name = {name2[0*2 + 1], name2[1*2 + 1], name2[2*2 + 1], name2[3*2 + 1]};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
analyzing input code failed
compilation failed
LukasBanana commented
Ah yes, the analysis of initializers is still incomplete. I'll fix this next week.
For now, initializers that are used to initialize variables of basic types (which are scalar, vector, and matrix) can only initialize them with scalar values, i.e. a 4x3 matrix needs an initializer with 4*3=12 elements.