Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
hlsl_release_string_buffer(ctx, string);
switch ($1){case HLSL_SAMPLER_DIM_BUFFER:if ($3->class > HLSL_CLASS_MATRIX){if (string)hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,"UAV data type %s is not scalar, vector, or matrix.", string->buffer);}else if ($3->reg_size[HLSL_REGSET_NUMERIC] > 4){if (string)hlsl_error(ctx, &@3, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,"UAV data type %s size exceeds 4-component register size.", string->buffer);}
This really should have tests.