Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For future reference: static linking across different platforms #6741

Closed
wants to merge 105 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
ff9463b
Merge pull request #1 from microsoft/main
Nielsbishere Jun 1, 2024
b63008d
Added debug symbols for DXC
Nielsbishere Jun 30, 2024
b2b408f
Now adding -fpic for non windows systems. Maybe that will solve it
Nielsbishere Jun 30, 2024
d77ae63
Added CMake flag ENABLE_DXC_STATIC_LINKING to allow dxcompiler to be …
Nielsbishere May 26, 2024
b066118
Merged LLVMHLSL into LLVMScalarOpts since they reference eachother. L…
Nielsbishere May 27, 2024
2372117
Combined LLVMipo into ScalarOpt (which already contains LLVMHLSL). Th…
Nielsbishere May 27, 2024
f3c5da9
Removed clangAnalysis and combined it into clangAST. This should help…
Nielsbishere Jun 29, 2024
53660f3
Removed clang analysis from the repo, to force get updates on merge c…
Nielsbishere Jul 1, 2024
24bbe07
Merge branch 'main' of https://github.com/Oxsomi/DirectXShaderCompiler
Nielsbishere Jul 1, 2024
6b26c03
Merge branch 'main' of https://github.com/Microsoft/DirectXShaderComp…
Nielsbishere Jul 1, 2024
3ff5117
SPIRV-Tools had an include that wasn't relative, this made it impossi…
Nielsbishere Jul 17, 2024
978ce1f
Merge branch 'main' of https://github.com/Microsoft/DirectXShaderComp…
Nielsbishere Jul 25, 2024
29cf2d8
Now exposing all function reflection to ID3D12LibraryReflection
Nielsbishere Jul 25, 2024
d894f54
Update DirectX-Headers dependency
Nielsbishere Jul 25, 2024
09ce7ac
Added CFunctionReflection::GetDesc1
Nielsbishere Jul 25, 2024
b9608d6
Added implementation for ID3D12FunctionReflection::GetDesc1
Nielsbishere Jul 25, 2024
c8a930c
Missing function in invalid function
Nielsbishere Jul 25, 2024
bf4a911
Removed unused variable
Nielsbishere Jul 25, 2024
41ba55c
Removed unused variable
Nielsbishere Jul 25, 2024
47ec4d0
Added ID3D12LibraryReflection to be able to get ID3D12FunctionReflect…
Nielsbishere Jul 26, 2024
dab68f9
Removed config file that was left over somehow
Nielsbishere Jul 26, 2024
bc28395
Update missing check
Nielsbishere Jul 26, 2024
bbf0aa8
Fixed QueryInterface in DxilLibraryReflection
Nielsbishere Jul 26, 2024
365edc2
Added versioning to function reflection and library reflection
Nielsbishere Jul 26, 2024
32db08b
Fixed missing ID3D12LibraryReflection check
Nielsbishere Jul 26, 2024
5d26589
Fixed QueryInterface in DxilLibraryReflection
Nielsbishere Jul 26, 2024
6cbfbde
Implemented GetInputNode/GetOutputNode, changed formatting a bit, add…
Nielsbishere Jul 26, 2024
a42939f
Implemented GetInputNode/GetOutputNode, changed formatting a bit, add…
Nielsbishere Jul 26, 2024
916edde
Added safety check to CFunctionReflection::GetDesc1 and renamed D3D12…
Nielsbishere Jul 26, 2024
52aa9d9
Added safety check to CFunctionReflection::GetDesc1 and renamed D3D12…
Nielsbishere Jul 26, 2024
7e39b81
Formatted with clang-format
Nielsbishere Jul 26, 2024
0a78e0f
Update to latest DirectX-Headers
Nielsbishere Jul 31, 2024
9814065
DirectX-Headers is now required on Windows too, since otherwise it's …
Nielsbishere Jul 31, 2024
7f85233
Implemented GetWaveSize for DxilContainerReflection.cpp
Nielsbishere Aug 5, 2024
a0bb8b9
Implemented GetWaveSize for DxilContainerReflection.cpp
Nielsbishere Aug 5, 2024
d23fcd2
Merge branch 'feat_query_all_function_properties3' of https://github.…
Nielsbishere Aug 5, 2024
2b92066
WSL Stubs shouldn't be included by default anymore for linux, since d…
Nielsbishere Aug 5, 2024
666dfae
Fixed formatting issue
Nielsbishere Aug 5, 2024
8be0aae
Apparently WSL stubs were not the issue on the remote
Nielsbishere Aug 5, 2024
895f80a
Changed ID3D12ShaderReflection to ID3D12ShaderReflection1 and impleme…
Nielsbishere Aug 5, 2024
7feb4cf
Changed ID3D12ShaderReflection to ID3D12ShaderReflection1 and impleme…
Nielsbishere Aug 5, 2024
54daf70
Format to be in-line with DXC styleguide
Nielsbishere Aug 5, 2024
5676799
Reformat to align to styleguide
Nielsbishere Aug 5, 2024
6bc299e
Amplification and mesh shaders have thread count too
Nielsbishere Aug 5, 2024
9aa8291
Amplification and mesh shaders have thread count too
Nielsbishere Aug 5, 2024
8b97460
Fixed formatting
Nielsbishere Aug 7, 2024
2109491
Added support for viewing descs in dxa.
Nielsbishere Aug 7, 2024
6fbe8a9
Merge branch 'feat_query_all_function_properties3' of https://github.…
Nielsbishere Aug 7, 2024
ea62c4b
Exposed compute shader WaveSizeMin/Max/Preferred and mesh/amplificati…
Nielsbishere Aug 7, 2024
530970c
Formatting
Nielsbishere Aug 7, 2024
3d777a0
Made sure guids are taken from DirectX-Headers d3d12.h rather than el…
Nielsbishere Aug 7, 2024
4a4ce62
Merge trunk into branch
Nielsbishere Aug 7, 2024
2457465
Undid breaking changes. WIP
Nielsbishere Aug 7, 2024
5a60043
Added predeclarations for LibraryReflection1 and ShaderReflection1. U…
Nielsbishere Aug 7, 2024
9eca17a
Windows: wsl stubs aren't needed. Now requiring DirectX-Headers to en…
Nielsbishere Aug 7, 2024
c88a1a6
DirectX-Headers is now always required and removed config file
Nielsbishere Aug 7, 2024
a702d2c
Fixed compile issue due to missing [[fallthrough]]; Fixed duplicate d…
Nielsbishere Aug 7, 2024
0a87922
Update dependency, should resolve build issue on unix
Nielsbishere Aug 7, 2024
506a167
Update dependency, should hopefully fix build errors
Nielsbishere Aug 8, 2024
988ada1
Formatting. Also fixed unit test that relied on the ShaderKind of 'No…
Nielsbishere Aug 8, 2024
7c45598
Hopefully fixed windows build
Nielsbishere Aug 8, 2024
32ac5ec
Seems like ExecutionTest.cpp still has an issue with finding GUIDs th…
Nielsbishere Aug 8, 2024
6defb75
Maybe d3d12.h is the only one that can be used with INITGUID
Nielsbishere Aug 8, 2024
fe507da
Undid removal of definition of ID3D12SDKConfiguration UUIDs, which ar…
Nielsbishere Aug 8, 2024
248ce58
Fix memory leak that somehow was only detected on linux but only on r…
Nielsbishere Aug 8, 2024
ac6c505
dxc/WinAdapter.h now extends DirectX-Headers/WSL's winAdapter.h, to a…
Nielsbishere Aug 9, 2024
903325e
Restored most headers to what they used to be by adding the same defi…
Nielsbishere Aug 9, 2024
ae5c687
Fixed BOOL issues and compile issues on linux
Nielsbishere Aug 9, 2024
dc19327
Fixed windows build
Nielsbishere Aug 9, 2024
631d446
Clean up for PR
Nielsbishere Aug 9, 2024
6e41faf
Undid some changes for PR
Nielsbishere Aug 9, 2024
18a4894
DirectX-Headers is now required for windows
Nielsbishere Aug 9, 2024
d1d195a
Formatting
Nielsbishere Aug 9, 2024
d82e56d
Some compilers don't seem to like missing endline at the end of a fil…
Nielsbishere Aug 9, 2024
9d72073
Merge and fix some linux/mac issues
Nielsbishere Aug 9, 2024
7883cda
Clang still needs __wsl_stub_uuidof, even though it has builtin suppo…
Nielsbishere Aug 9, 2024
15d406c
Formatting
Nielsbishere Aug 9, 2024
21a5225
Clang didn't have guid_from_string yet
Nielsbishere Aug 9, 2024
e0272d7
Removed duplicate defintions, since now d3d12.h from DirectX-Headers …
Nielsbishere Aug 9, 2024
06a33f8
Merge branch update_directx_headers into feat_query_all_function_prop…
Nielsbishere Aug 21, 2024
0d91e56
DirectX-Headers wasn't properly up to date
Nielsbishere Aug 21, 2024
e000305
Fixed issue with failed merge in DirectX-Headers
Nielsbishere Aug 21, 2024
bd87795
Merge feat_query_all_function_properties3 into feat_query_all_functio…
Nielsbishere Aug 21, 2024
f69b57a
Fixed build if interface is defined by winadapter
Nielsbishere Aug 21, 2024
0432255
Fixed build if interface is defined by winadapter
Nielsbishere Aug 21, 2024
10238b2
Made dxcvalidator link static
Nielsbishere Aug 21, 2024
12a7ecb
dxcvalidator was being excluded by static linking check due to invali…
Nielsbishere Aug 21, 2024
080c088
Renamed LLVMHLSL to LLVMScalarOpts in dxcvalidator
Nielsbishere Aug 21, 2024
cca5f93
Merge branch 'main' of https://github.com/Microsoft/DirectXShaderComp…
Nielsbishere Aug 21, 2024
042ed57
Merge upstream back into branch
Nielsbishere Aug 21, 2024
4faa40c
Added unit tests by modifying existing unit tests to include reflecti…
Nielsbishere Aug 21, 2024
74e793d
Apparently even though DXA runs fine, the file checker uses something…
Nielsbishere Aug 21, 2024
98774b8
Fixed a few tests; replaced LibraryReflection with LibraryReflection1…
Nielsbishere Aug 21, 2024
4d33ef8
Fixed unit tests hopefully
Nielsbishere Aug 22, 2024
828e48e
Redid formatting and fixed a mistake
Nielsbishere Aug 22, 2024
4c81c8c
Fixed the last remaining unit tests
Nielsbishere Aug 22, 2024
7ed6944
Apparently the featureflag with SM6.8 isn't set for SM6.7 when sm65_m…
Nielsbishere Aug 22, 2024
d01064f
Update to latest
Nielsbishere Aug 24, 2024
5a1fffe
Merge branch 'main' of https://github.com/Microsoft/DirectXShaderComp…
Nielsbishere Sep 1, 2024
f663e08
Merge with upstream
Nielsbishere Sep 12, 2024
3618faf
Fix build|
Nielsbishere Sep 12, 2024
d5ee244
Update SPIRV-Tools to latest and fixed the spirv-tools/libspirv.hpp i…
Nielsbishere Sep 14, 2024
7a75c7f
Implemented GetRequiresFlags
Nielsbishere Dec 15, 2024
2cc8331
Merge branch 'feat_query_all_function_properties' of https://github.c…
Nielsbishere Dec 15, 2024
b37088d
Update to latest
Nielsbishere Dec 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added predeclarations for LibraryReflection1 and ShaderReflection1. U…
…nified typedefs between DXC and DirectX-Headers. Warning: This might need extra caution, as these sizes were mismatching before! unsigned long aka ULONG is 64-bit on linux but was treated as the same as on windows?
Nielsbishere committed Aug 7, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 5a60043bdda29e08f8359b7a246ea458a70f5ac3
2 changes: 1 addition & 1 deletion external/DirectX-Headers
90 changes: 52 additions & 38 deletions include/dxc/WinAdapter.h
Original file line number Diff line number Diff line change
@@ -234,12 +234,13 @@

