-
Notifications
You must be signed in to change notification settings - Fork 714
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
[linux] Enable Reflection on *nix platforms #4810
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b0e8aea
Allow reflection code to compile with Clang
pow2clk d75202e
Remove circular dependency from RDAT Dumper
pow2clk aa21b32
Create DirectX-Headers submodule
pow2clk 0a31264
Improve src dir finding error
pow2clk 04a9d5f
Enable reflection functionality and testing
pow2clk c360ae6
Actually add the DirectX-Headers submodule
pow2clk 09deade
fix *nix build breaks caused while fixing win breaks :P
pow2clk 62b6620
Respond to feedback -- some of it anyway ;)
pow2clk 85f6d58
simplify cmake file to exclude unneeded src dir
pow2clk da6cc33
Merge branch 'main' of github.com:microsoft/DirectXShaderCompiler int…
pow2clk 7095703
fix cmake (again)
pow2clk d87e286
Fix GCC template specialization finickiness
pow2clk 83bd996
LPCBYTE isn't a thing
pow2clk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule DirectX-Headers
added at
980971
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// // | ||
// DxReflection.h // | ||
// Copyright (C) Microsoft Corporation. All rights reserved. // | ||
// This file is distributed under the University of Illinois Open Source // | ||
// License. See LICENSE.TXT for details. // | ||
// // | ||
// Provides the needed headers and defines for D3D reflection. // | ||
// // | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#pragma once | ||
|
||
#ifndef _WIN32 | ||
// need to disable this as it is voilated by this header | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor" | ||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pow2clk Didn't we disable this warning altogether as discussed in #3793 (review), or is it now enabled by default on newer compilers (since I only commented out, instead of leaving an unconditional |
||
// Need to instruct non-windows compilers on what an interface is | ||
#define interface struct | ||
#include "d3d12shader.h" | ||
#undef interface | ||
#pragma GCC diagnostic pop | ||
#else | ||
#include <d3d12shader.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// // | ||
// D3DReflectionStrings.h // | ||
// Copyright (C) Microsoft Corporation. All rights reserved. // | ||
// This file is distributed under the University of Illinois Open Source // | ||
// License. See LICENSE.TXT for details. // | ||
// // | ||
// Used to convert reflection data types into strings. // | ||
// // | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
#pragma once | ||
|
||
#include "dxc/Support/D3DReflection.h" | ||
#include "dxc/DxilContainer/DxilRuntimeReflection.h" | ||
|
||
namespace hlsl { | ||
using namespace RDAT; | ||
namespace dump { | ||
|
||
// ToString functions for D3D types | ||
LPCSTR ToString(D3D_CBUFFER_TYPE CBType); | ||
LPCSTR ToString(D3D_SHADER_INPUT_TYPE Type); | ||
LPCSTR ToString(D3D_RESOURCE_RETURN_TYPE ReturnType); | ||
LPCSTR ToString(D3D_SRV_DIMENSION Dimension); | ||
LPCSTR ToString(D3D_PRIMITIVE_TOPOLOGY GSOutputTopology); | ||
LPCSTR ToString(D3D_PRIMITIVE InputPrimitive); | ||
LPCSTR ToString(D3D_TESSELLATOR_OUTPUT_PRIMITIVE HSOutputPrimitive); | ||
LPCSTR ToString(D3D_TESSELLATOR_PARTITIONING HSPartitioning); | ||
LPCSTR ToString(D3D_TESSELLATOR_DOMAIN TessellatorDomain); | ||
LPCSTR ToString(D3D_SHADER_VARIABLE_CLASS Class); | ||
LPCSTR ToString(D3D_SHADER_VARIABLE_TYPE Type); | ||
LPCSTR ToString(D3D_SHADER_VARIABLE_FLAGS Flag); | ||
LPCSTR ToString(D3D_SHADER_INPUT_FLAGS Flag); | ||
LPCSTR ToString(D3D_SHADER_CBUFFER_FLAGS Flag); | ||
LPCSTR ToString(D3D_PARAMETER_FLAGS Flag); | ||
LPCSTR ToString(D3D_NAME Name); | ||
LPCSTR ToString(D3D_REGISTER_COMPONENT_TYPE CompTy); | ||
LPCSTR ToString(D3D_MIN_PRECISION MinPrec); | ||
LPCSTR CompMaskToString(unsigned CompMask); | ||
|
||
// These macros declare the ToString functions for DXC types | ||
#define DEF_RDAT_ENUMS DEF_RDAT_DUMP_DECL | ||
#define DEF_DXIL_ENUMS DEF_RDAT_DUMP_DECL | ||
#include "dxc/DxilContainer/RDAT_Macros.inl" | ||
|
||
} // namespace dump | ||
} // namespace hlsl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.