Skip to content

Commit 0e7591a

Browse files
[NFC] Move DxilValidation to a dedicated folder. (#6849)
Move DxilValidation out of HLSL. Also move code to validate dxil container into DxilContainerValidation.cpp from DxilValidation.cpp. This is a preparatory step for #6817. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent f810e92 commit 0e7591a

File tree

17 files changed

+1408
-1266
lines changed

17 files changed

+1408
-1266
lines changed

include/dxc/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ configure_file(
1717

1818
add_subdirectory(DXIL)
1919
add_subdirectory(DxilContainer)
20-
add_subdirectory(HLSL)
2120
add_subdirectory(Support)
2221
add_subdirectory(Tracing)
2322

include/dxc/HLSL/DxilValidation.h renamed to include/dxc/DxilValidation/DxilValidation.h

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,7 @@ class DiagnosticInfo;
2626

2727
namespace hlsl {
2828

29-
#include "dxc/HLSL/DxilValidation.inc"
30-
31-
const char *GetValidationRuleText(ValidationRule value);
3229
void GetValidationVersion(unsigned *pMajor, unsigned *pMinor);
33-
HRESULT ValidateDxilModule(llvm::Module *pModule, llvm::Module *pDebugModule);
34-
35-
// DXIL Container Verification Functions (return false on failure)
36-
37-
bool VerifySignatureMatches(llvm::Module *pModule,
38-
hlsl::DXIL::SignatureKind SigKind,
39-
const void *pSigData, uint32_t SigSize);
40-
41-
// PSV = data for Pipeline State Validation
42-
bool VerifyPSVMatches(llvm::Module *pModule, const void *pPSVData,
43-
uint32_t PSVSize);
44-
45-
// PSV = data for Pipeline State Validation
46-
bool VerifyRDATMatches(llvm::Module *pModule, const void *pRDATData,
47-
uint32_t RDATSize);
48-
49-
bool VerifyFeatureInfoMatches(llvm::Module *pModule,
50-
const void *pFeatureInfoData,
51-
uint32_t FeatureInfoSize);
5230

5331
// Validate the container parts, assuming supplied module is valid, loaded from
5432
// the container provided
@@ -106,4 +84,5 @@ class PrintDiagnosticContext {
10684
static void PrintDiagnosticHandler(const llvm::DiagnosticInfo &DI,
10785
void *Context);
10886
};
87+
10988
} // namespace hlsl

include/dxc/HLSL/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ add_subdirectory(DxilPdbInfo) # HLSL Change
3030
add_subdirectory(DxilPIXPasses) # HLSL Change
3131
add_subdirectory(DxilDia) # HLSL Change
3232
add_subdirectory(DxilRootSignature) # HLSL Change
33+
add_subdirectory(DxilValidation) # HLSL Change
3334
add_subdirectory(DxcBindingTable) # HLSL Change
3435
add_subdirectory(DxrFallback) # HLSL Change
3536
add_subdirectory(DxilCompression) # HLSL Change

lib/DxilValidation/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (C) Microsoft Corporation. All rights reserved.
2+
# This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details.
3+
add_hlsl_hctgen(DxilValidationInc OUTPUT DxilValidation.inc BUILD_DIR)
4+
add_hlsl_hctgen(DxilValidation OUTPUT DxilValidationImpl.inc BUILD_DIR)
5+
6+
add_llvm_library(LLVMDxilValidation
7+
DxilContainerValidation.cpp
8+
DxilValidation.cpp
9+
DxilValidationUtils.cpp
10+
11+
ADDITIONAL_HEADER_DIRS
12+
${LLVM_MAIN_INCLUDE_DIR}/llvm/IR
13+
)
14+
15+
add_dependencies(LLVMDxilValidation intrinsics_gen)

0 commit comments

Comments
 (0)