Skip to content

Commit f9ab918

Browse files
author
joaosaffran
committed
change test
1 parent e136489 commit f9ab918

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

llvm/lib/Target/DirectX/DXILRootSignature.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,23 +248,23 @@ PreservedAnalyses RootSignatureAnalysisPrinter::run(Module &M,
248248

249249
OS << indent(Space) << "- Parameters: \n";
250250
Space++;
251-
for (const auto &Param : RS.Parameters) {
252-
OS << indent(Space) << "Type: " << &Param.ParameterType << " \n";
253-
OS << indent(Space) << "ShaderVisibility: " << &Param.ShaderVisibility
254-
<< " \n";
251+
for (const auto &P : RS.Parameters) {
252+
OS << indent(Space) << "Type: " << (uint32_t)P.ParameterType << " \n";
253+
OS << indent(Space)
254+
<< "ShaderVisibility: " << (uint32_t)P.ShaderVisibility << " \n";
255255
Space++;
256256

257-
switch (Param.ParameterType) {
257+
switch (P.ParameterType) {
258258

259259
case dxbc::RootParameterType::Constants32Bit: {
260260
OS << indent(Space) << "- Constants: \n";
261261
Space++;
262-
OS << indent(Space)
263-
<< "RegisterSpace: " << &Param.Constants.RegisterSpace << " \n";
264-
OS << indent(Space)
265-
<< "ShaderRegister: " << &Param.Constants.ShaderRegister << " \n";
266-
OS << indent(Space)
267-
<< "Num32BitValues: " << &Param.Constants.Num32BitValues << " \n";
262+
OS << indent(Space) << "RegisterSpace: " << P.Constants.RegisterSpace
263+
<< " \n";
264+
OS << indent(Space) << "ShaderRegister: " << P.Constants.ShaderRegister
265+
<< " \n";
266+
OS << indent(Space) << "Num32BitValues: " << P.Constants.Num32BitValues
267+
<< " \n";
268268
Space--;
269269
} break;
270270
case dxbc::RootParameterType::Empty:
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: opt %s -dxil-embed -dxil-globals -S -o - | FileCheck %s
2-
; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=DXC
2+
; RUN: opt -passes='print<dxil-root-signature>' %s -S -o - 2>&1 | FileCheck %s --check-prefix=DXC
33

44
target triple = "dxil-unknown-shadermodel6.0-compute"
55

@@ -18,16 +18,18 @@ attributes #0 = { "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }
1818
!4 = !{ !"RootConstants", i32 0, i32 1, i32 2, i32 3 }
1919

2020

21-
; DXC: - Name: RTS0
22-
; DXC-NEXT: Size: 48
23-
; DXC-NEXT: RootSignature:
24-
; DXC-NEXT: Version: 2
25-
; DXC-NEXT: NumStaticSamplers: 0
26-
; DXC-NEXT: StaticSamplersOffset: 44
27-
; DXC-NEXT: Parameters:
28-
; DXC-NEXT: - ParameterType: Constants32Bit
29-
; DXC-NEXT: ShaderVisibility: All
30-
; DXC-NEXT: Constants:
31-
; DXC-NEXT: Num32BitValues: 3
32-
; DXC-NEXT: RegisterSpace: 2
33-
; DXC-NEXT: ShaderRegister: 1
21+
; DXC: Root Signature Definitions
22+
; DXC-NEXT: Definition for 'main':
23+
; DXC-NEXT: Flags: 0x000000:
24+
; DXC-NEXT: Version: 2:
25+
; DXC-NEXT: NumParameters: 1:
26+
; DXC-NEXT: RootParametersOffset: 20:
27+
; DXC-NEXT: NumStaticSamplers: 0:
28+
; DXC-NEXT: StaticSamplersOffset: 28:
29+
; DXC-NEXT: - Parameters:
30+
; DXC-NEXT: Type: 1
31+
; DXC-NEXT: ShaderVisibility: 0
32+
; DXC-NEXT: - Constants:
33+
; DXC-NEXT: RegisterSpace: 2
34+
; DXC-NEXT: ShaderRegister: 1
35+
; DXC-NEXT: Num32BitValues: 3

0 commit comments

Comments
 (0)