#define SUCCEEDED(hr) (((HRESULT)(hr)) >= 0)
#define FAILED(hr) (((HRESULT)(hr)) < 0)
#define DXC_FAILED(hr) (((HRESULT)(hr)) < 0)

#define HRESULT_FROM_WIN32(x) \
(HRESULT)(x) <= 0 ? (HRESULT)(x) \
: (HRESULT)(((x) & 0x0000FFFF) | (7 << 16) | 0x80000000)

#define DXC_FAILED(hr) (((HRESULT)(hr)) < 0)

//===----------------------------------------------------------------------===//
//
// Begin: Disable SAL Annotations
@@ -296,63 +297,72 @@

#ifdef __cplusplus

typedef unsigned char BYTE, UINT8;
typedef unsigned char *LPBYTE;

typedef BYTE BOOLEAN;
// Note: using fixed-width here to match Windows widths
// Specifically this is different for 'long' vs 'LONG'
typedef uint8_t UINT8;
typedef int8_t INT8;
typedef uint16_t UINT16;
typedef int16_t INT16;
typedef uint32_t UINT32, UINT, ULONG, DWORD, WINBOOL;
typedef int32_t INT32, INT, LONG;
typedef uint64_t UINT64, ULONG_PTR;
typedef int64_t INT64, LONG_PTR;
typedef void VOID, *HANDLE, *RPC_IF_HANDLE, *LPVOID;
typedef const void *LPCVOID;
typedef size_t SIZE_T;
typedef float FLOAT;
typedef double DOUBLE;
typedef unsigned char BYTE;
typedef int HWND;
typedef int PALETTEENTRY;
typedef int HDC;
typedef uint16_t WORD;
typedef void* PVOID;
typedef char BOOLEAN;
typedef uint64_t ULONGLONG;
typedef uint16_t USHORT, *PUSHORT;
typedef int64_t LONGLONG, *PLONGLONG;
typedef int64_t LONG_PTR, *PLONG_PTR;
typedef int64_t LONG64, *PLONG64;
typedef uint64_t ULONG64, *PULONG64;
typedef wchar_t WCHAR, *PWSTR;
typedef uint8_t UCHAR, *PUCHAR;
typedef uint64_t ULONG_PTR, *PULONG_PTR;
typedef uint64_t UINT_PTR, *PUINT_PTR;
typedef int64_t INT_PTR, *PINT_PTR;

