[Mesa-dev] [PATCH 20/33] intel/blorp: Use #defines for all __gen_ helpers

Jason Ekstrand jason at jlekstrand.net
Wed Aug 31 21:22:39 UTC 2016


This allows us to #undef them later if we don't want them to persist
---
 src/intel/blorp/blorp_genX_exec.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h
index ff89865..71beadc 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -75,12 +75,9 @@ blorp_emit_3dstate_multisample(struct blorp_batch *batch, unsigned samples);
 
 #include "genxml/gen_macros.h"
 
-#define __gen_address_type struct blorp_address
-#define __gen_user_data struct blorp_batch
-
 static uint64_t
-__gen_combine_address(struct blorp_batch *batch, void *location,
-                      struct blorp_address address, uint32_t delta)
+_blorp_combine_address(struct blorp_batch *batch, void *location,
+                       struct blorp_address address, uint32_t delta)
 {
    if (address.buffer == NULL) {
       return address.offset + delta;
@@ -89,6 +86,10 @@ __gen_combine_address(struct blorp_batch *batch, void *location,
    }
 }
 
+#define __gen_address_type struct blorp_address
+#define __gen_user_data struct blorp_batch
+#define __gen_combine_address _blorp_combine_address
+
 #include "genxml/genX_pack.h"
 
 #define _blorp_cmd_length(cmd) cmd ## _length
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list