i965/fs: Helpers for un/shuffle 16-bit pairs in 32-bit components

This helpers are used to load/store 16-bit types from/to 32-bit
components.

The functions shuffle_32bit_load_result_to_16bit_data and
shuffle_16bit_data_for_32bit_write are implemented in a similar
way than the analogous functions for handling 64-bit types.

v1: Explain need of temporary in shuffle operations. (Jason Ekstrand)

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Jose Maria Casanova Crespo
2017-11-20 23:10:51 +01:00
parent fa4a9d63bb
commit 3db31c0b06
2 changed files with 71 additions and 0 deletions

View File

@@ -497,6 +497,17 @@ void shuffle_32bit_load_result_to_64bit_data(const brw::fs_builder &bld,
fs_reg shuffle_64bit_data_for_32bit_write(const brw::fs_builder &bld,
const fs_reg &src,
uint32_t components);
void shuffle_32bit_load_result_to_16bit_data(const brw::fs_builder &bld,
const fs_reg &dst,
const fs_reg &src,
uint32_t components);
void shuffle_16bit_data_for_32bit_write(const brw::fs_builder &bld,
const fs_reg &dst,
const fs_reg &src,
uint32_t components);
fs_reg setup_imm_df(const brw::fs_builder &bld,
double v);