// Note: WCHAR is not the same between Windows and Linux, to enable
// string manipulation APIs to work with resulting strings.
// APIs to D3D/DXCore will work on Linux wchars, but beware with
// interactions directly with the Windows kernel.
typedef char CHAR, *PSTR, *LPSTR, TCHAR, *PTSTR;
typedef const char *LPCSTR, *PCSTR, *LPCTSTR, *PCTSTR;
typedef wchar_t WCHAR, *PWSTR, *LPWSTR, *PWCHAR;
typedef const wchar_t *LPCWSTR, *PCWSTR;

typedef BYTE *LPBYTE;
typedef BOOLEAN *PBOOLEAN;

typedef bool BOOL;
typedef BOOL *LPBOOL;

typedef int INT;
typedef long LONG;
typedef unsigned int UINT;
typedef unsigned long ULONG;
typedef long long LONGLONG;
typedef long long LONG_PTR;
typedef unsigned long long ULONG_PTR;
typedef unsigned long long ULONGLONG;

typedef uint16_t WORD;
typedef uint32_t DWORD;
typedef DWORD *LPDWORD;

typedef uint32_t UINT32;
typedef uint64_t UINT64;

typedef signed char INT8, *PINT8;
typedef signed int INT32, *PINT32;

typedef size_t SIZE_T;
typedef const char *LPCSTR;
typedef const char *PCSTR;
typedef INT8 *PINT8;
typedef INT32 *PINT32;

