rocket: fix build on non LP64 architectures

Cc: mesa-stable
Signed-off-by: Linus Karl <linus@lotz.li>
(cherry picked from commit 01cb7d7fd1)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39117>
This commit is contained in:
Linus Karl 2025-11-18 10:17:20 +01:00 committed by Dylan Baker
parent bff3239a67
commit ee41f1ef9f
2 changed files with 4 additions and 3 deletions

View file

@ -344,7 +344,7 @@
"description": "rocket: fix build on non LP64 architectures",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -5,6 +5,7 @@
#include <dlfcn.h>
#include <fcntl.h>
#include <inttypes.h>
#include <linux/limits.h>
#include <stdarg.h>
#include <stdint.h>
@ -67,7 +68,7 @@ static struct bo *
find_bo(uint64_t dma_address, unsigned *offset)
{
for (int j = 0; j < context.next_handle_id; j++) {
fprintf(stderr, "needle %lx hay %lx i %d\n", dma_address,
fprintf(stderr, "needle %" PRIx64 " hay %" PRIx64 " i %d\n", dma_address,
context.bos[j].dma_addr, j);
if (dma_address >= context.bos[j].dma_addr &&
dma_address < context.bos[j].dma_addr + context.bos[j].size) {
@ -85,7 +86,7 @@ dump_buffer(const char *name, uint64_t dma_address, unsigned size)
unsigned offset = 0;
struct bo *bo = find_bo(dma_address, &offset);
fprintf(stderr, "dump_buffer name %s dma 0x%lx size %u bo %p\n", name,
fprintf(stderr, "dump_buffer name %s dma 0x%" PRIx64 " size %u bo %p\n", name,
dma_address, size, bo);
if (size == 0 || size + offset > bo->size)