Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.h:
* If base_type is HLSL_TYPE_TEXTURE, then sampler_dim can have any value of the enum.
* If base_type is HLSL_TYPE_UAV, them sampler_dim must be one of HLSL_SAMPLER_DIM_1D,
* HLSL_SAMPLER_DIM_2D, HLSL_SAMPLER_DIM_3D, HLSL_SAMPLER_DIM_1DARRAY, or HLSL_SAMPLER_DIM_2DARRAY.
enum hlsl_sampler_dim sampler_dim;* Otherwise, sampler_dim is not used */
- /* Name, in case the type is a named struct or a typedef. */ const char *name;
- /* Bitfield for storing type modifiers, subset of HLSL_TYPE_MODIFIERS_MASK.
* Modifiers that don't fall inside this mask are to be stored in the variable in
unsigned int modifiers;* hlsl_ir_var.modifiers, or in the struct field in hlsl_ir_field.modifiers. */
- /* Size of the type values on each dimension. For non-numeric types, they are set for the
* convenience of the sm1/sm4 backends.
* If type is HLSL_CLASS_SCALAR, then both dimx = 1 and dimy = 1.
* If type is HLSL_CLASS_VECTOR, then dimx is the size of the vector, and dimy = 1.
* If type is HLSL_CLASS_MATRIX, then dimx is the number of rows, and dimy the number of columns.
Isn't that the other way around? My recalling and my notebook agree that `float2x3` is the type of matrices with 2 rows and 3 columns, which have `dimx == 3` and `dimy == 2` (it's the same as type `matrix<float, 3, 2>`, and is stored in `ctx->builtin_types.matrix[FLOAT][2][1]`).