i965/fs: add shuffle_32bit_load_result_to_64bit_data helper
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 22 Jan 2016 13:00:38 +0000 (14:00 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 16 May 2016 07:55:33 +0000 (09:55 +0200)
commit50b7676dc46bae39c5e9b779828ef4fb2e1fbefc
tree0f212d8224f5a0fa9cb27a652d6075550bf84d56
parent4d9c461e53440182de42d0a16ec66ad7f5c3b00a
i965/fs: add shuffle_32bit_load_result_to_64bit_data helper

There will be a few places where we need to shuffle the result of a 32-bit
load into valid 64-bit data, so extract this logic into a separate helper
that we can reuse.

v2 (Curro):
- Use subscript() instead of stride()
- Assert on the input types rather than retyping.
- Use offset() instead of horiz_offset(), drop the multiplier definition.
- Don't use  force_writemask_all.
- Mark component_i as const.
- Make the function name lower case.

v3 (Curro):
- Pass src and dst by reference.
- Move to brw_fs_nir.cpp

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp