From: Alistair Leslie-Hughes Subject: [v3 PATCH] d3dx10: Add D3DXCpuOptimizations stub Message-Id: Date: Wed, 20 Jul 2016 09:20:17 +0000 Signed-off-by: Alistair Leslie-Hughes --- dlls/d3dx10_43/d3dx10_43.spec | 2 +- dlls/d3dx10_43/d3dx10_43_main.c | 11 +++++++-- include/Makefile.in | 1 + include/d3dx10.h | 1 + include/d3dx10math.h | 49 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 include/d3dx10math.h diff --git a/dlls/d3dx10_43/d3dx10_43.spec b/dlls/d3dx10_43/d3dx10_43.spec index ab696e8..f410be8 100644 --- a/dlls/d3dx10_43/d3dx10_43.spec +++ b/dlls/d3dx10_43/d3dx10_43.spec @@ -70,7 +70,7 @@ @ stdcall D3DXColorAdjustSaturation(ptr ptr float) d3dx9_36.D3DXColorAdjustSaturation @ stdcall D3DXComputeBoundingBox(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingBox @ stdcall D3DXComputeBoundingSphere(ptr long long ptr ptr) d3dx9_36.D3DXComputeBoundingSphere -@ stub D3DXCpuOptimizations(long) +@ stdcall D3DXCpuOptimizations(long) @ stdcall D3DXCreateMatrixStack(long ptr) d3dx9_36.D3DXCreateMatrixStack @ stdcall D3DXFloat16To32Array(ptr ptr long) d3dx9_36.D3DXFloat16To32Array @ stdcall D3DXFloat32To16Array(ptr ptr long) d3dx9_36.D3DXFloat32To16Array diff --git a/dlls/d3dx10_43/d3dx10_43_main.c b/dlls/d3dx10_43/d3dx10_43_main.c index 0c1ff80..408cf22 100644 --- a/dlls/d3dx10_43/d3dx10_43_main.c +++ b/dlls/d3dx10_43/d3dx10_43_main.c @@ -34,8 +34,8 @@ #include "objbase.h" #include "d3d10_1.h" -#include "d3dx10core.h" -#include "d3dx10tex.h" +#include "d3dx10.h" + WINE_DEFAULT_DEBUG_CHANNEL(d3dx); @@ -210,3 +210,10 @@ HRESULT WINAPI D3DX10GetImageInfoFromMemory(const void *src_data, SIZE_T src_dat return E_NOTIMPL; } + +D3DX_CPU_OPTIMIZATION WINAPI D3DXCpuOptimizations(BOOL enable) +{ + FIXME("enable %d stub.\n", enable); + + return D3DX_NOT_OPTIMIZED; +} diff --git a/include/Makefile.in b/include/Makefile.in index 9c20f28a..4aaefaf 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -256,6 +256,7 @@ HEADER_SRCS = \ d3dvec.inl \ d3dx10.h \ d3dx10async.h \ + d3dx10math.h \ d3dx10tex.h \ d3dx11.h \ d3dx11async.h \ diff --git a/include/d3dx10.h b/include/d3dx10.h index dd423a5..fb48723 100644 --- a/include/d3dx10.h +++ b/include/d3dx10.h @@ -27,6 +27,7 @@ #define DXGI_FORMAT_FROM_FILE ((DXGI_FORMAT)0xfffffffdu) #include "d3d10.h" +#include "d3dx10math.h" #include "d3dx10core.h" #include "d3dx10async.h" #include "d3dx10tex.h" diff --git a/include/d3dx10math.h b/include/d3dx10math.h new file mode 100644 index 0000000..f01e4e3 --- /dev/null +++ b/include/d3dx10math.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2016 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "d3dx10.h" + +/* This guard is the same as D3DX9 to prevent double-inclusion */ +#ifndef __D3DX9MATH_H__ +#define __D3DX9MATH_H__ + +#include + + +typedef enum _D3DX_CPU_OPTIMIZATION +{ + D3DX_NOT_OPTIMIZED = 0, + D3DX_3DNOW_OPTIMIZED = 1, + D3DX_SSE2_OPTIMIZED = 2, + D3DX_SSE_OPTIMIZED = 3 +} D3DX_CPU_OPTIMIZATION; + +#ifdef __cplusplus +extern "C" { +#endif + +D3DX_CPU_OPTIMIZATION WINAPI D3DXCpuOptimizations(BOOL enable); + +#ifdef __cplusplus +} +#endif + + +/*#include */ + +#endif /* __D3DX9MATH_H__ */ -- 2.8.1