On Tue, Mar 2, 2021 at 10:35 PM Zebediah Figura zfigura@codeweavers.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
libs/vkd3d-shader/hlsl.y | 97 ++++++++++++++++++++++++++++++---------- 1 file changed, 74 insertions(+), 23 deletions(-)
I'm hijacking this one just to refer to the existing code.
@@ -1438,7 +1459,8 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t if (size < type->dimx * type->dimy) { hlsl_error(ctx, v->loc, VKD3D_SHADER_ERROR_HLSL_WRONG_PARAMETER_COUNT,
"Wrong number of parameters in numeric initializer.");
"Expected %u components in numeric initializer, but got %u.",
type->dimx * type->dimy, size); free_parse_initializer(&v->initializer); vkd3d_free(v); continue;
It would be interesting to know (or probably, remember) why this is complaining if the initializer is smaller than required but not if it's larger. Native _43 seems to report an error in both cases, maybe older compilers didn't? Or maybe it's just wrong...