summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-23 17:23:29 -0700
committerJason Ekstrand <[email protected]>2016-09-13 12:40:12 -0700
commit1fe8bf82b20086e7190c7fe135ac15eb516e2d89 (patch)
tree144f62defe9033ced7b22063929912f5fa763267 /src
parent4a6c9e20b88340b5eb91650835b6fa3f0ba3d0f6 (diff)
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 <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_private.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index eb91d4b3143..cb942979133 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -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