LLVM 20.0.0git
DXContainer.cpp
Go to the documentation of this file.
1
2//===-- llvm/BinaryFormat/DXContainer.cpp - DXContainer Utils ----*- C++-*-===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9//
10// This file contains utility functions for working with DXContainers.
11//
12//===----------------------------------------------------------------------===//
13
17
18using namespace llvm;
19using namespace llvm::dxbc;
20
22#define CONTAINER_PART(PartName) .Case(#PartName, PartType::PartName)
24#include "llvm/BinaryFormat/DXContainerConstants.def"
25 .Default(dxbc::PartType::Unknown);
26}
27
29 static uint8_t Zeros[16] = {0};
30 return Flags > 0 || 0 != memcmp(&Digest, &Zeros, 16);
31}
32
33#define COMPONENT_PRECISION(Val, Enum) {#Enum, SigMinPrecision::Enum},
34
36#include "llvm/BinaryFormat/DXContainerConstants.def"
37};
38
41}
42
43#define D3D_SYSTEM_VALUE(Val, Enum) {#Enum, D3DSystemValue::Enum},
44
46#include "llvm/BinaryFormat/DXContainerConstants.def"
47};
48
51}
52
53#define COMPONENT_TYPE(Val, Enum) {#Enum, SigComponentType::Enum},
54
56#include "llvm/BinaryFormat/DXContainerConstants.def"
57};
58
61}
62
63#define SEMANTIC_KIND(Val, Enum) {#Enum, PSV::SemanticKind::Enum},
64
66#include "llvm/BinaryFormat/DXContainerConstants.def"
67};
68
71}
72
73#define COMPONENT_TYPE(Val, Enum) {#Enum, PSV::ComponentType::Enum},
74
76#include "llvm/BinaryFormat/DXContainerConstants.def"
77};
78
81}
82
83#define INTERPOLATION_MODE(Val, Enum) {#Enum, PSV::InterpolationMode::Enum},
84
86#include "llvm/BinaryFormat/DXContainerConstants.def"
87};
88
91}
static const EnumEntry< D3DSystemValue > D3DSystemValueNames[]
Definition: DXContainer.cpp:45
static const EnumEntry< PSV::InterpolationMode > InterpolationModeNames[]
Definition: DXContainer.cpp:85
static const EnumEntry< SigMinPrecision > SigMinPrecisionNames[]
Definition: DXContainer.cpp:35
static const EnumEntry< PSV::SemanticKind > SemanticKindNames[]
Definition: DXContainer.cpp:65
static const EnumEntry< SigComponentType > SigComponentTypes[]
Definition: DXContainer.cpp:55
static const EnumEntry< PSV::ComponentType > ComponentTypeNames[]
Definition: DXContainer.cpp:75
Merge contiguous icmps into a memcmp
Definition: MergeICmps.cpp:911
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
A switch()-like statement whose cases are string literals.
Definition: StringSwitch.h:44
R Default(T Value)
Definition: StringSwitch.h:182
ArrayRef< EnumEntry< ComponentType > > getComponentTypes()
Definition: DXContainer.cpp:79
ArrayRef< EnumEntry< SemanticKind > > getSemanticKinds()
Definition: DXContainer.cpp:69
ArrayRef< EnumEntry< InterpolationMode > > getInterpolationModes()
Definition: DXContainer.cpp:89
PartType parsePartType(StringRef S)
Definition: DXContainer.cpp:21
ArrayRef< EnumEntry< SigComponentType > > getSigComponentTypes()
Definition: DXContainer.cpp:59
ArrayRef< EnumEntry< SigMinPrecision > > getSigMinPrecisions()
Definition: DXContainer.cpp:39
ArrayRef< EnumEntry< D3DSystemValue > > getD3DSystemValues()
Definition: DXContainer.cpp:49
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18