aboutsummaryrefslogtreecommitdiff
path: root/contrib/dxc_2025_07_14/inc/Support
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/dxc_2025_07_14/inc/Support')
-rw-r--r--contrib/dxc_2025_07_14/inc/Support/ErrorCodes.h160
1 files changed, 160 insertions, 0 deletions
diff --git a/contrib/dxc_2025_07_14/inc/Support/ErrorCodes.h b/contrib/dxc_2025_07_14/inc/Support/ErrorCodes.h
new file mode 100644
index 0000000..5239c81
--- /dev/null
+++ b/contrib/dxc_2025_07_14/inc/Support/ErrorCodes.h
@@ -0,0 +1,160 @@
1///////////////////////////////////////////////////////////////////////////////
2// //
3// ErrorCodes.h //
4// Copyright (C) Microsoft Corporation. All rights reserved. //
5// This file is distributed under the University of Illinois Open Source //
6// License. See LICENSE.TXT for details. //
7// //
8// Provides error code values for the DirectX compiler and tools. //
9// //
10///////////////////////////////////////////////////////////////////////////////
11
12#pragma once
13
14// Redeclare some macros to not depend on winerror.h
15#define DXC_SEVERITY_ERROR 1
16#define DXC_MAKE_HRESULT(sev, fac, code) \
17 ((HRESULT)(((unsigned long)(sev) << 31) | ((unsigned long)(fac) << 16) | \
18 ((unsigned long)(code))))
19
20#define HRESULT_IS_WIN32ERR(hr) \
21 ((HRESULT)(hr & 0xFFFF0000) == \
22 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, 0))
23#define HRESULT_AS_WIN32ERR(hr) (HRESULT_CODE(hr))
24
25// Error codes from C libraries (0n150) - 0x8096xxxx
26#define FACILITY_ERRNO (0x96)
27#define HRESULT_FROM_ERRNO(x) \
28 MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_ERRNO, (x))
29
30// Error codes from DXC libraries (0n170) - 0x8013xxxx
31#define FACILITY_DXC (0xAA)
32
33// 0x00000000 - The operation succeeded.
34#define DXC_S_OK 0 // _HRESULT_TYPEDEF_(0x00000000L)
35
36// 0x80AA0001 - The operation failed because overlapping semantics were found.
37#define DXC_E_OVERLAPPING_SEMANTICS \
38 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0001))
39
40// 0x80AA0002 - The operation failed because multiple depth semantics were
41// found.
42#define DXC_E_MULTIPLE_DEPTH_SEMANTICS \
43 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0002))
44
45// 0x80AA0003 - Input file is too large.
46#define DXC_E_INPUT_FILE_TOO_LARGE \
47 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0003))
48
49// 0x80AA0004 - Error parsing DXBC container.
50#define DXC_E_INCORRECT_DXBC \
51 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0004))
52
53// 0x80AA0005 - Error parsing DXBC bytecode.
54#define DXC_E_ERROR_PARSING_DXBC_BYTECODE \
55 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0005))
56
57// 0x80AA0006 - Data is too large.
58#define DXC_E_DATA_TOO_LARGE \
59 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0006))
60
61// 0x80AA0007 - Incompatible converter options.
62#define DXC_E_INCOMPATIBLE_CONVERTER_OPTIONS \
63 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0007))
64
65// 0x80AA0008 - Irreducible control flow graph.
66#define DXC_E_IRREDUCIBLE_CFG \
67 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0008))
68
69// 0x80AA0009 - IR verification error.
70#define DXC_E_IR_VERIFICATION_FAILED \
71 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0009))
72
73// 0x80AA000A - Scope-nested control flow recovery failed.
74#define DXC_E_SCOPE_NESTED_FAILED \
75 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x000A))
76
77// 0x80AA000B - Operation is not supported.
78#define DXC_E_NOT_SUPPORTED \
79 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x000B))
80
81// 0x80AA000C - Unable to encode string.
82#define DXC_E_STRING_ENCODING_FAILED \
83 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x000C))
84
85// 0x80AA000D - DXIL container is invalid.
86#define DXC_E_CONTAINER_INVALID \
87 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x000D))
88
89// 0x80AA000E - DXIL container is missing the DXIL part.
90#define DXC_E_CONTAINER_MISSING_DXIL \
91 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x000E))
92
93// 0x80AA000F - Unable to parse DxilModule metadata.
94#define DXC_E_INCORRECT_DXIL_METADATA \
95 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x000F))
96
97// 0x80AA0010 - Error parsing DDI signature.
98#define DXC_E_INCORRECT_DDI_SIGNATURE \
99 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0010))
100
101// 0x80AA0011 - Duplicate part exists in dxil container.
102#define DXC_E_DUPLICATE_PART \
103 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0011))
104
105// 0x80AA0012 - Error finding part in dxil container.
106#define DXC_E_MISSING_PART \
107 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0012))
108
109// 0x80AA0013 - Malformed DXIL Container.
110#define DXC_E_MALFORMED_CONTAINER \
111 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0013))
112
113// 0x80AA0014 - Incorrect Root Signature for shader.
114#define DXC_E_INCORRECT_ROOT_SIGNATURE \
115 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0014))
116
117// 0X80AA0015 - DXIL container is missing DebugInfo part.
118#define DXC_E_CONTAINER_MISSING_DEBUG \
119 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0015))
120
121// 0X80AA0016 - Unexpected failure in macro expansion.
122#define DXC_E_MACRO_EXPANSION_FAILURE \
123 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0016))
124
125// 0X80AA0017 - DXIL optimization pass failed.
126#define DXC_E_OPTIMIZATION_FAILED \
127 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0017))
128
129// 0X80AA0018 - General internal error.
130#define DXC_E_GENERAL_INTERNAL_ERROR \
131 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0018))
132
133// 0X80AA0019 - Abort compilation error.
134#define DXC_E_ABORT_COMPILATION_ERROR \
135 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x0019))
136
137// 0X80AA001A - Error in extension mechanism.
138#define DXC_E_EXTENSION_ERROR \
139 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x001A))
140
141// 0X80AA001B - LLVM Fatal Error
142#define DXC_E_LLVM_FATAL_ERROR \
143 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x001B))
144
145// 0X80AA001C - LLVM Unreachable code
146#define DXC_E_LLVM_UNREACHABLE \
147 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x001C))
148
149// 0X80AA001D - LLVM Cast Failure
150#define DXC_E_LLVM_CAST_ERROR \
151 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x001D))
152
153// 0X80AA001E - External validator (DXIL.dll) required, and missing.
154#define DXC_E_VALIDATOR_MISSING \
155 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x001E))
156
157// 0X80AA001F - DXIL container Program Version mismatches Dxil module shader
158// model
159#define DXC_E_INCORRECT_PROGRAM_VERSION \
160 DXC_MAKE_HRESULT(DXC_SEVERITY_ERROR, FACILITY_DXC, (0x001F)) \ No newline at end of file