Skip to content

Commit d343b2d

Browse files
committed
[ser] Add 'reordercoherent' to dxcdisassembler and update tests
1 parent a628688 commit d343b2d

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

tools/clang/test/CodeGenDXIL/hlsl/attributes/reordercoherent_for_arg.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
// CHECK: %[[uH:[^ ]+]] = load %dx.types.Handle, %dx.types.Handle* @"\01?u@@3V?$RWBuffer@M@@A", align 4
55
// CHECK: %[[uLIBH:[^ ]+]] = call %dx.types.Handle @dx.op.createHandleForLib.dx.types.Handle(i32 160, %dx.types.Handle %[[uH]]) ; CreateHandleForLib(Resource)
6-
// CHECK: %[[uANNOT:[^ ]+]] = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %[[uLIBH]], %dx.types.ResourceProperties { i32 69642, i32 265 }) ; AnnotateHandle(res,props) resource: RWTypedBuffer<F32>
6+
// CHECK: %[[uANNOT:[^ ]+]] = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %[[uLIBH]], %dx.types.ResourceProperties { i32 69642, i32 265 }) ; AnnotateHandle(res,props) resource: reordercoherent RWTypedBuffer<F32>
77
// CHECK: %{{[^ ]+}} = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle %[[uANNOT]], i32 0, i32 undef) ; BufferLoad(srv,index,wot)
88

99
RWBuffer<float> OutBuf : register(u1);

tools/clang/tools/dxcompiler/dxcdisassembler.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ void PrintResourceProperties(DxilResourceProperties &RP,
12201220
bool bUAV = RP.isUAV();
12211221
LPCSTR RW = bUAV ? (RP.Basic.IsROV ? "ROV" : "RW") : "";
12221222
LPCSTR GC = bUAV && RP.Basic.IsGloballyCoherent ? "globallycoherent " : "";
1223+
LPCSTR RC = bUAV && RP.Basic.IsReorderCoherent ? "reordercoherent " : "";
12231224
LPCSTR COUNTER = bUAV && RP.Basic.SamplerCmpOrHasCounter ? ", counter" : "";
12241225

12251226
switch (RP.getResourceKind()) {
@@ -1233,19 +1234,19 @@ void PrintResourceProperties(DxilResourceProperties &RP,
12331234
case DXIL::ResourceKind::TypedBuffer:
12341235
case DXIL::ResourceKind::Texture2DMS:
12351236
case DXIL::ResourceKind::Texture2DMSArray:
1236-
OS << GC << RW << ResourceKindToString(RP.getResourceKind());
1237+
OS << GC << RC << RW << ResourceKindToString(RP.getResourceKind());
12371238
OS << "<";
12381239
if (RP.Typed.CompCount > 1)
12391240
OS << std::to_string(RP.Typed.CompCount) << "x";
12401241
OS << CompTypeToString(RP.getCompType()) << ">";
12411242
break;
12421243

12431244
case DXIL::ResourceKind::RawBuffer:
1244-
OS << GC << RW << ResourceKindToString(RP.getResourceKind());
1245+
OS << GC << RC << RW << ResourceKindToString(RP.getResourceKind());
12451246
break;
12461247

12471248
case DXIL::ResourceKind::StructuredBuffer:
1248-
OS << GC << RW << ResourceKindToString(RP.getResourceKind());
1249+
OS << GC << RC << RW << ResourceKindToString(RP.getResourceKind());
12491250
OS << "<stride=" << RP.StructStrideInBytes << COUNTER << ">";
12501251
break;
12511252

0 commit comments

Comments
 (0)