[PATCH vkd3d v3 14/14] vkd3d-shader/hlsl: Fix an array dimension declaration order.

Henri Verbeet hverbeet at gmail.com
Mon Nov 8 04:26:43 CST 2021


On Fri, 5 Nov 2021 at 19:36, Matteo Bruni <mbruni at codeweavers.com> wrote:
> -            static const char dimensions[5][HLSL_SAMPLER_DIM_MAX + 1] =
> +            static const char dimensions[HLSL_SAMPLER_DIM_MAX + 1][5] =
>              {
If we're going to fix it, note that the first dimension doesn't need
to be explicit; this can just be "static const char dimensions[][5]
=". That applies to base_types[] earlier in the same function as well.

At the same time, while there are some advantages to this type of
string table over the variant that stores string pointers, it probably
doesn't help very much if we only use this variant for the two tables
in hlsl_type_to_string().



More information about the wine-devel mailing list