Skip to content

[NFC][HLSL][DirectX] Let HLSLRootSignature reuse the dxbc defined enums #145986

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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

inbelic
Copy link
Contributor

@inbelic inbelic commented Jun 26, 2025

This pr removes the redundancy of having the same enums defined in both the front-end and back-end of handling root signatures. Since there are many more uses of the enum in the front-end of the code, we will adhere to the naming conventions used in the front-end, to minimize the diff.

The macros in DXContainerConstants.def are also touched-up to be consistent and to have each macro name follow its respective definition in d3d12.h and searchable by name here.

Additionally, the many getEnumNames are moved to DXContainer from HLSLRootSignatureUtils as they we will want them to be exposed publicly anyways.

Changes for each enum follow the pattern of a commit that will make the enum definition in DXContainer adhere to above listed naming conventions, followed by a commit to actually use that enum in the front-end.

Resolves #145815

@inbelic inbelic changed the title [HLSL][DirectX] Let HLSLRootSignature reuse the dxbc defined enums [NFC][HLSL][DirectX] Let HLSLRootSignature reuse the dxbc defined enums Jun 27, 2025
ComparisonFunc CompFunc = ComparisonFunc::LessEqual;
StaticBorderColor BorderColor = StaticBorderColor::OpaqueWhite;
llvm::dxbc::ComparisonFunc CompFunc = llvm::dxbc::ComparisonFunc::LessEqual;
dxbc::StaticBorderColor BorderColor = dxbc::StaticBorderColor::OpaqueWhite;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a distinction between llvm::dxcbc and dxbc? I noticed a few other places where you used both right by eachother.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, they should be consistent across each file, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HLSL][RootSignature] Move D3D12 enums defined in HLSLRootSignature to BinaryFormat/DXContainer
2 participants