mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Add nvcuda patch for two d3d9 init functions.
This commit is contained in:
parent
63a6c00152
commit
d3262def33
@ -1402,9 +1402,11 @@ ntoskrnl-Write_CR4.ok:
|
||||
nvcuda-CUDA_Support.ok:
|
||||
$(call APPLY_FILE,nvcuda-CUDA_Support/0001-nvcuda-First-implementation.patch)
|
||||
$(call APPLY_FILE,nvcuda-CUDA_Support/0002-nvcuda-Add-Unknown5-internal-interface.patch)
|
||||
$(call APPLY_FILE,nvcuda-CUDA_Support/0003-nvcuda-Emulate-two-d3d9-initialization-functions.patch)
|
||||
@( \
|
||||
echo '+ { "Michael Müller", "nvcuda: First implementation.", 1 },'; \
|
||||
echo '+ { "Michael Müller", "nvcuda: Add Unknown5 internal interface.", 1 },'; \
|
||||
echo '+ { "Michael Müller", "nvcuda: Emulate two d3d9 initialization functions.", 1 },'; \
|
||||
) > nvcuda-CUDA_Support.ok
|
||||
|
||||
# Patchset ole32-CoWaitForMultipleHandles
|
||||
|
@ -0,0 +1,78 @@
|
||||
From 7288507b49c61d2314ad042cb4c467701aa85cd5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 3 Jan 2015 00:25:08 +0100
|
||||
Subject: nvcuda: Emulate two d3d9 initialization functions.
|
||||
|
||||
---
|
||||
dlls/nvcuda/nvcuda.c | 29 +++++++++++++++++++++++++++++
|
||||
dlls/nvcuda/nvcuda.spec | 4 ++--
|
||||
2 files changed, 31 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
|
||||
index e074f90..61fe0e3 100644
|
||||
--- a/dlls/nvcuda/nvcuda.c
|
||||
+++ b/dlls/nvcuda/nvcuda.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <cuda.h>
|
||||
#include <cudaGL.h>
|
||||
#include "nvcuda.h"
|
||||
+#include "d3d9.h"
|
||||
|
||||
#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
|
||||
#define DEV_PTR "%llu"
|
||||
@@ -2102,6 +2103,34 @@ CUresult WINAPI wine_cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArra
|
||||
return pcuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Direct3D emulated functions
|
||||
+ */
|
||||
+CUresult WINAPI wine_cuD3D9CtxCreate(CUcontext *pCtx, CUdevice *pCudaDevice, unsigned int Flags, IDirect3DDevice9 *pD3DDevice)
|
||||
+{
|
||||
+ CUresult ret;
|
||||
+ CUdevice dev;
|
||||
+
|
||||
+ FIXME("(%p, %p, %u, %p) - semi-stub\n", pCtx, pCudaDevice, Flags, pD3DDevice);
|
||||
+
|
||||
+ ret = pcuDeviceGet(&dev, 0);
|
||||
+ if (ret) return ret;
|
||||
+
|
||||
+ ret = pcuCtxCreate(pCtx, Flags, dev);
|
||||
+ if (ret) return ret;
|
||||
+
|
||||
+ if (pCudaDevice)
|
||||
+ *pCudaDevice = dev;
|
||||
+
|
||||
+ return CUDA_SUCCESS;
|
||||
+}
|
||||
+
|
||||
+CUresult WINAPI wine_cuD3D9GetDevice(CUdevice *pCudaDevice, const char *pszAdapterName)
|
||||
+{
|
||||
+ FIXME("(%p, %s) - semi-stub\n", pCudaDevice, pszAdapterName);
|
||||
+ return pcuDeviceGet(pCudaDevice, 0);
|
||||
+}
|
||||
+
|
||||
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
|
||||
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
|
||||
index 720cebf..bae5cd3 100644
|
||||
--- a/dlls/nvcuda/nvcuda.spec
|
||||
+++ b/dlls/nvcuda/nvcuda.spec
|
||||
@@ -58,11 +58,11 @@
|
||||
58 stub cuD3D11GetDevices
|
||||
59 stub cuD3D11GetDirect3DDevice
|
||||
60 stub cuD3D9Begin
|
||||
-61 stub cuD3D9CtxCreate
|
||||
+@ stdcall cuD3D9CtxCreate(ptr ptr long ptr) wine_cuD3D9CtxCreate
|
||||
62 stub cuD3D9CtxCreateOnDevice
|
||||
63 stub cuD3D9CtxCreate_v2
|
||||
64 stub cuD3D9End
|
||||
-65 stub cuD3D9GetDevice
|
||||
+@ stdcall cuD3D9GetDevice(ptr str) wine_cuD3D9GetDevice
|
||||
66 stub cuD3D9GetDevices
|
||||
67 stub cuD3D9GetDirect3DDevice
|
||||
68 stub cuD3D9MapResources
|
||||
--
|
||||
1.9.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user