mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
spirv_to_nir sometimes wraps derefs in vec2 or mov instructions as part of
its texture handling. These get in the way of
nir_rematerialize_derefs_in_use_blocks_impl. Running copy propagation
should get rid of the extra move instructions and get us back to intact
deref chains for everything except variable pointer use-cases.
fossil-db (Sienna Cichlid):
Totals from 6 (0.00% of 134572) affected shaders:
CodeSize: 92656 -> 93088 (+0.47%)
Instrs: 17060 -> 17138 (+0.46%)
Latency: 224408 -> 227539 (+1.40%)
InvThroughput: 37402 -> 37924 (+1.40%)
VClause: 408 -> 402 (-1.47%)
Copies: 1065 -> 1107 (+3.94%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5668
Fixes:
|
||
|---|---|---|
| .. | ||
| tests | ||
| gl_spirv.c | ||
| GLSL.ext.AMD.h | ||
| GLSL.std.450.h | ||
| meson.build | ||
| nir_load_libclc.c | ||
| nir_lower_libclc.c | ||
| nir_spirv.h | ||
| OpenCL.std.h | ||
| spir-v.xml | ||
| spirv.core.grammar.json | ||
| spirv.h | ||
| spirv2nir.c | ||
| spirv_info.h | ||
| spirv_info_c.py | ||
| spirv_to_nir.c | ||
| vtn_alu.c | ||
| vtn_amd.c | ||
| vtn_cfg.c | ||
| vtn_gather_types_c.py | ||
| vtn_generator_ids_h.py | ||
| vtn_glsl450.c | ||
| vtn_opencl.c | ||
| vtn_private.h | ||
| vtn_subgroup.c | ||
| vtn_variables.c | ||