From a70ccecd38d52576818ce899d8c16e8d940de86a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 27 Jun 2017 00:28:59 +0200
Subject: nvapi: Add stub for NvAPI_GPU_GetGpuCoreCount.

---
 dlls/nvapi/nvapi.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/dlls/nvapi/nvapi.c b/dlls/nvapi/nvapi.c
index 372ae359ded..12ddb0d871f 100644
--- a/dlls/nvapi/nvapi.c
+++ b/dlls/nvapi/nvapi.c
@@ -661,6 +661,26 @@ static NvAPI_Status CDECL NvAPI_GPU_GetVirtualFrameBufferSize(NvPhysicalGpuHandl
     return NVAPI_OK;
 }
 
+static NvAPI_Status CDECL NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysicalGpu, NvU32 *pCount)
+{
+    TRACE("(%p, %p)\n", hPhysicalGpu, pCount);
+
+    if (!hPhysicalGpu)
+        return NVAPI_EXPECTED_PHYSICAL_GPU_HANDLE;
+
+    if (hPhysicalGpu != FAKE_PHYSICAL_GPU)
+    {
+        FIXME("invalid handle: %p\n", hPhysicalGpu);
+        return NVAPI_INVALID_HANDLE;
+    }
+
+    if (!pCount)
+        return NVAPI_INVALID_ARGUMENT;
+
+    *pCount = 1;
+    return NVAPI_OK;
+}
+
 void* CDECL nvapi_QueryInterface(unsigned int offset)
 {
     static const struct
@@ -705,6 +725,7 @@ void* CDECL nvapi_QueryInterface(unsigned int offset)
         {0xa064bdfc, NvAPI_D3D9_RegisterResource},
         {0x46fbeb03, NvAPI_GPU_GetPhysicalFrameBufferSize},
         {0x5a04b644, NvAPI_GPU_GetVirtualFrameBufferSize},
+        {0xc7026a87, NvAPI_GPU_GetGpuCoreCount},
     };
     unsigned int i;
     TRACE("(%x)\n", offset);
-- 
2.13.1

