[3PP] Bump DirectXShaderCompiler

This commit is contained in:
Xphalnos 2024-11-01 14:58:41 +01:00
parent cf0ee05da6
commit 5addb1551e
7 changed files with 1444 additions and 6 deletions

3
.gitmodules vendored
View File

@ -49,9 +49,6 @@
[submodule "third_party/disruptorplus"] [submodule "third_party/disruptorplus"]
path = third_party/disruptorplus path = third_party/disruptorplus
url = https://github.com/xenia-canary/disruptorplus.git url = https://github.com/xenia-canary/disruptorplus.git
[submodule "third_party/DirectXShaderCompiler"]
path = third_party/DirectXShaderCompiler
url = https://github.com/microsoft/DirectXShaderCompiler.git
[submodule "third_party/premake-cmake"] [submodule "third_party/premake-cmake"]
path = third_party/premake-cmake path = third_party/premake-cmake
url = https://github.com/JoelLinn/premake-cmake.git url = https://github.com/JoelLinn/premake-cmake.git

View File

@ -22,8 +22,8 @@
// For Microsoft::WRL::ComPtr. // For Microsoft::WRL::ComPtr.
#include <wrl/client.h> #include <wrl/client.h>
#include "third_party/DirectXShaderCompiler/include/dxc/dxcapi.h" #include "third_party/DirectXCompiler/DxbcConverter.h"
#include "third_party/DirectXShaderCompiler/projects/dxilconv/include/DxbcConverter.h" #include "third_party/DirectXCompiler/dxcapi.h"
#define XELOGD3D XELOGI #define XELOGD3D XELOGI

View File

@ -0,0 +1,61 @@
///////////////////////////////////////////////////////////////////////////////
// //
// DxbcConverter.h //
// Copyright (C) Microsoft. All rights reserved. //
// This file is distributed under the University of Illinois Open Source //
// License. See LICENSE.TXT for details. //
// //
// Provides declarations for the DirectX DXBC to DXIL converter component. //
// //
///////////////////////////////////////////////////////////////////////////////
#ifndef __DXBC_CONVERTER__H__
#define __DXBC_CONVERTER__H__
#include "third_party/DirectXCompiler/dxcapi.h"
#ifndef _MSC_VER
extern "C"
#endif
DXC_API_IMPORT HRESULT __stdcall DxcCreateInstance(_In_ REFCLSID rclsid,
_In_ REFIID riid,
_Out_ LPVOID *ppv);
#ifndef _MSC_VER
extern "C"
#endif
DXC_API_IMPORT HRESULT __stdcall DxcCreateInstance2(_In_ IMalloc *pMalloc,
_In_ REFCLSID rclsid,
_In_ REFIID riid,
_Out_ LPVOID *ppv);
struct __declspec(uuid("5F956ED5-78D1-4B15-8247-F7187614A041")) IDxbcConverter
: public IUnknown {
/// Create DXIL container out of DXBC shader blob.
virtual HRESULT STDMETHODCALLTYPE Convert(
_In_reads_bytes_(DxbcSize) LPCVOID pDxbc, _In_ UINT32 DxbcSize,
_In_opt_z_ LPCWSTR pExtraOptions,
_Outptr_result_bytebuffer_maybenull_(*pDxilSize) LPVOID *ppDxil,
_Out_ UINT32 *pDxilSize, _Outptr_result_maybenull_z_ LPWSTR *ppDiag) = 0;
/// Create DXIL LLVM module out of DXBC bytecode and DDI I/O signatures.
/// This is for driver consumption only.
virtual HRESULT STDMETHODCALLTYPE ConvertInDriver(
_In_reads_bytes_(pBytecode[1]) const UINT32 *pBytecode,
_In_opt_z_ LPCVOID pInputSignature, _In_ UINT32 NumInputSignatureElements,
_In_opt_z_ LPCVOID pOutputSignature,
_In_ UINT32 NumOutputSignatureElements,
_In_opt_z_ LPCVOID pPatchConstantSignature,
_In_ UINT32 NumPatchConstantSignatureElements,
_In_opt_z_ LPCWSTR pExtraOptions, _Out_ IDxcBlob **ppDxilModule,
_Outptr_result_maybenull_z_ LPWSTR *ppDiag) = 0;
};
__declspec(selectany) extern const CLSID
CLSID_DxbcConverter = {/* 4900391E-B752-4EDD-A885-6FB76E25ADDB */
0x4900391e,
0xb752,
0x4edd,
{0xa8, 0x85, 0x6f, 0xb7, 0x6e, 0x25, 0xad, 0xdb}};
#endif

71
third_party/DirectXCompiler/LICENSE.TXT vendored Normal file
View File

@ -0,0 +1,71 @@
==============================================================================
LLVM Release License
==============================================================================
University of Illinois/NCSA
Open Source License
Copyright (c) 2003-2015 University of Illinois at Urbana-Champaign.
All rights reserved.
Developed by:
LLVM Team
University of Illinois at Urbana-Champaign
http://llvm.org
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.
==============================================================================
Copyrights and Licenses for Third Party Software Distributed with LLVM:
==============================================================================
The LLVM software contains code written by third parties. Such software will
have its own individual LICENSE.TXT file in the directory in which it appears.
This file will describe the copyrights, license, and restrictions which apply
to that code.
The disclaimer of warranty in the University of Illinois Open Source License
applies to all code in the LLVM Distribution, and nothing in any of the
other licenses gives permission to use the names of the LLVM Team or the
University of Illinois to endorse or promote products derived from this
Software.
The following pieces of software have additional or alternate copyrights,
licenses, and/or restrictions:
Program Directory
------- ---------
Autoconf llvm/autoconf
llvm/projects/ModuleMaker/autoconf
Google Test llvm/utils/unittest/googletest
OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex}
pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT}
ARM contributions llvm/lib/Target/ARM/LICENSE.TXT
md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h
miniz llvm/lib/Miniz/miniz.c llvm/include/miniz/miniz.h llvm/lib/Miniz/LICENSE.txt

1309
third_party/DirectXCompiler/dxcapi.h vendored Normal file

File diff suppressed because it is too large Load Diff

1
third_party/DirectXCompiler/readme.md vendored Normal file
View File

@ -0,0 +1 @@
This is a modified version of [**DirectXShaderCompiler**](https://github.com/microsoft/DirectXShaderCompiler) for use by Xenia.

@ -1 +0,0 @@
Subproject commit 69e54e29086b7035acffb304cec57a350225f8b0