64-bit types support required un/shuffle operations to deal with load/store operations that use 32-bit components. The introduction of VK_KHR_16bit_storage support also needed new dedicated shuffle/unshuffle functions.
This series generalizes the different shuffle/unshuffle operations in a new helper shuffle_src_to_dst for 64/32/16/8-bit cases an creates two specific functions shuffle_from_32bit_read and shuffle_for_32bit_write to be used after and before load/store operations. I revisited all shuffle/unshuffle uses and avoids the emission of unneeded instructions caused by previously allowing source/destination overlaps in shuffles. The series refactors that cases to avoid them. As most of the changes affects 64-bit uses, I used the piglit test shaders to check the impact of the series with shader-db that is mainly possitive. Skylake total instructions in shared programs: 1688394 -> 1661420 (-1.60%) instructions in affected programs: 370480 -> 343506 (-7.28%) helped: 1048 HURT: 0 total cycles in shared programs: 52697457 -> 52527275 (-0.32%) cycles in affected programs: 1783581 -> 1613399 (-9.54%) helped: 1004 HURT: 41 Cc: Jason Ekstrand <ja...@jlekstrand.net> Cc: Samuel Iglesias <sigles...@igalia.com> Cc: Iago Toral <ito...@igalia.com> Jose Maria Casanova Crespo (14): intel/compiler: general 8/16/32/64-bit shuffle_src_to_dst function intel/compiler: new shuffle_for_32bit_write and shuffle_from_32bit_read intel/compiler: use shuffle_from_32bit_read at VARYING_PULL_CONSTANT_LOAD intel/compiler: Use shuffle_from_32bit_read to read 16-bit SSBO intel/compiler: Use shuffle_from_32bit_write for 16-bits store_ssbo intel/compiler: remove old 16-bit shuffle/unshuffle functions intel/compiler: shuffle_from_32bit_read for 64-bit do_untyped_vector_read intel/compiler: enable shuffle_from_32bit_read at 64-bit gs_input_load intel/compiler: Use shuffle_from_32bit_read at VS load_input intel/compiler: shuffle_from_32bit_read at load_per_vertex_input at TCS/TES intel/compiler: use shuffle_from_32bit_read for 64-bit FS load_input intel/compiler: shuffle_32bit_load_result_to_64bit_data is not used anymore intel/compiler: use new shuffle_32bit_write for all 64-bit storage writes intel/compiler: shuffle_64bit_data_for_32bit_write is not used anymore src/intel/compiler/brw_fs.cpp | 17 +- src/intel/compiler/brw_fs.h | 29 +-- src/intel/compiler/brw_fs_nir.cpp | 315 +++++++++++++----------------- 3 files changed, 147 insertions(+), 214 deletions(-) -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev