Skip to content

Commit 7a0a9f7

Browse files
committed
nfc: prep dxbc::StaticBorderColor
1 parent 260123c commit 7a0a9f7

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

llvm/include/llvm/BinaryFormat/DXContainer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,12 @@ enum class SamplersComparisonFunction : uint32_t {
237237
};
238238

239239
#define STATIC_BORDER_COLOR(Val, Enum) Enum = Val,
240-
enum class SamplersBorderColor : uint32_t {
240+
enum class StaticBorderColor : uint32_t {
241241
#include "DXContainerConstants.def"
242242
};
243243

244+
LLVM_ABI ArrayRef<EnumEntry<StaticBorderColor>> getStaticBorderColors();
245+
244246
LLVM_ABI PartType parsePartType(StringRef S);
245247

246248
struct VertexPSVInfo {

llvm/include/llvm/ObjectYAML/DXContainerYAML.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ struct StaticSamplerYamlDesc {
174174
uint32_t ComparisonFunc =
175175
llvm::to_underlying(dxbc::SamplersComparisonFunction::LessEqual);
176176
uint32_t BorderColor =
177-
llvm::to_underlying(dxbc::SamplersBorderColor::OpaqueWhite);
177+
llvm::to_underlying(dxbc::StaticBorderColor::OpaqueWhite);
178178
float MinLOD = 0.f;
179179
float MaxLOD = std::numeric_limits<float>::max();
180180
uint32_t ShaderRegister;

llvm/lib/BinaryFormat/DXContainer.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ ArrayRef<EnumEntry<ShaderVisibility>> dxbc::getShaderVisibility() {
9999
return ArrayRef(ShaderVisibilityValues);
100100
}
101101

102+
#define STATIC_BORDER_COLOR(Val, Enum) {#Enum, StaticBorderColor::Enum},
103+
104+
static const EnumEntry<StaticBorderColor> StaticBorderColorValues[] = {
105+
#include "llvm/BinaryFormat/DXContainerConstants.def"
106+
};
107+
108+
ArrayRef<EnumEntry<StaticBorderColor>> dxbc::getStaticBorderColors() {
109+
return ArrayRef(StaticBorderColorValues);
110+
}
111+
102112
#define ROOT_PARAMETER(Val, Enum) {#Enum, RootParameterType::Enum},
103113

104114
static const EnumEntry<RootParameterType> RootParameterTypes[] = {

0 commit comments

Comments
 (0)