Skip to content

Commit 44b0425

Browse files
committed
Fix up some missed ClauseType/DescriptorTypes
1 parent 704ebe6 commit 44b0425

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

llvm/unittests/Frontend/HLSLRootSignatureDumpTest.cpp

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
#include "gtest/gtest.h"
1111

1212
using namespace llvm::hlsl::rootsig;
13+
using llvm::dxil::ResourceClass;
1314

1415
namespace {
1516

1617
TEST(HLSLRootSignatureTest, DescriptorCBVClauseDump) {
1718
DescriptorTableClause Clause;
18-
Clause.Type = ClauseType::CBuffer;
19+
Clause.Type = ResourceClass::CBuffer;
1920
Clause.Reg = {RegisterType::BReg, 0};
2021
Clause.setDefaultFlags(llvm::dxbc::RootSignatureVersion::V1_1);
2122

@@ -32,7 +33,7 @@ TEST(HLSLRootSignatureTest, DescriptorCBVClauseDump) {
3233

3334
TEST(HLSLRootSignatureTest, DescriptorSRVClauseDump) {
3435
DescriptorTableClause Clause;
35-
Clause.Type = ClauseType::SRV;
36+
Clause.Type = ResourceClass::SRV;
3637
Clause.Reg = {RegisterType::TReg, 0};
3738
Clause.NumDescriptors = NumDescriptorsUnbounded;
3839
Clause.Space = 42;
@@ -52,7 +53,7 @@ TEST(HLSLRootSignatureTest, DescriptorSRVClauseDump) {
5253
TEST(HLSLRootSignatureTest, DescriptorUAVClauseDump) {
5354
using llvm::dxbc::DescriptorRangeFlags;
5455
DescriptorTableClause Clause;
55-
Clause.Type = ClauseType::UAV;
56+
Clause.Type = ResourceClass::UAV;
5657
Clause.Reg = {RegisterType::UReg, 92374};
5758
Clause.NumDescriptors = 3298;
5859
Clause.Space = 932847;
@@ -82,7 +83,7 @@ TEST(HLSLRootSignatureTest, DescriptorUAVClauseDump) {
8283

8384
TEST(HLSLRootSignatureTest, DescriptorSamplerClauseDump) {
8485
DescriptorTableClause Clause;
85-
Clause.Type = ClauseType::Sampler;
86+
Clause.Type = ResourceClass::Sampler;
8687
Clause.Reg = {RegisterType::SReg, 0};
8788
Clause.NumDescriptors = 2;
8889
Clause.Space = 42;
@@ -102,7 +103,7 @@ TEST(HLSLRootSignatureTest, DescriptorSamplerClauseDump) {
102103

103104
TEST(HLSLRootSignatureTest, DescriptorCBVV10ClauseDump) {
104105
DescriptorTableClause Clause;
105-
Clause.Type = ClauseType::CBuffer;
106+
Clause.Type = ResourceClass::CBuffer;
106107
Clause.Reg = {RegisterType::BReg, 0};
107108
Clause.setDefaultFlags(llvm::dxbc::RootSignatureVersion::V1_0);
108109

@@ -119,7 +120,7 @@ TEST(HLSLRootSignatureTest, DescriptorCBVV10ClauseDump) {
119120

120121
TEST(HLSLRootSignatureTest, DescriptorSamplerV10ClauseDump) {
121122
DescriptorTableClause Clause;
122-
Clause.Type = ClauseType::Sampler;
123+
Clause.Type = ResourceClass::Sampler;
123124
Clause.Reg = {RegisterType::SReg, 0};
124125
Clause.setDefaultFlags(llvm::dxbc::RootSignatureVersion::V1_0);
125126

@@ -151,7 +152,7 @@ TEST(HLSLRootSignatureTest, DescriptorTableDump) {
151152

152153
TEST(HLSLRootSignatureTest, RootCBVDump) {
153154
RootDescriptor Descriptor;
154-
Descriptor.Type = DescriptorType::CBuffer;
155+
Descriptor.Type = ResourceClass::CBuffer;
155156
Descriptor.Reg = {RegisterType::BReg, 0};
156157
Descriptor.setDefaultFlags(llvm::dxbc::RootSignatureVersion::V1_1);
157158

@@ -168,7 +169,7 @@ TEST(HLSLRootSignatureTest, RootCBVDump) {
168169

169170
TEST(HLSLRootSignatureTest, RootSRV10Dump) {
170171
RootDescriptor Descriptor;
171-
Descriptor.Type = DescriptorType::SRV;
172+
Descriptor.Type = ResourceClass::SRV;
172173
Descriptor.Reg = {RegisterType::TReg, 0};
173174
Descriptor.setDefaultFlags(llvm::dxbc::RootSignatureVersion::V1_0);
174175

@@ -185,7 +186,7 @@ TEST(HLSLRootSignatureTest, RootSRV10Dump) {
185186

186187
TEST(HLSLRootSignatureTest, RootUAVV10Dump) {
187188
RootDescriptor Descriptor;
188-
Descriptor.Type = DescriptorType::UAV;
189+
Descriptor.Type = ResourceClass::UAV;
189190
Descriptor.Reg = {RegisterType::UReg, 0};
190191
Descriptor.setDefaultFlags(llvm::dxbc::RootSignatureVersion::V1_0);
191192

@@ -202,7 +203,7 @@ TEST(HLSLRootSignatureTest, RootUAVV10Dump) {
202203

203204
TEST(HLSLRootSignatureTest, RootSRVDump) {
204205
RootDescriptor Descriptor;
205-
Descriptor.Type = DescriptorType::SRV;
206+
Descriptor.Type = ResourceClass::SRV;
206207
Descriptor.Reg = {RegisterType::TReg, 0};
207208
Descriptor.Space = 42;
208209
Descriptor.Visibility = llvm::dxbc::ShaderVisibility::Geometry;
@@ -221,7 +222,7 @@ TEST(HLSLRootSignatureTest, RootSRVDump) {
221222
TEST(HLSLRootSignatureTest, RootUAVDump) {
222223
using llvm::dxbc::RootDescriptorFlags;
223224
RootDescriptor Descriptor;
224-
Descriptor.Type = DescriptorType::UAV;
225+
Descriptor.Type = ResourceClass::UAV;
225226
Descriptor.Reg = {RegisterType::UReg, 92374};
226227
Descriptor.Space = 932847;
227228
Descriptor.Visibility = llvm::dxbc::ShaderVisibility::Hull;

0 commit comments

Comments
 (0)