intel/blorp: Use #defines for all __gen_ helpers
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 24 Aug 2016 00:20:34 +0000 (17:20 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 13 Sep 2016 19:40:12 +0000 (12:40 -0700)
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>
src/intel/blorp/blorp_genX_exec.h

index f41634703d1c56e45a04d76a80c84f460840de19..5972cc4afd8d412fe56a053d27bdd13e2506eb94 100644 (file)
@@ -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