iris: fix silly unused batch with addr macro
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 30 Jan 2018 09:09:53 +0000 (01:09 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_state.c

index d6a7a88a37aa53d6e845a802f9faa3dbb638057f..5193f14a9c2c684e2fc6901a37870ce69de11eb6 100644 (file)
@@ -114,9 +114,10 @@ get_command_space(struct iris_batch *batch, unsigned bytes)
          dw[i] = (dwords)[i];                                           \
       }                                                                 \
       uint64_t *qw = (uint64_t *) &dw[addr_idx];                        \
-      qw = iris_batch_reloc(batch, qw - batch->cmdbuf.map, addr.bo,     \
-                            addr.offset + (dwords)[addr_idx + 1],       \
-                            addr.reloc_flags);                          \
+      *qw = iris_batch_reloc(batch, (void *)qw - batch->cmdbuf.map,     \
+                             addr.bo,                                   \
+                             addr.offset + (dwords)[addr_idx + 1],      \
+                             addr.reloc_flags);                         \
       for (uint32_t i = addr_idx + 1; i < num_dw; i++) {                \
          dw[i] = (dwords)[i];                                           \
       }                                                                 \