intel/compiler: Add an lsc_op_num_data_values() helper
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Jan 2023 23:37:30 +0000 (15:37 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 19 Jan 2023 08:42:22 +0000 (08:42 +0000)
commit284f0c9a57e17b14c044c04c7cf9ae77d6694492
tree3221cde67500c3c07ea798d947da5b583954266a
parent90a2137cd56179a2c65339b2b60991e0281c8995
intel/compiler: Add an lsc_op_num_data_values() helper

There are a number of places that need to know how many operands an LSC
atomic takes (0 for inc/dec, 1 for most things, 2 for cmpxchg).  We can
add a helper for that and eliminate some code (with more to come).

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20604>
src/intel/compiler/brw_eu.h
src/intel/compiler/brw_fs.cpp