|
6 | 6 | //
|
7 | 7 | //===----------------------------------------------------------------------===//
|
8 | 8 | ///
|
9 |
| -/// \file This file contains helper objects for working with HLSL Root |
10 |
| -/// Signatures. |
| 9 | +/// \file This file contains structure definitions of HLSL Root Signature |
| 10 | +/// objects. |
11 | 11 | ///
|
12 | 12 | //===----------------------------------------------------------------------===//
|
13 | 13 |
|
14 | 14 | #ifndef LLVM_FRONTEND_HLSL_HLSLROOTSIGNATURE_H
|
15 | 15 | #define LLVM_FRONTEND_HLSL_HLSLROOTSIGNATURE_H
|
16 | 16 |
|
17 |
| -#include "llvm/ADT/ArrayRef.h" |
18 | 17 | #include "llvm/Support/Compiler.h"
|
19 | 18 | #include "llvm/Support/DXILABI.h"
|
20 |
| -#include "llvm/Support/raw_ostream.h" |
21 | 19 | #include <variant>
|
22 | 20 |
|
23 | 21 | namespace llvm {
|
24 |
| -class LLVMContext; |
25 |
| -class MDNode; |
26 |
| -class Metadata; |
27 |
| - |
28 | 22 | namespace hlsl {
|
29 | 23 | namespace rootsig {
|
30 | 24 |
|
@@ -195,8 +189,6 @@ struct DescriptorTable {
|
195 | 189 | uint32_t NumClauses = 0;
|
196 | 190 | };
|
197 | 191 |
|
198 |
| -LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const DescriptorTable &Table); |
199 |
| - |
200 | 192 | static const uint32_t NumDescriptorsUnbounded = 0xffffffff;
|
201 | 193 | static const uint32_t DescriptorTableOffsetAppend = 0xffffffff;
|
202 | 194 | // Models DTClause : CBV | SRV | UAV | Sampler, by collecting like parameters
|
@@ -225,9 +217,6 @@ struct DescriptorTableClause {
|
225 | 217 | }
|
226 | 218 | };
|
227 | 219 |
|
228 |
| -LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, |
229 |
| - const DescriptorTableClause &Clause); |
230 |
| - |
231 | 220 | struct StaticSampler {
|
232 | 221 | Register Reg;
|
233 | 222 | SamplerFilter Filter = SamplerFilter::Anisotropic;
|
@@ -264,32 +253,6 @@ using RootElement =
|
264 | 253 | std::variant<RootFlags, RootConstants, RootDescriptor, DescriptorTable,
|
265 | 254 | DescriptorTableClause, StaticSampler>;
|
266 | 255 |
|
267 |
| -LLVM_ABI void dumpRootElements(raw_ostream &OS, ArrayRef<RootElement> Elements); |
268 |
| - |
269 |
| -class MetadataBuilder { |
270 |
| -public: |
271 |
| - MetadataBuilder(llvm::LLVMContext &Ctx, ArrayRef<RootElement> Elements) |
272 |
| - : Ctx(Ctx), Elements(Elements) {} |
273 |
| - |
274 |
| - /// Iterates through the elements and dispatches onto the correct Build method |
275 |
| - /// |
276 |
| - /// Accumulates the root signature and returns the Metadata node that is just |
277 |
| - /// a list of all the elements |
278 |
| - LLVM_ABI MDNode *BuildRootSignature(); |
279 |
| - |
280 |
| -private: |
281 |
| - /// Define the various builders for the different metadata types |
282 |
| - MDNode *BuildRootFlags(const RootFlags &Flags); |
283 |
| - MDNode *BuildRootConstants(const RootConstants &Constants); |
284 |
| - MDNode *BuildRootDescriptor(const RootDescriptor &Descriptor); |
285 |
| - MDNode *BuildDescriptorTable(const DescriptorTable &Table); |
286 |
| - MDNode *BuildDescriptorTableClause(const DescriptorTableClause &Clause); |
287 |
| - |
288 |
| - llvm::LLVMContext &Ctx; |
289 |
| - ArrayRef<RootElement> Elements; |
290 |
| - SmallVector<Metadata *> GeneratedMetadata; |
291 |
| -}; |
292 |
| - |
293 | 256 | } // namespace rootsig
|
294 | 257 | } // namespace hlsl
|
295 | 258 | } // namespace llvm
|
|
0 commit comments