diff options
author | Kenneth Graunke <[email protected]> | 2018-01-21 12:20:30 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-02-21 10:26:05 -0800 |
commit | d900a235b1cfd3aab9615d40779be30f6519e9f6 (patch) | |
tree | 7ce07bfd055347e31c870544182f0403496a74ca /src | |
parent | f31ae762161af10bde1e896dbb37e9f48a0c7f01 (diff) |
iris: try and have an iris address
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 1dafc91ee7a..2b0be476991 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -45,14 +45,18 @@ #include "iris_pipe.h" #include "iris_resource.h" -#define __gen_address_type unsigned -#define __gen_user_data void +#define __gen_address_type struct iris_address +#define __gen_user_data struct iris_batch static uint64_t -__gen_combine_address(void *user_data, void *location, - unsigned address, uint32_t delta) +__gen_combine_address(struct iris_batch *batch, void *location, + struct iris_address addr, uint32_t delta) { - return delta; + if (addr.bo == NULL) + return addr.offset + delta; + + return iris_batch_reloc(batch, location - batch->cmdbuf.map, addr.bo, + addr.offset + delta, addr.reloc_flags); } #define __genxml_cmd_length(cmd) cmd ## _length @@ -249,7 +253,7 @@ translate_fill_mode(unsigned pipe_polymode) } static struct iris_address -ro_bo(struct brw_bo *bo, uint32_t offset) +ro_bo(struct iris_bo *bo, uint32_t offset) { return (struct iris_address) { .bo = bo, .offset = offset }; } |