i965: Inline emit_reloc in __genx_combine_address
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 31 Aug 2017 20:12:44 +0000 (13:12 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 2 Sep 2017 19:56:18 +0000 (12:56 -0700)
One less layer of baklava.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/genX_state_upload.c

index b15829fb57c89c9a889f3e1885ce354a6c908baa..4eb1a79bcd47c07eff3d2e4c3f15cbab2aefc6fd 100644 (file)
@@ -75,17 +75,6 @@ struct brw_address {
    uint32_t offset;
 };
 
-static uint64_t
-emit_reloc(struct brw_context *brw,
-           void *location, struct brw_address address, uint32_t delta)
-{
-   uint32_t offset = (char *) location - (char *) brw->batch.map;
-
-   return brw_emit_reloc(&brw->batch, offset, address.bo,
-                         address.offset + delta,
-                         address.reloc_flags);
-}
-
 #define __gen_address_type struct brw_address
 #define __gen_user_data struct brw_context
 
@@ -96,7 +85,11 @@ __gen_combine_address(struct brw_context *brw, void *location,
    if (address.bo == NULL) {
       return address.offset + delta;
    } else {
-      return emit_reloc(brw, location, address, delta);
+      uint32_t offset = (char *) location - (char *) brw->batch.map;
+
+      return brw_emit_reloc(&brw->batch, offset, address.bo,
+                            address.offset + delta,
+                            address.reloc_flags);
    }
 }