mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
d3d9-Direct3DShaderValidatorCreate9: Add patch set.
This commit is contained in:
parent
ef0e88407e
commit
411f2a9702
@ -0,0 +1,95 @@
|
||||
From 9838666108baca0c57a9dc5538d0d9af98eae18e Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Tue, 12 Nov 2019 21:13:22 -0600
|
||||
Subject: [PATCH] d3d9: Return a stub interface from
|
||||
Direct3DShaderValidatorCreate9().
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46735
|
||||
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
|
||||
---
|
||||
dlls/d3d9/d3d9_main.c | 61 ++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 57 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
|
||||
index 21df2a34cd2..3bec0eaa169 100644
|
||||
--- a/dlls/d3d9/d3d9_main.c
|
||||
+++ b/dlls/d3d9/d3d9_main.c
|
||||
@@ -75,18 +75,71 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9E
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT WINAPI shader_validator_QueryInterface(void *iface, REFIID iid, void **out)
|
||||
+{
|
||||
+ TRACE("iface %p, iid %p, out %p.\n", iface, iid, out);
|
||||
+
|
||||
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
||||
+ *out = NULL;
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI shader_validator_AddRef(void *iface)
|
||||
+{
|
||||
+ TRACE("iface %p.\n", iface);
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI shader_validator_Release(void *iface)
|
||||
+{
|
||||
+ TRACE("iface %p.\n", iface);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI shader_validator_stub1(void *arg1, void *arg2, void *arg3, void *arg4)
|
||||
+{
|
||||
+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, stub!\n", arg1, arg2, arg3, arg4);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI shader_validator_stub2(void *arg1, void *arg2, void *arg3, DWORD *arg4, DWORD_PTR arg5)
|
||||
+{
|
||||
+ int i;
|
||||
+ FIXME("arg1 %p, arg2 %p, arg3 %p, arg4 %p, arg5 %#lx, stub!\n", arg1, arg2, arg3, arg4, arg5);
|
||||
+ for (i = 0; i < arg5; ++i)
|
||||
+ FIXME(" %#x\n", arg4[i]);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI shader_validator_stub3(void *arg1)
|
||||
+{
|
||||
+ FIXME("arg1 %p, stub!\n", arg1);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static const void *shader_validator_vtbl[] =
|
||||
+{
|
||||
+ shader_validator_QueryInterface,
|
||||
+ shader_validator_AddRef,
|
||||
+ shader_validator_Release,
|
||||
+ shader_validator_stub1,
|
||||
+ shader_validator_stub2,
|
||||
+ shader_validator_stub3,
|
||||
+};
|
||||
+
|
||||
+static void *shader_validator = &shader_validator_vtbl;
|
||||
+
|
||||
/*******************************************************************
|
||||
* Direct3DShaderValidatorCreate9 (D3D9.@)
|
||||
*
|
||||
* No documentation available for this function.
|
||||
* SDK only says it is internal and shouldn't be used.
|
||||
*/
|
||||
-void* WINAPI Direct3DShaderValidatorCreate9(void)
|
||||
+void * WINAPI Direct3DShaderValidatorCreate9(void)
|
||||
{
|
||||
- static int once;
|
||||
+ TRACE("Returning validator %p.\n", &shader_validator);
|
||||
|
||||
- if (!once++) FIXME("stub\n");
|
||||
- return NULL;
|
||||
+ return &shader_validator;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
2.23.0
|
||||
|
1
patches/d3d9-Direct3DShaderValidatorCreate9/definition
Normal file
1
patches/d3d9-Direct3DShaderValidatorCreate9/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [46735] The Sims 2 demo needs Direct3DShaderValidatorCreate9() implementation
|
@ -103,6 +103,7 @@ patch_enable_all ()
|
||||
enable_cryptext_CryptExtOpenCER="$1"
|
||||
enable_d2d1_ID2D1Factory1="$1"
|
||||
enable_d3d11_Deferred_Context="$1"
|
||||
enable_d3d9_Direct3DShaderValidatorCreate9="$1"
|
||||
enable_d3d9_Tests="$1"
|
||||
enable_d3dx9_32bpp_Alpha_Channel="$1"
|
||||
enable_d3dx9_36_BumpLuminance="$1"
|
||||
@ -429,6 +430,9 @@ patch_enable ()
|
||||
d3d11-Deferred_Context)
|
||||
enable_d3d11_Deferred_Context="$2"
|
||||
;;
|
||||
d3d9-Direct3DShaderValidatorCreate9)
|
||||
enable_d3d9_Direct3DShaderValidatorCreate9="$2"
|
||||
;;
|
||||
d3d9-Tests)
|
||||
enable_d3d9_Tests="$2"
|
||||
;;
|
||||
@ -2569,6 +2573,21 @@ if test "$enable_d3d11_Deferred_Context" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-Direct3DShaderValidatorCreate9
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#46735] The Sims 2 demo needs Direct3DShaderValidatorCreate9() implementation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3d9/d3d9_main.c
|
||||
# |
|
||||
if test "$enable_d3d9_Direct3DShaderValidatorCreate9" -eq 1; then
|
||||
patch_apply d3d9-Direct3DShaderValidatorCreate9/0001-d3d9-Return-a-stub-interface-from-Direct3DShaderVali.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Zebediah Figura", "d3d9: Return a stub interface from Direct3DShaderValidatorCreate9().", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset d3d9-Tests
|
||||
# |
|
||||
# | Modified files:
|
||||
|
Loading…
x
Reference in New Issue
Block a user