Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.y:
case HLSL_CLASS_SCALAR:
int_cast = hlsl_get_scalar_type(ctx, HLSL_TYPE_INT);
break;
case HLSL_CLASS_VECTOR:
int_cast = hlsl_get_vector_type(ctx, HLSL_TYPE_INT, arg_type->dimx * arg_type->dimy);
break;
case HLSL_CLASS_MATRIX:
int_cast = hlsl_get_matrix_type(ctx, HLSL_TYPE_INT, arg_type->dimx, arg_type->dimy);
break;
default:
if ((string = hlsl_type_to_string(ctx, arg_type)))
hlsl_error(ctx, loc, VKD3D_SHADER_ERROR_HLSL_INVALID_TYPE,
"Expression class '%s' is not scalar/vector/matrix.", string->buffer);
hlsl_release_string_buffer(ctx, string);
return false;
- }
This is hlsl_get_numeric_type().
The error should be unnecessary in any case; that's what the "check_numeric" field is for.