Skip to content

Commit 373d871

Browse files
Joao SaffranJoao Saffran
authored andcommitted
clean up
1 parent 1cf2d1e commit 373d871

6 files changed

+18
-18
lines changed

llvm/lib/Target/DirectX/DXILPostOptimizationValidation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "llvm/ADT/SmallString.h"
1414
#include "llvm/Analysis/DXILMetadataAnalysis.h"
1515
#include "llvm/Analysis/DXILResource.h"
16-
#include "llvm/Frontend/HLSL/HLSLBinding.h"
1716
#include "llvm/IR/DiagnosticInfo.h"
1817
#include "llvm/IR/Instructions.h"
1918
#include "llvm/IR/IntrinsicsDirectX.h"
File renamed without changes.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s
2+
; CHECK: error: register Sampler (space=2, register=3) does not have a binding in the Root Signature
3+
4+
@Smp.str = private unnamed_addr constant [4 x i8] c"Smp\00", align 1
5+
6+
7+
define void @CSMain() "hlsl.shader"="compute" {
8+
entry:
9+
%Sampler = call target("dx.Sampler", 0) @llvm.dx.resource.handlefrombinding(i32 2, i32 3, i32 1, i32 0, i1 false, ptr nonnull @Smp.str)
10+
ret void
11+
}
12+
13+
!dx.rootsignatures = !{!0}
14+
15+
!0 = !{ptr @CSMain, !1, i32 2}
16+
!1 = !{!2}
17+
!2 = !{!"DescriptorTable", i32 0, !3}
18+
!3 = !{!"Sampler", i32 1, i32 42, i32 0, i32 -1, i32 0}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
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 Sampler (space=0, registers=[42, 42]) overlaps with resource Sampler (space=0, registers=[42, 42])
33

4-
@Smp.str = private unnamed_addr constant [4 x i8] c"Smp\00", align 1
5-
64

75
define void @CSMain() "hlsl.shader"="compute" {
86
entry:
9-
%Sampler = call target("dx.Sampler", 0) @llvm.dx.resource.handlefrombinding(i32 2, i32 3, i32 1, i32 0, i1 false, ptr nonnull @Smp.str)
107
ret void
118
}
129

llvm/test/CodeGen/DirectX/rootsignature-validation-fail-srv.ll renamed to llvm/test/CodeGen/DirectX/rootsignature-validation-fail-srv-binding.ll

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s
2-
32
; CHECK: error: register SRV (space=0, register=0) does not have a binding in the Root Signature
43

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

136
define void @CSMain() "hlsl.shader"="compute" {

llvm/test/CodeGen/DirectX/rootsignature-validation-fail-uav.ll renamed to llvm/test/CodeGen/DirectX/rootsignature-validation-fail-uav-binding.ll

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s
2-
32
; CHECK: error: register UAV (space=0, register=4294967294) does not have a binding in the Root Signature
43

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

136
define void @CSMain() "hlsl.shader"="compute" {

0 commit comments

Comments
 (0)