mesa/src/compiler
Daniel Schürmann 79a987ad2a nir/opt_if: also merge break statements with ones after the branch
This optimizations turns

     loop {
        ...
        if (cond1) {
           if (cond2) {
              do_work_1();
              break;
           } else {
              do_work_2();
           }
           do_work_3();
           break;
        } else {
           ...
        }
     }

 into:

     loop {
        ...
        if (cond1) {
           if (cond2) {
              do_work_1();
           } else {
              do_work_2();
              do_work_3();
           }
           break;
        } else {
           ...
        }
     }

As this optimizations moves code into the NIF statement,
it re-iterates on the branch legs in case of success.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7587>
2022-01-13 02:30:32 +00:00
..
clc clc: Use kernel_arg_type_qual string to add const type qualifier to arg metadata 2021-11-15 07:47:00 -08:00
glsl glsl/nir: don't pass gl_context to the convertor routine. 2022-01-07 06:19:49 +00:00
isaspec isaspec: Remove duplicate return statement. 2022-01-05 22:13:48 -08:00
nir nir/opt_if: also merge break statements with ones after the branch 2022-01-13 02:30:32 +00:00
spirv spirv: mark [Clip|Cull]DistancePerViewNV variables as compact 2022-01-11 22:45:23 +00:00
builtin_type_macros.h nir: Add an 'external' texture type for parity with samplers 2021-12-06 14:21:38 +00:00
glsl_types.cpp nir: Add an 'external' texture type for parity with samplers 2021-12-06 14:21:38 +00:00
glsl_types.h compiler/types: Add a texture type 2021-10-16 05:49:34 +00:00
meson.build spirv: Use a single binary for gtests 2021-10-20 17:55:36 +00:00
nir_types.cpp compiler/types: Add a wrap_in_arrays helper 2021-10-16 05:49:34 +00:00
nir_types.h compiler/types: Add a wrap_in_arrays helper 2021-10-16 05:49:34 +00:00
shader_enums.c compiler: add new MESH_VIEW_COUNT/MESH_VIEW_INDICES system values 2022-01-11 22:45:23 +00:00
shader_enums.h compiler: add new MESH_VIEW_COUNT/MESH_VIEW_INDICES system values 2022-01-11 22:45:23 +00:00
shader_info.h spirv: handle multiview bits of SPV_NV_mesh_shader 2022-01-11 22:45:23 +00:00