diff options
author | Emmanuel <manu@FreeBSD.org> | 2020-01-24 23:48:06 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2020-07-08 19:31:18 +0200 |
commit | 6a9eaabeaa7d24d984021229c8b380b7132e302f (patch) | |
tree | cc09005a2e3e564c7e61bf9f02eb55a3e6540496 | |
parent | ab052fba1d8ab8f1e592ed0ec6bbe3914fffb534 (diff) |
i965: Explicitly cast value to uint64_t
In FreeBSD x86 and aarch64 __u64 is typedef to unsigned long and
is the same size as unsigned long long.
Since we are explicitly specifying the format, cast the value
to the proper type.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Emmanuel <manu@FreeBSD.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
(cherry picked from commit f678811b567aafba60842bf0b3cff124da4daa0e)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/.pick_status.json b/.pick_status.json index 11252a7b5c7..4ca0dcf88c0 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2479,7 +2479,7 @@ "description": "i965: Explicitly cast value to uint64_t", "nominated": false, "nomination_type": null, - "resolution": 4, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 38e3186bcbb..f3daf0e92fa 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -67,14 +67,14 @@ dump_validation_list(struct intel_batchbuffer *batch) uint64_t flags = batch->validation_list[i].flags; assert(batch->validation_list[i].handle == batch->exec_bos[i]->gem_handle); - fprintf(stderr, "[%2d]: %2d %-14s %p %s%-7s @ 0x%016llx%s (%"PRIu64"B)\n", + fprintf(stderr, "[%2d]: %2d %-14s %p %s%-7s @ 0x%"PRIx64"%s (%"PRIu64"B)\n", i, batch->validation_list[i].handle, batch->exec_bos[i]->name, batch->exec_bos[i], (flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) ? "(48b" : "(32b", (flags & EXEC_OBJECT_WRITE) ? " write)" : ")", - batch->validation_list[i].offset, + (uint64_t)batch->validation_list[i].offset, (flags & EXEC_OBJECT_PINNED) ? " (pinned)" : "", batch->exec_bos[i]->size); } @@ -729,9 +729,9 @@ execbuffer(int fd, /* Update brw_bo::gtt_offset */ if (batch->validation_list[i].offset != bo->gtt_offset) { - DBG("BO %d migrated: 0x%" PRIx64 " -> 0x%llx\n", + DBG("BO %d migrated: 0x%" PRIx64 " -> 0x%" PRIx64 "\n", bo->gem_handle, bo->gtt_offset, - batch->validation_list[i].offset); + (uint64_t)batch->validation_list[i].offset); assert(!(bo->kflags & EXEC_OBJECT_PINNED)); bo->gtt_offset = batch->validation_list[i].offset; } |