Adds definition for D3DX10_TEXTURE_LOAD_INFO structure, used by function D3DX10LoadTextureFromTexture.
Signed-off-by: Connor McAdams conmanx360@gmail.com --- include/d3dx10tex.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/include/d3dx10tex.h b/include/d3dx10tex.h index 25ad490949..0f67b6016f 100644 --- a/include/d3dx10tex.h +++ b/include/d3dx10tex.h @@ -103,6 +103,36 @@ typedef struct D3DX10_IMAGE_LOAD_INFO #endif } D3DX10_IMAGE_LOAD_INFO;
+typedef struct _D3DX10_TEXTURE_LOAD_INFO +{ + D3D10_BOX *pSrcBox; + D3D10_BOX *pDstBox; + UINT SrcFirstMip; + UINT DstFirstMip; + UINT NumMips; + UINT SrcFirstElement; + UINT DstFirstElement; + UINT NumElements; + UINT Filter; + UINT MipFilter; + +#ifdef __cplusplus + _D3DX10_TEXTURE_LOAD_INFO() + { + pSrcBox = NULL; + pDstBox = NULL; + SrcFirstMip = 0; + DstFirstMip = 0; + NumMips = D3DX10_DEFAULT; + SrcFirstElement = 0; + DstFirstElement = 0; + NumElements = D3DX10_DEFAULT; + Filter = D3DX10_DEFAULT; + MipFilter = D3DX10_DEFAULT; + } +#endif +} D3DX10_TEXTURE_LOAD_INFO; + #ifdef __cplusplus extern "C" { #endif
Adds declaration for D3DX10LoadTextureFromTexture function.
Signed-off-by: Connor McAdams conmanx360@gmail.com --- include/d3dx10tex.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/d3dx10tex.h b/include/d3dx10tex.h index 0f67b6016f..181e4f3fb7 100644 --- a/include/d3dx10tex.h +++ b/include/d3dx10tex.h @@ -145,6 +145,9 @@ HRESULT WINAPI D3DX10FilterTexture(ID3D10Resource *texture, UINT src_level, UINT HRESULT WINAPI D3DX10GetImageInfoFromMemory(const void *src_data, SIZE_T src_data_size, ID3DX10ThreadPump *pump, D3DX10_IMAGE_INFO *img_info, HRESULT *hresult);
+HRESULT WINAPI D3DX10LoadTextureFromTexture(ID3D10Resource *src_tex, D3DX10_TEXTURE_LOAD_INFO *tex_load_info, + ID3D10Resource *dst_tex); + #ifdef __cplusplus } #endif
Add D3DX10LoadTextureFromTexture function stub. This fixes a crash in Crysis when run in DX10 mode.
Signed-off-by: Connor McAdams conmanx360@gmail.com --- dlls/d3dx10_43/d3dx10_43.spec | 2 +- dlls/d3dx10_43/d3dx10_43_main.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/d3dx10_43/d3dx10_43.spec b/dlls/d3dx10_43/d3dx10_43.spec index cb491241d4..36c7633d8e 100644 --- a/dlls/d3dx10_43/d3dx10_43.spec +++ b/dlls/d3dx10_43/d3dx10_43.spec @@ -54,7 +54,7 @@ @ stdcall D3DX10GetImageInfoFromMemory(ptr long ptr ptr ptr) @ stub D3DX10GetImageInfoFromResourceA(long str ptr ptr ptr) @ stub D3DX10GetImageInfoFromResourceW(long wstr ptr ptr ptr) -@ stub D3DX10LoadTextureFromTexture(ptr ptr ptr) +@ stdcall D3DX10LoadTextureFromTexture(ptr ptr ptr) @ stub D3DX10PreprocessShaderFromFileA(str ptr ptr ptr ptr ptr) @ stub D3DX10PreprocessShaderFromFileW(wstr ptr ptr ptr ptr ptr) @ stdcall D3DX10PreprocessShaderFromMemory(ptr long str ptr ptr ptr ptr ptr ptr) diff --git a/dlls/d3dx10_43/d3dx10_43_main.c b/dlls/d3dx10_43/d3dx10_43_main.c index b0295cc093..3851989315 100644 --- a/dlls/d3dx10_43/d3dx10_43_main.c +++ b/dlls/d3dx10_43/d3dx10_43_main.c @@ -241,3 +241,11 @@ D3DX_CPU_OPTIMIZATION WINAPI D3DXCpuOptimizations(BOOL enable)
return D3DX_NOT_OPTIMIZED; } + +HRESULT WINAPI D3DX10LoadTextureFromTexture(ID3D10Resource *src_tex, D3DX10_TEXTURE_LOAD_INFO *tex_load_info, + ID3D10Resource *dst_tex) +{ + FIXME("src_tex %p, tex_load_info %p, dst_tex %p stub!\n", src_tex, tex_load_info, dst_tex); + + return E_NOTIMPL; +}