mesa/src/compiler/spirv
Rhys Perry b425100781 spirv: run nir_copy_prop before nir_rematerialize_derefs_in_use_blocks_impl
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: 14a12b771d ("spirv: Rework our handling of images and samplers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13924>
2021-11-24 15:43:51 +00:00
..
tests spirv: Initialize spirv_test member shader. 2020-09-09 22:24:09 +00:00
gl_spirv.c spirv: workaround setjmp/longjmp crash on MinGW 2020-11-18 13:53:36 +00:00
GLSL.ext.AMD.h
GLSL.std.450.h
meson.build spirv: add and use a generator id enum 2020-10-12 11:07:38 +00:00
nir_load_libclc.c nir_load_libclc: Mark libclc shader as internal 2020-11-18 04:05:37 +00:00
nir_lower_libclc.c nir/libclc: handle null callee name when lowering 2021-08-06 00:09:17 +00:00
nir_spirv.h spirv: Always declare FragCoord as a sysval 2021-10-07 19:45:35 +00:00
OpenCL.std.h
spir-v.xml spirv: Update headers and metadata from latest Khronos commit 2021-06-25 22:41:32 +00:00
spirv.core.grammar.json spirv: Update headers and metadata from latest Khronos commit 2021-08-24 19:58:57 +00:00
spirv.h spirv: Update headers and metadata from latest Khronos commit 2021-08-24 19:58:57 +00:00
spirv2nir.c spirv: Implement non-Multiview parts of SPV_NV_mesh_shader 2021-08-28 03:56:43 +00:00
spirv_info.h spirv: vtn_fail with a nice message on unsupported rounding modes 2020-09-25 01:43:28 +00:00
spirv_info_c.py spirv: vtn_fail with a nice message on unsupported rounding modes 2020-09-25 01:43:28 +00:00
spirv_to_nir.c spirv: Don't add 0.5 to array indicies for OpImageSampleExplicitLod 2021-10-18 12:21:52 +10:00
vtn_alu.c spirv: Generate shorter code for SpvOpFUnord comparisons 2021-10-06 01:53:47 +00:00
vtn_amd.c nir,amd: Suffix nir_op_cube_face_coord/index with _amd 2021-06-21 09:03:34 -05:00
vtn_cfg.c spirv: run nir_copy_prop before nir_rematerialize_derefs_in_use_blocks_impl 2021-11-24 15:43:51 +00:00
vtn_gather_types_c.py
vtn_generator_ids_h.py android: fix SPIR-V -> NIR build 2020-10-12 22:26:05 +00:00
vtn_glsl450.c spirv: create ffma more often 2021-08-16 17:19:45 +00:00
vtn_opencl.c vtn: Use relaxed 24bit opcodes for CL 24bit math 2021-05-05 22:06:42 +00:00
vtn_private.h spirv: deal with null pointers 2021-10-08 09:30:02 +00:00
vtn_subgroup.c spirv: Implement SpvCapabilitySubgroupShuffleINTEL from SPV_INTEL_subgroups 2020-11-04 20:24:48 +00:00
vtn_variables.c nir, spirv: Don't mark NV_mesh_shader primitive indices as per-primitive. 2021-11-16 07:46:55 +00:00