From 8609e2d2722b2a9533df24080026206c75a6af79 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 24 Jun 2015 20:03:03 +1000 Subject: [PATCH] d3dcompiler: Share the source with d3dcompiler_46. --- dlls/d3dcompiler_46/Makefile.in | 20 ++++++++++++- dlls/d3dcompiler_46/d3dcompiler_46.spec | 50 +++++++++++++++---------------- dlls/d3dcompiler_46/d3dcompiler_46_main.c | 42 -------------------------- 3 files changed, 44 insertions(+), 68 deletions(-) rewrite dlls/d3dcompiler_46/d3dcompiler_46.spec (66%) delete mode 100644 dlls/d3dcompiler_46/d3dcompiler_46_main.c diff --git a/dlls/d3dcompiler_46/Makefile.in b/dlls/d3dcompiler_46/Makefile.in index 08c5145639a..9edd7b6f3fa 100644 --- a/dlls/d3dcompiler_46/Makefile.in +++ b/dlls/d3dcompiler_46/Makefile.in @@ -1,6 +1,24 @@ MODULE = d3dcompiler_46.dll +IMPORTS = dxguid uuid +EXTRALIBS = $(LIBWPP) +EXTRADEFS = -DD3D_COMPILER_VERSION=46 +PARENTSRC = ../d3dcompiler_43 C_SRCS = \ - d3dcompiler_46_main.c + asmparser.c \ + blob.c \ + bytecodewriter.c \ + compiler.c \ + d3dcompiler_43_main.c \ + reflection.c \ + utils.c + +LEX_SRCS = \ + asmshader.l \ + hlsl.l + +BISON_SRCS = \ + asmshader.y \ + hlsl.y RC_SRCS = version.rc diff --git a/dlls/d3dcompiler_46/d3dcompiler_46.spec b/dlls/d3dcompiler_46/d3dcompiler_46.spec dissimilarity index 66% index 526a9975fcf..5811b40b0fc 100644 --- a/dlls/d3dcompiler_46/d3dcompiler_46.spec +++ b/dlls/d3dcompiler_46/d3dcompiler_46.spec @@ -1,25 +1,25 @@ -@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) d3dcompiler_43.D3DAssemble -@ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) d3dcompiler_43.D3DCompile -@ stub D3DCompile2 -@ stub D3DCompileFromFile -@ stub D3DCompressShaders -@ stdcall D3DCreateBlob(long ptr) d3dcompiler_43.D3DCreateBlob -@ stub D3DDecompressShaders -@ stdcall D3DDisassemble(ptr long long ptr ptr) d3dcompiler_43.D3DDisassemble -@ stdcall D3DDisassemble10Effect(ptr long ptr) d3dcompiler_43.D3DDisassemble10Effect -@ stub D3DDisassemble11Trace -@ stub D3DDisassembleRegion -@ stdcall D3DGetBlobPart(ptr long long long ptr) d3dcompiler_43.D3DGetBlobPart -@ stdcall D3DGetDebugInfo(ptr long ptr) d3dcompiler_43.D3DGetDebugInfo -@ stdcall D3DGetInputAndOutputSignatureBlob(ptr long ptr) d3dcompiler_43.D3DGetInputAndOutputSignatureBlob -@ stdcall D3DGetInputSignatureBlob(ptr long ptr) d3dcompiler_43.D3DGetInputSignatureBlob -@ stdcall D3DGetOutputSignatureBlob(ptr long ptr) d3dcompiler_43.D3DGetOutputSignatureBlob -@ stub D3DGetTraceInstructionOffsets -@ stdcall D3DPreprocess(ptr long str ptr ptr ptr ptr) d3dcompiler_43.D3DPreprocess -@ stub D3DReadFileToBlob -@ stdcall D3DReflect(ptr long ptr ptr) d3dcompiler_43.D3DReflect -@ stub D3DReturnFailure1 -@ stub D3DSetBlobPart -@ stdcall D3DStripShader(ptr long long ptr) d3dcompiler_43.D3DStripShader -@ stub D3DWriteBlobToFile -@ stub DebugSetMute +@ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) +@ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) +@ stub D3DCompile2 +@ stub D3DCompileFromFile +@ stub D3DCompressShaders +@ stdcall D3DCreateBlob(long ptr) +@ stub D3DDecompressShaders +@ stdcall D3DDisassemble(ptr long long ptr ptr) +@ stdcall D3DDisassemble10Effect(ptr long ptr) d3dcompiler_43.D3DDisassemble10Effect +@ stub D3DDisassemble11Trace +@ stub D3DDisassembleRegion +@ stdcall D3DGetBlobPart(ptr long long long ptr) +@ stdcall D3DGetDebugInfo(ptr long ptr) +@ stdcall D3DGetInputAndOutputSignatureBlob(ptr long ptr) +@ stdcall D3DGetInputSignatureBlob(ptr long ptr) +@ stdcall D3DGetOutputSignatureBlob(ptr long ptr) +@ stub D3DGetTraceInstructionOffsets +@ stdcall D3DPreprocess(ptr long str ptr ptr ptr ptr) +@ stub D3DReadFileToBlob +@ stdcall D3DReflect(ptr long ptr ptr) +@ stub D3DReturnFailure1 +@ stub D3DSetBlobPart +@ stdcall D3DStripShader(ptr long long ptr) +@ stub D3DWriteBlobToFile +@ stub DebugSetMute diff --git a/dlls/d3dcompiler_46/d3dcompiler_46_main.c b/dlls/d3dcompiler_46/d3dcompiler_46_main.c deleted file mode 100644 index 80da1ff382e..00000000000 --- a/dlls/d3dcompiler_46/d3dcompiler_46_main.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Direct3D shader compiler main file - * - * Copyright 2015 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 "config.h" -#include "wine/port.h" - -#include - -#include "windef.h" -#include "winbase.h" - -BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved) -{ - switch (reason) - { - case DLL_WINE_PREATTACH: - return FALSE; /* prefer native version */ - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(instance); - break; - } - - return TRUE; -} -- 2.11.4.GIT