On Fri, 5 Nov 2021 at 19:36, Matteo Bruni mbruni@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().