Skip to content

Commit ef84239

Browse files
authored
Merge pull request #376 from Lastique/feature/fix-32bit-issues
Fix 32-bit issues
2 parents 5cca071 + af36009 commit ef84239

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/direct/nv-driver.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ static bool nv_alloc_object(const int fd, const uint32_t driverMajorVersion, con
3535
.hObjectParent = hObjectParent,
3636
.hObjectNew = *hObjectNew,
3737
.hClass = hClass,
38-
.pRightsRequested = (NvP64)NULL,
39-
.pAllocParms = (NvP64)params,
38+
.pRightsRequested = (NvP64)(uintptr_t)NULL,
39+
.pAllocParms = (NvP64)(uintptr_t)params,
4040
.paramsSize = paramSize
4141
};
4242

@@ -105,7 +105,7 @@ static bool nv_rm_control(const int fd, const NvHandle hClient, const NvHandle h
105105
.hObject = hObject,
106106
.cmd = cmd,
107107
.flags = flags,
108-
.params = (NvP64)params,
108+
.params = (NvP64)(uintptr_t)params,
109109
.paramsSize = paramSize
110110
};
111111

@@ -552,7 +552,7 @@ bool alloc_memory(const NVDriverContext *context, const uint32_t size, int *fd)
552552

553553
struct drm_nvidia_gem_import_nvkms_memory_params params = {
554554
.mem_size = imageSizeInBytes,
555-
.nvkms_params_ptr = (uint64_t) &nvkmsParams,
555+
.nvkms_params_ptr = (uint64_t)(uintptr_t)&nvkmsParams,
556556
.nvkms_params_size = context->driverMajorVersion == 470 ? 0x20 : sizeof(nvkmsParams) //needs to be 0x20 in the 470 series driver
557557
};
558558
int drmret = ioctl(context->drmFd, DRM_IOCTL_NVIDIA_GEM_IMPORT_NVKMS_MEMORY, &params);

src/vabackend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ static VAStatus nvCreateBuffer(
12041204
buf->offset = offset;
12051205

12061206
if (buf->ptr == NULL) {
1207-
LOG("Unable to allocate buffer of %lu bytes", buf->size);
1207+
LOG("Unable to allocate buffer of %zu bytes", buf->size);
12081208
return VA_STATUS_ERROR_ALLOCATION_FAILED;
12091209
}
12101210

0 commit comments

Comments
 (0)