Mesa (main): intel/mi_builder: fix resolve call

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 13 17:17:57 UTC 2021


Module: Mesa
Branch: main
Commit: 2c2de4d60efc8bd315374b003d2b7e2c63737002
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2c2de4d60efc8bd315374b003d2b7e2c63737002

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Sat Apr 17 18:21:26 2021 +0300

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 at intel.com>
Fixes: 8525ebe6e375 ("intel/mi_builder: Return an address from __gen_get_batch_address")
Reviewed-by: Felix DeGrood <felix.j.degrood at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10301>

---

 src/intel/common/mi_builder.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/intel/common/mi_builder.h b/src/intel/common/mi_builder.h
index a73f4996557..e95ef54f23d 100644
--- a/src/intel/common/mi_builder.h
+++ b/src/intel/common/mi_builder.h
@@ -1188,7 +1188,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;
 }



More information about the mesa-commit mailing list