intel/mi_builder: fix resolve call

Giving NULL for anv_combine_address() triggers an assert in that
function.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8525ebe6e3 ("intel/mi_builder: Return an address from __gen_get_batch_address")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10301>
(cherry picked from commit 2c2de4d60e)
This commit is contained in:
Lionel Landwerlin 2021-04-17 18:21:26 +03:00 committed by Eric Engestrom
parent 21cea3e242
commit b7bf755c92
2 changed files with 3 additions and 2 deletions

View file

@ -355,7 +355,7 @@
"description": "intel/mi_builder: fix resolve call",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "8525ebe6e37584f2914cdbf67eb70253e606351f"
},

View file

@ -1184,7 +1184,8 @@ _mi_resolve_address_token(struct mi_builder *b,
{
__gen_address_type addr = __gen_get_batch_address(b->user_data,
batch_location);
uint64_t addr_addr_u64 = __gen_combine_address(b->user_data, NULL, addr, 0);
uint64_t addr_addr_u64 = __gen_combine_address(b->user_data, batch_location,
addr, 0);
*(token.ptrs[0]) = addr_addr_u64;
*(token.ptrs[1]) = addr_addr_u64 + 4;
}