Skip to content

Commit d2d052b

Browse files
authored
[DirectX] Use "texture" not "SRV" when pretty printing resources (#130230)
We're printing "SRV" here when DXC would print "texture". Fix this to be consistent. Fixes #130227.
1 parent 96637b4 commit d2d052b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

llvm/lib/Target/DirectX/DXILPrettyPrinter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using namespace llvm;
2222
static StringRef getRCName(dxil::ResourceClass RC) {
2323
switch (RC) {
2424
case dxil::ResourceClass::SRV:
25-
return "SRV";
25+
return "texture";
2626
case dxil::ResourceClass::UAV:
2727
return "UAV";
2828
case dxil::ResourceClass::CBuffer:

llvm/test/CodeGen/DirectX/CreateHandle.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
; CHECK-PRETTY: Type Format Dim ID HLSL Bind Count
55
; CHECK-PRETTY: ---------- ------- ----------- ------- -------------- ---------
6-
; CHECK-PRETTY: SRV f32 buf T0 t7 unbounded
7-
; CHECK-PRETTY: SRV byte r/o T1 t8,space1 1
8-
; CHECK-PRETTY: SRV struct r/o T2 t2,space4 1
9-
; CHECK-PRETTY: SRV u32 buf T3 t3,space5 24
6+
; CHECK-PRETTY: texture f32 buf T0 t7 unbounded
7+
; CHECK-PRETTY: texture byte r/o T1 t8,space1 1
8+
; CHECK-PRETTY: texture struct r/o T2 t2,space4 1
9+
; CHECK-PRETTY: texture u32 buf T3 t3,space5 24
1010
; CHECK-PRETTY: UAV i32 buf U0 u7,space2 1
1111
; CHECK-PRETTY: UAV f32 buf U1 u5,space3 1
1212

llvm/test/CodeGen/DirectX/CreateHandleFromBinding.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
; CHECK-PRETTY: Type Format Dim ID HLSL Bind Count
55
; CHECK-PRETTY: ---------- ------- ----------- ------- -------------- ---------
6-
; CHECK-PRETTY: SRV f32 buf T0 t7 unbounded
7-
; CHECK-PRETTY: SRV byte r/o T1 t8,space1 1
8-
; CHECK-PRETTY: SRV struct r/o T2 t2,space4 1
9-
; CHECK-PRETTY: SRV u32 buf T3 t3,space5 24
6+
; CHECK-PRETTY: texture f32 buf T0 t7 unbounded
7+
; CHECK-PRETTY: texture byte r/o T1 t8,space1 1
8+
; CHECK-PRETTY: texture struct r/o T2 t2,space4 1
9+
; CHECK-PRETTY: texture u32 buf T3 t3,space5 24
1010
; CHECK-PRETTY: UAV i32 buf U0 u7,space2 1
1111
; CHECK-PRETTY: UAV f32 buf U1 u5,space3 1
1212
; CHECK-PRETTY: cbuffer NA NA CB0 cb0 1

0 commit comments

Comments
 (0)