intel/anv: Use #defines for all __gen_ helpers
This allows us to #undef them later if we don't want them to persist Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
@@ -807,12 +807,9 @@ struct anv_address {
|
||||
uint32_t offset;
|
||||
};
|
||||
|
||||
#define __gen_address_type struct anv_address
|
||||
#define __gen_user_data struct anv_batch
|
||||
|
||||
static inline uint64_t
|
||||
__gen_combine_address(struct anv_batch *batch, void *location,
|
||||
const struct anv_address address, uint32_t delta)
|
||||
_anv_combine_address(struct anv_batch *batch, void *location,
|
||||
const struct anv_address address, uint32_t delta)
|
||||
{
|
||||
if (address.bo == NULL) {
|
||||
return address.offset + delta;
|
||||
@@ -823,6 +820,10 @@ __gen_combine_address(struct anv_batch *batch, void *location,
|
||||
}
|
||||
}
|
||||
|
||||
#define __gen_address_type struct anv_address
|
||||
#define __gen_user_data struct anv_batch
|
||||
#define __gen_combine_address _anv_combine_address
|
||||
|
||||
/* Wrapper macros needed to work around preprocessor argument issues. In
|
||||
* particular, arguments don't get pre-evaluated if they are concatenated.
|
||||
* This means that, if you pass GENX(3DSTATE_PS) into the emit macro, the
|
||||
|
Reference in New Issue
Block a user