intel/fs,vec4: Clean up a repeated pattern with SSBOs
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 20 Oct 2018 15:05:33 +0000 (10:05 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 8 Nov 2018 16:09:06 +0000 (10:09 -0600)
commit6b2918709ab785be53607ff65ae203b2e88594b4
treefb3369734746b7c2e2939997fa47f193f843df79
parentc472ad82e48e139e03ed28a7a98481814260d08e
intel/fs,vec4: Clean up a repeated pattern with SSBOs

Everywhere we handle SSBO intrinsics, we have exactly the same pattern
for computing the index so we may as well make a helper for it.  We also
add a get_nir_src_imm to vec4 and use it for SSBO offsets.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/intel/compiler/brw_fs.h
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_vec4.h
src/intel/compiler/brw_vec4_nir.cpp