typedef int errno_t;

typedef wchar_t WCHAR;
typedef wchar_t *LPWSTR;
typedef wchar_t *PWCHAR;
typedef const wchar_t *LPCWSTR;
typedef const wchar_t *PCWSTR;

typedef WCHAR OLECHAR;
typedef OLECHAR *BSTR;
typedef OLECHAR *LPOLESTR;
typedef char *LPSTR;

typedef void *LPVOID;
typedef const void *LPCVOID;

typedef std::nullptr_t nullptr_t;

typedef signed int HRESULT;

//===--------------------- Handle Types -----------------------------------===//

typedef void *HANDLE;
typedef void *RPC_IF_HANDLE;

#define DECLARE_HANDLE(name) \
struct name##__ { \
int unused; \
@@ -627,8 +637,12 @@ struct IStream : public ISequentialStream {
// They still need the __uuidof() though
CROSS_PLATFORM_UUIDOF(ID3D12LibraryReflection,
"8E349D19-54DB-4A56-9DC9-119D87BDB804")
CROSS_PLATFORM_UUIDOF(ID3D12LibraryReflection1,
"07692220-8721-4514-BFFE-969BB33196B6")
CROSS_PLATFORM_UUIDOF(ID3D12ShaderReflection,
"5A58797D-A72C-478D-8BA2-EFC6B0EFE88E")
CROSS_PLATFORM_UUIDOF(ID3D12ShaderReflection1,
"9C886958-23F1-4126-B294-FCF3DA13E7C6")

//===--------------------- COM Pointer Types ------------------------------===//