mesa/src/compiler
Caio Oliveira c9b7639a7d compiler/types: Fix array name dimension flipping for unsized arrays
Rewrite the code to use linear_asprintf and always flip the
dimensions in place if the element type is an array.  The new
code will now (correctly) flip even in the case of unsized arrays.

The flipping is done by swapping the ranges [a, b) and [b, c), as
shown below, with element type int[...] and an array of length 4.

```
           +--------------- a: first bracket in the name
           |    +---------- b: end of the element name
           |    |  +------- c: end of the array name
           |    |  |
        int[...][4]$

will be transformed into

        int[4][...]$
```

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23278>
2023-09-15 01:21:40 +00:00
..
clc nir: move the libclc lowering over to functions file. 2023-09-12 01:57:50 +00:00
glsl glsl: Annotate _mesa_glsl_error() with PRINTFLIKE 2023-09-15 00:45:05 +00:00
isaspec isaspec: Make possible to obtain gpu_id in <expr> blocks 2023-09-05 16:19:29 +00:00
nir compiler/types: Remove unused GLSL_TYPE_FUNCTION and related functions 2023-09-12 23:18:12 +00:00
spirv spirv: use a pointer sized int type for opencl event_t 2023-09-13 00:22:51 +00:00
builtin_type_defs.c compiler/types: Move builtin type initialization to C 2023-09-13 05:16:59 +00:00
builtin_type_macros.h compiler/types: Add workaround to use builtin_type_macros.h in C 2023-09-13 05:16:58 +00:00
glsl_types.cpp compiler/types: Fix array name dimension flipping for unsized arrays 2023-09-15 01:21:40 +00:00
glsl_types.h compiler/types: Move builtin type initialization to C 2023-09-13 05:16:59 +00:00
meson.build compiler/types: Move builtin type initialization to C 2023-09-13 05:16:59 +00:00
nir_gl_types.h
nir_types.cpp compiler/types: Remove unused GLSL_TYPE_FUNCTION and related functions 2023-09-12 23:18:12 +00:00
nir_types.h compiler/types: Remove unused GLSL_TYPE_FUNCTION and related functions 2023-09-12 23:18:12 +00:00
shader_enums.c nir: Add shader enqueue data structures and handling 2023-08-18 16:57:22 +00:00
shader_enums.h nir: Add shader enqueue data structures and handling 2023-08-18 16:57:22 +00:00
shader_info.h nir: Add shader enqueue data structures and handling 2023-08-18 16:57:22 +00:00