Skip to content

Commit 4f120cc

Browse files
Joao SaffranJoao Saffran
authored andcommitted
clean up tests
1 parent a163d1b commit 4f120cc

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

llvm/test/CodeGen/DirectX/rootsignature-validation-textures-fail.ll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s
22
; CHECK: error: resource TB at register (space=0, register=0) is bound to a texture or typed buffer.
33

4-
5-
; Root Signature(
6-
; UAV(b0, space=0, visibility=SHADER_VISIBILITY_ALL)
7-
84
@TB.str = private unnamed_addr constant [3 x i8] c"TB\00", align 1
95

106
define void @CSMain() "hlsl.shader"="compute" {
117
entry:
12-
138
%TB = tail call target("dx.Texture", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false, ptr nonnull @TB.str)
14-
159
ret void
1610
}
1711

llvm/test/CodeGen/DirectX/rootsignature-validation-textures.ll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
; RUN: opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1
2-
; expected-no-diagnostics
3-
; Root Signature(
4-
; DescriptorTable(UAV(b0, space=0, visibility=SHADER_VISIBILITY_ALL))
1+
; RUN: opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s
2+
; "This is a valid root signature with a texture/typed buffer resource"
53

64
@TB.str = private unnamed_addr constant [3 x i8] c"TB\00", align 1
75

86
define void @CSMain() "hlsl.shader"="compute" {
97
entry:
10-
118
%TB = tail call target("dx.Texture", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false, ptr nonnull @TB.str)
12-
139
ret void
1410
}
1511

llvm/test/CodeGen/DirectX/rootsignature-validation-typedbuffer-fail.ll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s
22
; CHECK: error: resource TB at register (space=0, register=0) is bound to a texture or typed buffer.
33

4-
5-
; Root Signature(
6-
; CBV(b3, space=1, visibility=SHADER_VISIBILITY_ALL)
7-
; DescriptorTable(SRV(t0, space=0, numDescriptors=1), visibility=SHADER_VISIBILITY_ALL)
8-
; DescriptorTable(Sampler(s0, numDescriptors=2), visibility=SHADER_VISIBILITY_VERTEX)
9-
; DescriptorTable(UAV(u0, numDescriptors=unbounded), visibility=SHADER_VISIBILITY_ALL)
10-
114
@TB.str = private unnamed_addr constant [3 x i8] c"TB\00", align 1
125

136
define void @CSMain() "hlsl.shader"="compute" {
147
entry:
15-
168
%TB = tail call target("dx.TypedBuffer", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false, ptr nonnull @TB.str)
17-
189
ret void
1910
}
2011

llvm/test/CodeGen/DirectX/rootsignature-validation-typedbuffer.ll

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
; RUN: opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1
2-
; expected-no-diagnostics
3-
; Root Signature(
4-
; DescriptorTable(UAV(b0, space=0, visibility=SHADER_VISIBILITY_ALL))
2+
; This is a valid root signature with a texture/typed buffer resource
53

64
@TB.str = private unnamed_addr constant [3 x i8] c"TB\00", align 1
75

86
define void @CSMain() "hlsl.shader"="compute" {
97
entry:
10-
118
%TB = tail call target("dx.TypedBuffer", float, 1, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false, ptr nonnull @TB.str)
12-
139
ret void
1410
}
1511

0 commit comments

Comments
 (0)