Updated nvcuda-CUDA_Support patchset

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53809
This commit is contained in:
Alistair Leslie-Hughes 2022-10-21 14:54:55 +11:00
parent 1deec9df95
commit 1f500db5b7
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,59 @@
From 15355b788c4f277db50948667703dbddfb2a6786 Mon Sep 17 00:00:00 2001
From: Alois SCHLOEGL <alois.schloegl@ist.ac.at>
Date: Fri, 21 Oct 2022 14:51:56 +1100
Subject: [PATCH] nvcuda: Add empty stub for function cuFuncSetAttr
---
dlls/nvcuda/nvcuda.c | 8 ++++++++
dlls/nvcuda/nvcuda.spec | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
index cf89fca1fab..17861083093 100644
--- a/dlls/nvcuda/nvcuda.c
+++ b/dlls/nvcuda/nvcuda.c
@@ -124,6 +124,7 @@ static CUresult (*pcuEventQuery)(CUevent hEvent);
static CUresult (*pcuEventRecord)(CUevent hEvent, CUstream hStream);
static CUresult (*pcuEventSynchronize)(CUevent hEvent);
static CUresult (*pcuFuncGetAttribute)(int *pi, CUfunction_attribute attrib, CUfunction hfunc);
+static CUresult (*pcuFuncSetAttribute)(CUfunction hfunc, CUfunction_attribute attrib, int value);
static CUresult (*pcuFuncSetBlockShape)(CUfunction hfunc, int x, int y, int z);
static CUresult (*pcuFuncSetCacheConfig)(CUfunction hfunc, CUfunc_cache config);
static CUresult (*pcuFuncSetSharedMemConfig)(CUfunction hfunc, CUsharedconfig config);
@@ -498,6 +499,7 @@ static BOOL load_functions(void)
LOAD_FUNCPTR(cuEventRecord);
LOAD_FUNCPTR(cuEventSynchronize);
LOAD_FUNCPTR(cuFuncGetAttribute);
+ LOAD_FUNCPTR(cuFuncSetAttribute);
LOAD_FUNCPTR(cuFuncSetBlockShape);
LOAD_FUNCPTR(cuFuncSetCacheConfig);
LOAD_FUNCPTR(cuFuncSetSharedMemConfig);
@@ -1090,6 +1092,12 @@ CUresult WINAPI wine_cuFuncGetAttribute(int *pi, CUfunction_attribute attrib, CU
return pcuFuncGetAttribute(pi, attrib, hfunc);
}
+CUresult WINAPI wine_cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value)
+{
+ TRACE("(%p, %d, %d)\n", hfunc, attrib, value);
+ return pcuFuncSetAttribute(hfunc, attrib, value);
+}
+
CUresult WINAPI wine_cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z)
{
TRACE("(%p, %d, %d, %d)\n", hfunc, x, y, z);
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
index 85abf5d2e63..86bd959eee3 100644
--- a/dlls/nvcuda/nvcuda.spec
+++ b/dlls/nvcuda/nvcuda.spec
@@ -118,7 +118,7 @@
@ stub cuExternalMemoryGetMappedBuffer
@ stub cuExternalMemoryGetMappedMipmappedArray
@ stdcall cuFuncGetAttribute(ptr long ptr) wine_cuFuncGetAttribute
-@ stub cuFuncSetAttribute
+@ stdcall cuFuncSetAttribute(ptr long long) wine_cuFuncSetAttribute
@ stdcall cuFuncSetBlockShape(ptr long long long) wine_cuFuncSetBlockShape
@ stdcall cuFuncSetCacheConfig(ptr long) wine_cuFuncSetCacheConfig
@ stdcall cuFuncSetSharedMemConfig(ptr long) wine_cuFuncSetSharedMemConfig
--
2.37.2

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "e72a16b57f66b63a16bb3d1619ac4d42632cb141"
echo "25b05840d4fad5d12f308077925e3cf92bcebfb7"
}
# Show version information
@ -2320,6 +2320,7 @@ if test "$enable_nvcuda_CUDA_Support" -eq 1; then
patch_apply nvcuda-CUDA_Support/0014-nvcuda-Implement-cuDeviceGetUuid-and-cuDeviceGetLuid.patch
patch_apply nvcuda-CUDA_Support/0015-nvcuda-Expand-the-Unknown1-table.patch
patch_apply nvcuda-CUDA_Support/0016-nvcuda-Make-nvcuda-attempt-to-load-libcuda.so.1.patch
patch_apply nvcuda-CUDA_Support/0017-nvcuda-Add-empty-stub-for-function-cuFuncSetAttr.patch
fi
# Patchset nvapi-Stub_DLL