Rebase against 10dcee21c4b28b7f1cedc9ade01c09616521b628

This commit is contained in:
Alistair Leslie-Hughes
2019-05-07 08:27:08 +10:00
parent 5f18c8565c
commit b105021410
10 changed files with 146 additions and 427 deletions

View File

@@ -1,41 +1,40 @@
From 60b8f3d44890b9d3a60c7893c6633e89e91064c8 Mon Sep 17 00:00:00 2001
From dab5f521ad21f95aeedde39f0625541fe39d8bdf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 7 Jul 2017 23:56:16 +0200
Subject: [PATCH] nvapi: Implement NvAPI_D3D11_SetDepthBoundsTest. (v2)
---
dlls/d3d11/device.c | 12 ++++++++++++
dlls/d3d11/device.c | 11 +++++++++++
dlls/nvapi/nvapi.c | 29 +++++++++++++++++++++++++++++
dlls/nvapi/tests/nvapi.c | 17 +++++++++++++++++
include/wine/wined3d.h | 2 ++
4 files changed, 60 insertions(+)
4 files changed, 59 insertions(+)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 18fa670..abe9e29 100644
index 751afc1..ad91cdb 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -48,6 +48,8 @@ static inline struct d3d_device *device_from_immediate_ID3D11DeviceContext1(ID3D
static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11DeviceContext1 *iface,
REFIID riid, void **out)
@@ -49,6 +49,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11De
REFIID iid, void **out)
{
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1( (ID3D11DeviceContext1*)iface);
+
TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
if (IsEqualGUID(riid, &IID_ID3D11DeviceContext1)
@@ -59,6 +61,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11De
*out = iface;
return S_OK;
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
@@ -63,6 +64,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_QueryInterface(ID3D11De
{
*out = &context->ID3D11Multithread_iface;
}
+ else if (IsEqualGUID(riid, &IID_IWineD3DDevice))
+ else if (IsEqualGUID(iid, &IID_IWineD3DDevice))
+ {
+ *out = device->wined3d_device;
+ return S_OK;
+ }
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
*out = NULL;
@@ -3864,6 +3871,11 @@ static HRESULT STDMETHODCALLTYPE d3d_device_inner_QueryInterface(IUnknown *iface
else
{
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
@@ -3942,6 +3948,11 @@ static HRESULT STDMETHODCALLTYPE d3d_device_inner_QueryInterface(IUnknown *iface
{
*out = &device->IWineDXGIDeviceParent_iface;
}
@@ -48,10 +47,10 @@ index 18fa670..abe9e29 100644
{
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
diff --git a/dlls/nvapi/nvapi.c b/dlls/nvapi/nvapi.c
index 12ddb0d..22894d6 100644
index b67b414..ad8266b 100644
--- a/dlls/nvapi/nvapi.c
+++ b/dlls/nvapi/nvapi.c
@@ -22,6 +22,7 @@
@@ -23,6 +23,7 @@
#include <stdarg.h>
#define COBJMACROS
@@ -59,7 +58,7 @@ index 12ddb0d..22894d6 100644
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
@@ -681,6 +682,33 @@ static NvAPI_Status CDECL NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysica
@@ -682,6 +683,33 @@ static NvAPI_Status CDECL NvAPI_GPU_GetGpuCoreCount(NvPhysicalGpuHandle hPhysica
return NVAPI_OK;
}
@@ -93,7 +92,7 @@ index 12ddb0d..22894d6 100644
void* CDECL nvapi_QueryInterface(unsigned int offset)
{
static const struct
@@ -726,6 +754,7 @@ void* CDECL nvapi_QueryInterface(unsigned int offset)
@@ -727,6 +755,7 @@ void* CDECL nvapi_QueryInterface(unsigned int offset)
{0x46fbeb03, NvAPI_GPU_GetPhysicalFrameBufferSize},
{0x5a04b644, NvAPI_GPU_GetVirtualFrameBufferSize},
{0xc7026a87, NvAPI_GPU_GetGpuCoreCount},
@@ -151,7 +150,7 @@ index c8b66ac..87327c0 100644
/* d3d9 tests */
wc.lpfnWndProc = DefWindowProcA;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 15e14e5..f9df2d2 100644
index 958ade1..4828f9c 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -32,6 +32,8 @@
@@ -164,5 +163,5 @@ index 15e14e5..f9df2d2 100644
#define _FACWINED3D 0x876
--
2.7.4
1.9.1