Use undef to save type for type annotation. (#35)
This commit is contained in:
Родитель
5e5897564a
Коммит
7c91399069
|
@ -154,8 +154,8 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, bool HasDebugInfo) {
|
|||
b->SetSize(C->GetSize());
|
||||
if (HasDebugInfo)
|
||||
LLVMUsed.emplace_back(cast<GlobalVariable>(b->GetGlobalSymbol()));
|
||||
else
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
M.AddCBuffer(std::move(b));
|
||||
}
|
||||
for (auto && C : H.GetUAVs()) {
|
||||
|
@ -163,8 +163,8 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, bool HasDebugInfo) {
|
|||
InitResource(C.get(), b.get());
|
||||
if (HasDebugInfo)
|
||||
LLVMUsed.emplace_back(cast<GlobalVariable>(b->GetGlobalSymbol()));
|
||||
else
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
M.AddUAV(std::move(b));
|
||||
}
|
||||
for (auto && C : H.GetSRVs()) {
|
||||
|
@ -172,8 +172,8 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, bool HasDebugInfo) {
|
|||
InitResource(C.get(), b.get());
|
||||
if (HasDebugInfo)
|
||||
LLVMUsed.emplace_back(cast<GlobalVariable>(b->GetGlobalSymbol()));
|
||||
else
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
M.AddSRV(std::move(b));
|
||||
}
|
||||
for (auto && C : H.GetSamplers()) {
|
||||
|
@ -182,8 +182,8 @@ void InitDxilModuleFromHLModule(HLModule &H, DxilModule &M, bool HasDebugInfo) {
|
|||
b->SetSamplerKind(C->GetSamplerKind());
|
||||
if (HasDebugInfo)
|
||||
LLVMUsed.emplace_back(cast<GlobalVariable>(b->GetGlobalSymbol()));
|
||||
else
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
|
||||
b->SetGlobalSymbol(UndefValue::get(b->GetGlobalSymbol()->getType()));
|
||||
M.AddSampler(std::move(b));
|
||||
}
|
||||
|
||||
|
|
|
@ -548,15 +548,7 @@ void DxilMDHelper::EmitDxilTypeSystem(DxilTypeSystem &TypeSystem, vector<GlobalV
|
|||
// Emit struct type field annotations.
|
||||
Metadata *pMD = EmitDxilStructAnnotation(*pA);
|
||||
|
||||
// Declare a global dummy variable.
|
||||
string GVName = string(kDxilTypeSystemHelperVariablePrefix) + std::to_string(GVIdx);
|
||||
GlobalVariable *pGV = new GlobalVariable(*m_pModule, pStructType, true, GlobalValue::ExternalLinkage,
|
||||
nullptr, GVName, nullptr,
|
||||
GlobalVariable::NotThreadLocal, DXIL::kDeviceMemoryAddrSpace);
|
||||
// Mark GV as being used for LLVM.
|
||||
LLVMUsed.emplace_back(pGV);
|
||||
|
||||
MDVals.push_back(ValueAsMetadata::get(pGV));
|
||||
MDVals.push_back(ValueAsMetadata::get(UndefValue::get(pStructType)));
|
||||
MDVals.push_back(pMD);
|
||||
}
|
||||
|
||||
|
@ -597,11 +589,11 @@ void DxilMDHelper::LoadDxilTypeSystemNode(const llvm::MDTuple &MDT,
|
|||
IFTBOOL((MDT.getNumOperands() & 0x1) == 1, DXC_E_INCORRECT_DXIL_METADATA);
|
||||
|
||||
for (unsigned i = 1; i < MDT.getNumOperands(); i += 2) {
|
||||
GlobalVariable *pGV =
|
||||
dyn_cast<GlobalVariable>(ValueMDToValue(MDT.getOperand(i)));
|
||||
Constant *pGV =
|
||||
dyn_cast<Constant>(ValueMDToValue(MDT.getOperand(i)));
|
||||
IFTBOOL(pGV != nullptr, DXC_E_INCORRECT_DXIL_METADATA);
|
||||
StructType *pGVType =
|
||||
dyn_cast<StructType>(pGV->getType()->getPointerElementType());
|
||||
dyn_cast<StructType>(pGV->getType());
|
||||
IFTBOOL(pGVType != nullptr, DXC_E_INCORRECT_DXIL_METADATA);
|
||||
|
||||
DxilStructAnnotation *pSA = TypeSystem.AddStructAnnotation(pGVType);
|
||||
|
|
|
@ -573,7 +573,8 @@ static DxilSignatureElement *ValidateSignatureAccess(Instruction *I, DxilSignatu
|
|||
if (isOutput && SE.GetSemantic()->GetKind() == DXIL::SemanticKind::Position) {
|
||||
unsigned mask = ValCtx.OutputPositionMask[SE.GetOutputStream()];
|
||||
mask |= 1<<col;
|
||||
ValCtx.OutputPositionMask[SE.GetOutputStream()] = mask;
|
||||
if (SE.GetOutputStream() < DXIL::kNumOutputStreams)
|
||||
ValCtx.OutputPositionMask[SE.GetOutputStream()] = mask;
|
||||
}
|
||||
return &SE;
|
||||
}
|
||||
|
@ -924,6 +925,7 @@ static void ValidateGather(CallInst *CI, Value *srvHandle, Value *samplerHandle,
|
|||
|
||||
if (resClass != DXIL::ResourceClass::SRV) {
|
||||
ValCtx.EmitInstrError(CI, ValidationRule::InstrResourceClassForSamplerGather);
|
||||
return;
|
||||
}
|
||||
|
||||
// Coord match resource kind.
|
||||
|
@ -1317,6 +1319,7 @@ static void ValidateDxilOperationCallInProfile(CallInst *CI,
|
|||
if (resClass != DXIL::ResourceClass::SRV) {
|
||||
ValCtx.EmitInstrError(CI,
|
||||
ValidationRule::InstrResourceClassForSamplerGather);
|
||||
return;
|
||||
}
|
||||
// Coord match resource.
|
||||
ValidateCalcLODResourceDimensionCoord(
|
||||
|
|
|
@ -344,8 +344,8 @@ void Scalarizer::transferMetadata(Instruction *Op, const ValueVector &CV) {
|
|||
// HLSL Change Begins
|
||||
// Transfer FPMath flag.
|
||||
if (FPMathOperator *FPMath = dyn_cast<FPMathOperator>(New)) {
|
||||
FPMathOperator *FPMathOp = dyn_cast<FPMathOperator>(Op);
|
||||
New->copyFastMathFlags(FPMathOp->getFastMathFlags());
|
||||
if (FPMathOperator *FPMathOp = dyn_cast<FPMathOperator>(Op))
|
||||
New->copyFastMathFlags(FPMathOp->getFastMathFlags());
|
||||
}
|
||||
// HLSL Change Ends
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
|
||||
|
||||
// note: define GENLL in order to generate the basis for InnerCoverage.ll
|
||||
|
||||
// CHECK: error: Parameter with semantic SV_InnerCoverage has overlapping semantic index at 0
|
||||
// CHECK: error: Pixel shader inputs SV_Coverage and SV_InnerCoverage are mutually exclusive
|
||||
|
||||
void main(snorm float b : B, uint c:C,
|
||||
in uint inner : InnerCoverage,
|
||||
inout uint cover: SV_Coverage)
|
||||
{
|
||||
#ifndef GENLL
|
||||
cover = cover & c;
|
||||
#else
|
||||
cover = cover & inner;
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
|
||||
|
||||
// CHECK: @main
|
||||
|
||||
float main(snorm float b : B, float c:C) : SV_DEPTH
|
||||
{
|
||||
return b;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
|
||||
|
||||
// CHECK: @main
|
||||
|
||||
float a;
|
||||
float main(snorm float b : B) : SV_DEPTH
|
||||
{
|
||||
return b + a;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 -fcgl %s | FileCheck %s
|
||||
|
||||
// CHECK: main
|
||||
// After lowering, these would turn into multiple abs calls rather than a 4 x float
|
||||
// CHECK: call <4 x float> @"dx.hl.op..<4 x float> (i32, <4 x float>)"(i32 62,
|
||||
|
||||
float4 main(float4 a : A, uint4 b : A1) : SV_TARGET {
|
||||
return abs(a*b.yxxx);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
|
||||
|
||||
// CHECK: %dx.alignment.legacy.struct.S = type { i32, i32, i32, <2 x i32>, i32, i32, i32 }
|
||||
// CHECK: %"dx.alignment.legacy.$Globals" = type { float, %dx.alignment.legacy.struct.S, [1 x <4 x i32>] }
|
||||
// CHECK: %dx.alignment.legacy.struct.S = type { i32, i32, i32, <2 x i32>, i32, i32, i32 }
|
||||
|
||||
RasterizerOrderedBuffer<float4> r;
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
|
||||
|
||||
// CHECK: !"llvm.loop.unroll.disable"
|
||||
uint u;
|
||||
float main(float2 a : A, int3 b : B) : SV_Target
|
||||
{
|
||||
float s = 0;
|
||||
/*
|
||||
[loop]
|
||||
for(int i = 0; i < b.x; i++) {
|
||||
s += a.x;
|
||||
if (s == 5)
|
||||
break;
|
||||
}
|
||||
*/
|
||||
if (s > a)
|
||||
s -= u+b.x;
|
||||
else
|
||||
s += b.x+b.y;
|
||||
|
||||
return s;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 -fcgl %s | FileCheck %s
|
||||
|
||||
// CHECK: main
|
||||
// After lowering, these would turn into multiple abs calls rather than a 4 x float
|
||||
// CHECK: call <4 x float> @"dx.hl.op..<4 x float> (i32, <4 x float>)"(i32 62,
|
||||
|
||||
float4 main(float4 a : A, float4 b : A1) : SV_TARGET {
|
||||
return abs(a*b.yxxx);
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
// RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
|
||||
|
||||
// CHECK: RWStructuredBuffers may increment or decrement their counters, but not both.
|
||||
|
||||
struct Foo
|
||||
{
|
||||
float2 a;
|
||||
float3 b;
|
||||
int2 c[4];
|
||||
};
|
||||
|
||||
Buffer<float4> buf1;
|
||||
RWStructuredBuffer<Foo> buf2;
|
||||
|
||||
float4 main(float idx1 : Idx1, float idx2 : Idx2) : SV_Target
|
||||
{
|
||||
uint status;
|
||||
float4 r = 0;
|
||||
int id = buf2.IncrementCounter();
|
||||
buf2[id].a = float2(idx1, idx2);
|
||||
|
||||
id = buf2.IncrementCounter();
|
||||
r.xy += buf1[id].a;
|
||||
|
||||
return r;
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: DXIL intrinsic overload must be valid
|
||||
; Change dx.op.loadInput.i32(i32 4 to dx.op.loadInput.i32(i32 3
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
|
|
|
@ -1,94 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Interpolation mode on A used with eval_* instruction must be linear, linear_centroid, linear_noperspective, linear_noperspective_centroid, linear_sample or linear_noperspective_sample
|
||||
; CHECK: Interpolation mode on A used with eval_* instruction must be linear, linear_centroid, linear_noperspective, linear_noperspective_centroid, linear_sample or linear_noperspective_sample
|
||||
; CHECK: Interpolation mode on A used with eval_* instruction must be linear, linear_centroid, linear_noperspective, linear_noperspective_centroid, linear_sample or linear_noperspective_sample
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%RenderTargetGetSampleCount = tail call i32 @dx.op.renderTargetGetSampleCount(i32 79)
|
||||
%sub = add i32 %RenderTargetGetSampleCount, -1
|
||||
%5 = tail call float @dx.op.evalCentroid.f32(i32 91, i32 0, i32 0, i8 0)
|
||||
%6 = tail call float @dx.op.evalCentroid.f32(i32 91, i32 0, i32 0, i8 1)
|
||||
%7 = tail call float @dx.op.evalCentroid.f32(i32 91, i32 0, i32 0, i8 2)
|
||||
%8 = tail call float @dx.op.evalCentroid.f32(i32 91, i32 0, i32 0, i8 3)
|
||||
%9 = tail call float @dx.op.evalSampleIndex.f32(i32 90, i32 0, i32 0, i8 0, i32 %sub)
|
||||
%10 = tail call float @dx.op.evalSampleIndex.f32(i32 90, i32 0, i32 0, i8 1, i32 %sub)
|
||||
%11 = tail call float @dx.op.evalSampleIndex.f32(i32 90, i32 0, i32 0, i8 2, i32 %sub)
|
||||
%12 = tail call float @dx.op.evalSampleIndex.f32(i32 90, i32 0, i32 0, i8 3, i32 %sub)
|
||||
%add.i0 = fadd fast float %9, %5
|
||||
%add.i1 = fadd fast float %10, %6
|
||||
%add.i2 = fadd fast float %11, %7
|
||||
%add.i3 = fadd fast float %12, %8
|
||||
%13 = tail call float @dx.op.evalSnapped.f32(i32 89, i32 0, i32 0, i8 0, i32 1, i32 2)
|
||||
%14 = tail call float @dx.op.evalSnapped.f32(i32 89, i32 0, i32 0, i8 1, i32 1, i32 2)
|
||||
%15 = tail call float @dx.op.evalSnapped.f32(i32 89, i32 0, i32 0, i8 2, i32 1, i32 2)
|
||||
%16 = tail call float @dx.op.evalSnapped.f32(i32 89, i32 0, i32 0, i8 3, i32 1, i32 2)
|
||||
%add5.i0 = fadd fast float %add.i0, %13
|
||||
%add5.i1 = fadd fast float %add.i1, %14
|
||||
%add5.i2 = fadd fast float %add.i2, %15
|
||||
%add5.i3 = fadd fast float %add.i3, %16
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %add5.i0)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %add5.i1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %add5.i2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %add5.i3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.evalSampleIndex.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare i32 @dx.op.renderTargetGetSampleCount(i32) #2
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.evalCentroid.f32(i32, i32, i32, i8) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.evalSnapped.f32(i32, i32, i32, i8, i32, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!18}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !10, !12, !14, !16}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 0, !11, !9}
|
||||
!11 = !{i32 4, !"B", i32 5, i32 4, i32 7, i32 9}
|
||||
!12 = !{i32 0, !13, !9}
|
||||
!13 = !{i32 4, !"C", i32 5, i32 3, i32 7, i32 9}
|
||||
!14 = !{i32 0, !15, !9}
|
||||
!15 = !{i32 4, !"D", i32 5, i32 6, i32 7, i32 9}
|
||||
!16 = !{i32 1, !17, !9}
|
||||
!17 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!18 = !{void (<4 x float>, <4 x float>, <4 x float>, <4 x float>, <4 x float>*)* @main.flat, !"", !19, null, null}
|
||||
!19 = !{!20, !25, null}
|
||||
!20 = !{!21, !22, !23, !24}
|
||||
!21 = !{i32 0, !"A", i8 9, i8 0, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!22 = !{i32 1, !"B", i8 9, i8 0, !9, i8 4, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!23 = !{i32 2, !"C", i8 9, i8 0, !9, i8 3, i32 1, i8 4, i32 2, i8 0, null}
|
||||
!24 = !{i32 3, !"D", i8 9, i8 0, !9, i8 6, i32 1, i8 4, i32 3, i8 0, null}
|
||||
!25 = !{!26}
|
||||
!26 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
|
@ -1,136 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: GetDimensions used undef dimension z on TextureCube
|
||||
; CHECK: coord uninitialized
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; UV 0 xy 0 NONE float
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
;
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Pixel Shader
|
||||
; DepthOutput=0
|
||||
; SampleFrequency=0
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; UV 0 linear
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_Target 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; g_sam sampler NA NA S0 s0 1
|
||||
; cube texture f32 cube T0 t0 1
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.TextureCube = type { <4 x float> }
|
||||
%struct.SamplerState = type { i32 }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.Dimensions = type { i32, i32, i32, i32 }
|
||||
|
||||
@"\01?cube@@3V?$TextureCube@V?$vector@M$03@@@@A" = available_externally global %class.TextureCube zeroinitializer, align 4
|
||||
@"\01?g_sam@@3USamplerState@@A" = available_externally global %struct.SamplerState zeroinitializer, align 4
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.TextureCube
|
||||
@llvm.used = appending global [5 x i8*] [i8* bitcast (%class.TextureCube* @"\01?cube@@3V?$TextureCube@V?$vector@M$03@@@@A" to i8*), i8* bitcast (%struct.SamplerState* @"\01?g_sam@@3USamplerState@@A" to i8*), i8* bitcast (%class.TextureCube* @"\01?cube@@3V?$TextureCube@V?$vector@M$03@@@@A" to i8*), i8* bitcast (%struct.SamplerState* @"\01?g_sam@@3USamplerState@@A" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.TextureCube addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<2 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%cube_texture_cube = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%g_sam_sampler = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%2 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%3 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%4 = call %dx.types.Dimensions @dx.op.getDimensions(i32 74, %dx.types.Handle %cube_texture_cube, i32 0) ; GetDimensions(handle,mipLevel)
|
||||
%5 = extractvalue %dx.types.Dimensions %4, 0
|
||||
%6 = extractvalue %dx.types.Dimensions %4, 2
|
||||
%7 = call float @dx.op.calculateLOD.f32(i32 83, %dx.types.Handle %cube_texture_cube, %dx.types.Handle %g_sam_sampler, float %2, float %3, float undef, i1 true) ; CalculateLOD(handle,sampler,coord0,coord1,coord2,clamped)
|
||||
%conv = uitofp i32 %5 to float
|
||||
%conv1 = uitofp i32 %6 to float
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %conv) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %conv1) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %7) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.Dimensions @dx.op.getDimensions(i32, %dx.types.Handle, i32) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare float @dx.op.calculateLOD.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, i1) #2
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!9, !12}
|
||||
!dx.entryPoints = !{!21}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{!4, null, null, !7}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %class.TextureCube* @"\01?cube@@3V?$TextureCube@V?$vector@M$03@@@@A", !"cube", i32 0, i32 0, i32 1, i32 5, i32 0, !6}
|
||||
!6 = !{i32 0, i32 9}
|
||||
!7 = !{!8}
|
||||
!8 = !{i32 0, %struct.SamplerState* @"\01?g_sam@@3USamplerState@@A", !"g_sam", i32 0, i32 0, i32 1, i32 0, null}
|
||||
!9 = !{i32 0, %class.TextureCube addrspace(1)* @dx.typevar.0, !10}
|
||||
!10 = !{i32 16, !11}
|
||||
!11 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!12 = !{i32 1, void (<2 x float>, <4 x float>*)* @main.flat, !13}
|
||||
!13 = !{!14, !16, !19}
|
||||
!14 = !{i32 0, !15, !15}
|
||||
!15 = !{}
|
||||
!16 = !{i32 0, !17, !18}
|
||||
!17 = !{i32 4, !"UV", i32 7, i32 9}
|
||||
!18 = !{i32 0}
|
||||
!19 = !{i32 1, !20, !18}
|
||||
!20 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!21 = !{void (<2 x float>, <4 x float>*)* @main.flat, !"", !22, !3, null}
|
||||
!22 = !{!23, !25, null}
|
||||
!23 = !{!24}
|
||||
!24 = !{i32 0, !"UV", i8 9, i8 0, !18, i8 2, i32 1, i8 2, i32 0, i8 0, null}
|
||||
!25 = !{!26}
|
||||
!26 = !{i32 0, !"SV_Target", i8 9, i8 16, !18, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: InnerCoverage and Coverage are mutually exclusive.
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: alwaysinline nounwind
|
||||
define void @main(float %b, i32 %c, i32* nocapture readnone dereferenceable(4) %cover) #0 {
|
||||
entry:
|
||||
%0 = call i32 @dx.op.coverage.i32(i32 93) ; Coverage()
|
||||
%1 = call i32 @dx.op.innercoverage.i32(i32 94) ; InnerCoverage()
|
||||
%and = and i32 %1, %0
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 %and) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.coverage.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.innercoverage.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #2
|
||||
|
||||
attributes #0 = { alwaysinline nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="0" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.valver = !{!1}
|
||||
!dx.version = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.typeAnnotations = !{!4}
|
||||
!dx.entryPoints = !{!15}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 0}
|
||||
!3 = !{!"ps", i32 6, i32 0}
|
||||
!4 = !{i32 1, void (float, i32, i32*)* @main, !5}
|
||||
!5 = !{!6, !8, !11, !13}
|
||||
!6 = !{i32 1, !7, !7}
|
||||
!7 = !{}
|
||||
!8 = !{i32 0, !9, !10}
|
||||
!9 = !{i32 4, !"B", i32 7, i32 13}
|
||||
!10 = !{i32 0}
|
||||
!11 = !{i32 0, !12, !10}
|
||||
!12 = !{i32 4, !"C", i32 7, i32 5}
|
||||
!13 = !{i32 2, !14, !10}
|
||||
!14 = !{i32 4, !"SV_Coverage", i32 7, i32 5}
|
||||
!15 = !{void (float, i32, i32*)* @main, !"main", !16, null, null}
|
||||
!16 = !{!17, !20, null}
|
||||
!17 = !{!18, !19}
|
||||
!18 = !{i32 0, !"B", i8 13, i8 0, !10, i8 1, i32 1, i8 1, i32 0, i8 0, null}
|
||||
!19 = !{i32 1, !"C", i8 5, i8 0, !10, i8 1, i32 1, i8 1, i32 0, i8 1, null}
|
||||
!20 = !{!21}
|
||||
!21 = !{i32 0, !"SV_Coverage", i8 5, i8 14, !10, i8 0, i32 1, i8 1, i32 -1, i8 -1, null}
|
|
@ -1,58 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Invalid interpolation mode for 'C'
|
||||
; CHECK: SV_Depth must be float
|
||||
; CHECK: External function 'dxil.op.loadInput.f32' is not a DXIL function
|
||||
; CHECK: External function 'dx.op.loadInput.f32' is unused
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(float, float, i32* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = call float @dxil.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%conv = fptosi float %3 to i32
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 0, i32 0, i8 0, i32 %conv)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dxil.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!14}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (float, float, i32*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !10, !12}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"B", i32 7, i32 13}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 0, !11, !9}
|
||||
!11 = !{i32 4, !"C", i32 7, i32 9}
|
||||
!12 = !{i32 1, !13, !9}
|
||||
!13 = !{i32 4, !"SV_DEPTH", i32 7, i32 4}
|
||||
!14 = !{void (float, float, i32*)* @main.flat, !"", !15, null, null}
|
||||
!15 = !{!16, !19, null}
|
||||
!16 = !{!17, !18}
|
||||
!17 = !{i32 0, !"B", i8 13, i8 0, !9, i8 1, i32 1, i8 1, i32 0, i8 0, null}
|
||||
!18 = !{i32 1, !"C", i8 9, i8 0, !9, i8 8, i32 1, i8 1, i32 1, i8 0, null}
|
||||
!19 = !{!20}
|
||||
!20 = !{i32 0, !"SV_Depth", i8 4, i8 17, !9, i8 0, i32 1, i8 1, i32 -1, i8 -1, null}
|
|
@ -1,306 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
;
|
||||
; Note: shader requires additional functionality:
|
||||
; SV_RenderTargetArrayIndex or SV_ViewportArrayIndex from any shader feeding rasterizer
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; POSSIZE 0 xyz 0 NONE float
|
||||
; COLOR 0 xyzw 1 NONE float
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; TEXCOORD 0 xy 0 NONE float xyzw
|
||||
; COLOR 0 xyzw 1 NONE float xyzw
|
||||
; SV_Position 0 xyzw 2 POS float xyzw
|
||||
; TEXCOORD 0 xy 3 NONE float xyzw
|
||||
; COLOR 0 xyzw 4 NONE float xyzw
|
||||
; SV_Position 0 xyzw 5 POS float xyzw
|
||||
; SV_ViewportArrayIndex 0 x 6 VPINDEX uint xyzw
|
||||
;
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Geometry Shader
|
||||
; InputPrimitive=point
|
||||
; OutputTopology=point
|
||||
; OutputStreamMask=3
|
||||
; OutputPositionPresent=1
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; POSSIZE 0 linear
|
||||
; COLOR 0 linear
|
||||
; SV_GSInstanceID 0 nointerpolation
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; TEXCOORD 0 linear
|
||||
; COLOR 0 linear
|
||||
; SV_Position 0 noperspective
|
||||
; TEXCOORD 0 linear
|
||||
; COLOR 0 linear
|
||||
; SV_Position 0 noperspective
|
||||
; SV_ViewportArrayIndex 0 nointerpolation
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
; cbuffer b
|
||||
; {
|
||||
;
|
||||
; struct b
|
||||
; {
|
||||
;
|
||||
; float2 invViewportSize; ; Offset: 0
|
||||
;
|
||||
; } b ; Offset: 0 Size: 8
|
||||
;
|
||||
; }
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; b cbuffer NA NA CB0 cb0 1
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%b = type { <2 x float> }
|
||||
%struct.VSOutGSIn = type { <3 x float>, <4 x float> }
|
||||
%class.PointStream = type { %struct.VSOut }
|
||||
%struct.VSOut = type { <2 x float>, <4 x float>, <4 x float> }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
|
||||
@b = external constant %b
|
||||
@dx.typevar.0 = external addrspace(1) constant %struct.VSOutGSIn
|
||||
@dx.typevar.1 = external addrspace(1) constant %class.PointStream
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.VSOut
|
||||
@dx.typevar.3 = external addrspace(1) constant %b
|
||||
@llvm.used = appending global [5 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSOutGSIn addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.PointStream addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSOut addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%b addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* bitcast (%b* @b to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @"\01?main@@YAXY00UVSOutGSIn@@V?$PointStream@UVSOut@@@@1IAAI@Z.flat"([1 x <3 x float>]* nocapture readnone, [1 x <4 x float>]* nocapture readnone, %class.PointStream* nocapture readnone, <2 x float>* nocapture readnone, <4 x float>* nocapture readnone, <4 x float>* nocapture readnone, %class.PointStream* nocapture readnone, <2 x float>* nocapture readnone, <4 x float>* nocapture readnone, <4 x float>* nocapture readnone, i32, i32* nocapture readnone) #0 {
|
||||
entry:
|
||||
%12 = tail call i32 @dx.op.gsInstanceID.i32(i32 138) ; GSInstanceID()
|
||||
%verts.0 = alloca [3 x float], align 4
|
||||
%verts.1 = alloca [3 x float], align 4
|
||||
%13 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 0
|
||||
%14 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 0
|
||||
store float -5.000000e-01, float* %13, align 4
|
||||
store float -5.000000e-01, float* %14, align 4
|
||||
%15 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 1
|
||||
%16 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 1
|
||||
store float 1.500000e+00, float* %15, align 4
|
||||
store float -5.000000e-01, float* %16, align 4
|
||||
%17 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 2
|
||||
%18 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 2
|
||||
store float -5.000000e-01, float* %17, align 4
|
||||
store float 1.500000e+00, float* %18, align 4
|
||||
%19 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%20 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%21 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%22 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%23 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%24 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 2, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%25 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 3, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%rem = urem i32 %12, 3
|
||||
%26 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 %rem
|
||||
%27 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 %rem
|
||||
%load30 = load float, float* %26, align 4
|
||||
%load32 = load float, float* %27, align 4
|
||||
%mul.i0 = fmul fast float %load30, %19
|
||||
%mul.i1 = fmul fast float %load32, %19
|
||||
%add.i0 = fadd fast float %mul.i0, %20
|
||||
%add.i1 = fadd fast float %mul.i1, %21
|
||||
%28 = tail call %dx.types.Handle @dx.op.createHandle(i32 58, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%29 = tail call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %28, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%30 = extractvalue %dx.types.CBufRet.f32 %29, 0
|
||||
%31 = extractvalue %dx.types.CBufRet.f32 %29, 1
|
||||
%mul.i.i0 = fmul fast float %30, 2.000000e+00
|
||||
%mul.i.i1 = fmul fast float %31, 2.000000e+00
|
||||
%mul1.i.i0 = fmul fast float %mul.i.i0, %add.i0
|
||||
%mul1.i.i1 = fmul fast float %mul.i.i1, %add.i1
|
||||
%sub.i = fadd fast float %mul1.i.i0, -1.000000e+00
|
||||
%sub2.i = fsub fast float 1.000000e+00, %mul1.i.i1
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 0.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 0.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %22) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %23) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %24) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %25) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %sub.i) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %sub2.i) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float 5.000000e-01) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.emitStream(i32 97, i8 0) ; EmitStream(streamId)
|
||||
%add10 = add nuw nsw i32 %rem, 1
|
||||
%32 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 %add10
|
||||
%33 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 %add10
|
||||
%load26 = load float, float* %32, align 4
|
||||
%load28 = load float, float* %33, align 4
|
||||
%mul14.i0 = fmul fast float %load26, %19
|
||||
%mul14.i1 = fmul fast float %load28, %19
|
||||
%add15.i0 = fadd fast float %mul14.i0, %20
|
||||
%add15.i1 = fadd fast float %mul14.i1, %21
|
||||
%mul1.i.31.i0 = fmul fast float %add15.i0, %mul.i.i0
|
||||
%mul1.i.31.i1 = fmul fast float %add15.i1, %mul.i.i1
|
||||
%sub.i.32 = fadd fast float %mul1.i.31.i0, -1.000000e+00
|
||||
%sub2.i.33 = fsub fast float 1.000000e+00, %mul1.i.31.i1
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 2.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 0.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %22) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %23) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %24) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %25) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %sub.i.32) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %sub2.i.33) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float 5.000000e-01) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.emitStream(i32 97, i8 0) ; EmitStream(streamId)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 0, float 2.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 1, float 0.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 4, i32 0, i8 0, float %22) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 4, i32 0, i8 1, float %23) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 4, i32 0, i8 2, float %24) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 4, i32 0, i8 3, float %25) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 0, float %sub.i.32) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 1, float %sub2.i.33) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 2, float 5.000000e-01) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.emitStream(i32 97, i8 1) ; EmitStream(streamId)
|
||||
%add21 = add nuw nsw i32 %rem, 2
|
||||
%34 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 %add21
|
||||
%35 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 %add21
|
||||
%load23 = load float, float* %34, align 4
|
||||
%load24 = load float, float* %35, align 4
|
||||
%mul25.i0 = fmul fast float %load23, %19
|
||||
%mul25.i1 = fmul fast float %load24, %19
|
||||
%add26.i0 = fadd fast float %mul25.i0, %20
|
||||
%add26.i1 = fadd fast float %mul25.i1, %21
|
||||
%mul1.i.36.i0 = fmul fast float %add26.i0, %mul.i.i0
|
||||
%mul1.i.36.i1 = fmul fast float %add26.i1, %mul.i.i1
|
||||
%sub.i.37 = fadd fast float %mul1.i.36.i0, -1.000000e+00
|
||||
%sub2.i.38 = fsub fast float 1.000000e+00, %mul1.i.36.i1
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 0.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 2.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %22) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %23) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %24) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %25) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %sub.i.37) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %sub2.i.38) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float 5.000000e-01) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.emitStream(i32 97, i8 0) ; EmitStream(streamId)
|
||||
tail call void @dx.op.storeOutput.i32(i32 5, i32 6, i32 0, i8 0, i32 2) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
tail call void @dx.op.cutStream(i32 98, i8 0) ; CutStream(streamId)
|
||||
tail call void @dx.op.cutStream(i32 98, i8 1) ; CutStream(streamId)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.gsInstanceID.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.cutStream(i32, i8) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.emitStream(i32, i8) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !17}
|
||||
!dx.entryPoints = !{!40}
|
||||
|
||||
!0 = !{!"clang version 3.7.0 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 0, i32 4}
|
||||
!2 = !{!"gs", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %b* @b, !"b", i32 0, i32 0, i32 1, i32 8, null}
|
||||
!6 = !{i32 0, %struct.VSOutGSIn addrspace(1)* @dx.typevar.0, !7, %class.PointStream addrspace(1)* @dx.typevar.1, !10, %struct.VSOut addrspace(1)* @dx.typevar.2, !12, %b addrspace(1)* @dx.typevar.3, !15}
|
||||
!7 = !{i32 32, !8, !9}
|
||||
!8 = !{i32 3, i32 0, i32 4, !"POSSIZE", i32 6, !"posSize", i32 7, i32 9}
|
||||
!9 = !{i32 3, i32 16, i32 4, !"COLOR", i32 6, !"clr", i32 7, i32 9}
|
||||
!10 = !{i32 48, !11}
|
||||
!11 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!12 = !{i32 48, !13, !9, !14}
|
||||
!13 = !{i32 3, i32 0, i32 4, !"TEXCOORD0", i32 6, !"uv", i32 7, i32 9}
|
||||
!14 = !{i32 3, i32 32, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!15 = !{i32 0, !16}
|
||||
!16 = !{i32 3, i32 0, i32 6, !"invViewportSize", i32 7, i32 9}
|
||||
!17 = !{i32 1, void ([1 x <3 x float>]*, [1 x <4 x float>]*, %class.PointStream*, <2 x float>*, <4 x float>*, <4 x float>*, %class.PointStream*, <2 x float>*, <4 x float>*, <4 x float>*, i32, i32*)* @"\01?main@@YAXY00UVSOutGSIn@@V?$PointStream@UVSOut@@@@1IAAI@Z.flat", !18}
|
||||
!18 = !{!19, !21, !24, !26, !27, !29, !30, !32, !33, !34, !35, !36, !38}
|
||||
!19 = !{i32 0, !20, !20}
|
||||
!20 = !{}
|
||||
!21 = !{i32 0, !22, !23}
|
||||
!22 = !{i32 4, !"POSSIZE", i32 7, i32 9}
|
||||
!23 = !{i32 0}
|
||||
!24 = !{i32 0, !25, !23}
|
||||
!25 = !{i32 4, !"COLOR", i32 7, i32 9}
|
||||
!26 = !{i32 5, !20, !20}
|
||||
!27 = !{i32 5, !28, !23}
|
||||
!28 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!29 = !{i32 5, !25, !23}
|
||||
!30 = !{i32 5, !31, !23}
|
||||
!31 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!32 = !{i32 6, !20, !20}
|
||||
!33 = !{i32 6, !28, !23}
|
||||
!34 = !{i32 6, !25, !23}
|
||||
!35 = !{i32 6, !31, !23}
|
||||
!36 = !{i32 0, !37, !23}
|
||||
!37 = !{i32 4, !"SV_GSInstanceID", i32 7, i32 5}
|
||||
!38 = !{i32 1, !39, !23}
|
||||
!39 = !{i32 4, !"SV_ViewportArrayIndex", i32 7, i32 5}
|
||||
!40 = !{void ([1 x <3 x float>]*, [1 x <4 x float>]*, %class.PointStream*, <2 x float>*, <4 x float>*, <4 x float>*, %class.PointStream*, <2 x float>*, <4 x float>*, <4 x float>*, i32, i32*)* @"\01?main@@YAXY00UVSOutGSIn@@V?$PointStream@UVSOut@@@@1IAAI@Z.flat", !"", !41, !3, !54}
|
||||
!41 = !{!42, !46, null}
|
||||
!42 = !{!43, !44, !45}
|
||||
!43 = !{i32 0, !"POSSIZE", i8 9, !23, i8 2, i32 1, i8 3, i32 0, i8 0, null}
|
||||
!44 = !{i32 1, !"COLOR", i8 9, !23, i8 2, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!45 = !{i32 2, !"SV_GSInstanceID", i8 5, !23, i8 1, i32 1, i8 1, i32 2, i8 0, null}
|
||||
!46 = !{!47, !44, !48, !49, !51, !52, !53}
|
||||
!47 = !{i32 0, !"TEXCOORD", i8 9, !23, i8 2, i32 1, i8 2, i32 0, i8 0, null}
|
||||
!48 = !{i32 2, !"SV_Position", i8 9, !23, i8 4, i32 1, i8 4, i32 2, i8 0, null}
|
||||
!49 = !{i32 3, !"TEXCOORD", i8 9, !23, i8 2, i32 1, i8 2, i32 3, i8 0, !50}
|
||||
!50 = !{i32 0, i32 1}
|
||||
!51 = !{i32 4, !"COLOR", i8 9, !23, i8 2, i32 1, i8 4, i32 4, i8 0, !50}
|
||||
!52 = !{i32 5, !"SV_Position", i8 9, !23, i8 4, i32 1, i8 4, i32 5, i8 0, !50}
|
||||
!53 = !{i32 6, !"SV_ViewportArrayIndex", i8 5, !23, i8 1, i32 1, i8 1, i32 6, i8 0, null}
|
||||
!54 = !{i32 0, i64 512, i32 1, !55}
|
||||
!55 = !{i32 1, i32 3, i32 3, i32 1, i32 24}
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: DS input control point count must be [0..32]. 36 specified
|
||||
; CHECK: Invalid Tessellator Domain specified. Must be isoline, tri or quad
|
||||
; CHECK: DomainLocation component index out of bounds for the domain.
|
||||
; CHECK: DomainLocation component index out of bounds for the domain.
|
||||
; CHECK: DomainLocation component index out of bounds for the domain.
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%struct.PSSceneIn = type { <4 x float>, <2 x float>, <3 x float> }
|
||||
%struct.HSPerVertexData = type { %struct.PSSceneIn }
|
||||
%struct.HSPerPatchData = type { [3 x float], float }
|
||||
%class.OutputPatch = type { [3 x %struct.HSPerVertexData] }
|
||||
|
||||
@dx.typevar.0 = external addrspace(1) constant %struct.PSSceneIn
|
||||
@dx.typevar.1 = external addrspace(1) constant %struct.HSPerVertexData
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.HSPerPatchData
|
||||
@dx.typevar.3 = external addrspace(1) constant %class.OutputPatch
|
||||
@llvm.used = appending global [4 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerVertexData addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerPatchData addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.OutputPatch addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.PSSceneIn addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<3 x float>, [3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, [3 x float]* nocapture readnone, float* nocapture readnone, <4 x float>* nocapture readnone, <2 x float>* nocapture readnone, <3 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%9 = tail call float @dx.op.domainLocation.f32(i32 107, i8 0)
|
||||
%10 = tail call float @dx.op.domainLocation.f32(i32 107, i8 1)
|
||||
%11 = tail call float @dx.op.domainLocation.f32(i32 107, i8 2)
|
||||
%12 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 0)
|
||||
%13 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 0)
|
||||
%14 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 0)
|
||||
%15 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 0)
|
||||
%mul.i0 = fmul fast float %12, %9
|
||||
%mul.i1 = fmul fast float %13, %9
|
||||
%mul.i2 = fmul fast float %14, %9
|
||||
%mul.i3 = fmul fast float %15, %9
|
||||
%16 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 1)
|
||||
%17 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 1)
|
||||
%18 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 1)
|
||||
%19 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 1)
|
||||
%mul5.i0 = fmul fast float %16, %10
|
||||
%mul5.i1 = fmul fast float %17, %10
|
||||
%mul5.i2 = fmul fast float %18, %10
|
||||
%mul5.i3 = fmul fast float %19, %10
|
||||
%add.i0 = fadd fast float %mul5.i0, %mul.i0
|
||||
%add.i1 = fadd fast float %mul5.i1, %mul.i1
|
||||
%add.i2 = fadd fast float %mul5.i2, %mul.i2
|
||||
%add.i3 = fadd fast float %mul5.i3, %mul.i3
|
||||
%20 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 2)
|
||||
%21 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 2)
|
||||
%22 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 2)
|
||||
%23 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 2)
|
||||
%mul10.i0 = fmul fast float %20, %11
|
||||
%mul10.i1 = fmul fast float %21, %11
|
||||
%mul10.i2 = fmul fast float %22, %11
|
||||
%mul10.i3 = fmul fast float %23, %11
|
||||
%add11.i0 = fadd fast float %add.i0, %mul10.i0
|
||||
%add11.i1 = fadd fast float %add.i1, %mul10.i1
|
||||
%add11.i2 = fadd fast float %add.i2, %mul10.i2
|
||||
%add11.i3 = fadd fast float %add.i3, %mul10.i3
|
||||
%24 = tail call float @dx.op.loadPatchConstant.f32(i32 106, i32 0, i32 1, i8 0)
|
||||
%add14.i0 = fadd fast float %add11.i0, %24
|
||||
%add14.i1 = fadd fast float %add11.i1, %24
|
||||
%add14.i2 = fadd fast float %add11.i2, %24
|
||||
%add14.i3 = fadd fast float %add11.i3, %24
|
||||
%25 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 0)
|
||||
%26 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 0)
|
||||
%mul19.i0 = fmul fast float %25, %9
|
||||
%mul19.i1 = fmul fast float %26, %9
|
||||
%27 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 1)
|
||||
%28 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 1)
|
||||
%mul24.i0 = fmul fast float %27, %10
|
||||
%mul24.i1 = fmul fast float %28, %10
|
||||
%add25.i0 = fadd fast float %mul24.i0, %mul19.i0
|
||||
%add25.i1 = fadd fast float %mul24.i1, %mul19.i1
|
||||
%29 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 2)
|
||||
%30 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 2)
|
||||
%mul30.i0 = fmul fast float %29, %11
|
||||
%mul30.i1 = fmul fast float %30, %11
|
||||
%add31.i0 = fadd fast float %add25.i0, %mul30.i0
|
||||
%add31.i1 = fadd fast float %add25.i1, %mul30.i1
|
||||
%31 = tail call float @dx.op.loadPatchConstant.f32(i32 106, i32 0, i32 0, i8 0)
|
||||
%add36.i0 = fadd fast float %add31.i0, %31
|
||||
%add36.i1 = fadd fast float %add31.i1, %31
|
||||
%32 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 0)
|
||||
%33 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 0)
|
||||
%34 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 0)
|
||||
%mul41.i0 = fmul fast float %32, %9
|
||||
%mul41.i1 = fmul fast float %33, %9
|
||||
%mul41.i2 = fmul fast float %34, %9
|
||||
%35 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 1)
|
||||
%36 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 1)
|
||||
%37 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 1)
|
||||
%mul46.i0 = fmul fast float %35, %10
|
||||
%mul46.i1 = fmul fast float %36, %10
|
||||
%mul46.i2 = fmul fast float %37, %10
|
||||
%add47.i0 = fadd fast float %mul46.i0, %mul41.i0
|
||||
%add47.i1 = fadd fast float %mul46.i1, %mul41.i1
|
||||
%add47.i2 = fadd fast float %mul46.i2, %mul41.i2
|
||||
%38 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 2)
|
||||
%39 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 2)
|
||||
%40 = tail call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 2)
|
||||
%mul52.i0 = fmul fast float %38, %11
|
||||
%mul52.i1 = fmul fast float %39, %11
|
||||
%mul52.i2 = fmul fast float %40, %11
|
||||
%add53.i0 = fadd fast float %add47.i0, %mul52.i0
|
||||
%add53.i1 = fadd fast float %add47.i1, %mul52.i1
|
||||
%add53.i2 = fadd fast float %add47.i2, %mul52.i2
|
||||
%41 = tail call float @dx.op.loadPatchConstant.f32(i32 106, i32 1, i32 0, i8 0)
|
||||
%add56.i0 = fadd fast float %add53.i0, %41
|
||||
%add56.i1 = fadd fast float %add53.i1, %41
|
||||
%add56.i2 = fadd fast float %add53.i2, %41
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %add14.i0)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %add14.i1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %add14.i2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %add14.i3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %add36.i0)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %add36.i1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %add56.i0)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %add56.i1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float %add56.i2)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.domainLocation.f32(i32, i8) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadPatchConstant.f32(i32, i32, i32, i8) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3, !15}
|
||||
!dx.entryPoints = !{!36}
|
||||
|
||||
!0 = !{!"my awesome compiler"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ds", i32 6, i32 0}
|
||||
!3 = !{i32 0, %struct.PSSceneIn addrspace(1)* @dx.typevar.0, !4, %struct.HSPerVertexData addrspace(1)* @dx.typevar.1, !8, %struct.HSPerPatchData addrspace(1)* @dx.typevar.2, !10, %class.OutputPatch addrspace(1)* @dx.typevar.3, !13}
|
||||
!4 = !{i32 44, !5, !6, !7}
|
||||
!5 = !{i32 3, i32 0, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!6 = !{i32 3, i32 16, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!7 = !{i32 3, i32 32, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!8 = !{i32 44, !9}
|
||||
!9 = !{i32 3, i32 0, i32 6, !"v"}
|
||||
!10 = !{i32 40, !11, !12}
|
||||
!11 = !{i32 3, i32 0, i32 4, !"SV_TessFactor", i32 6, !"edges", i32 7, i32 9}
|
||||
!12 = !{i32 3, i32 36, i32 4, !"SV_InsideTessFactor", i32 6, !"inside", i32 7, i32 9}
|
||||
!13 = !{i32 140, !14}
|
||||
!14 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!15 = !{i32 1, void (<3 x float>, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !16}
|
||||
!16 = !{!17, !19, !22, !24, !26, !28, !31, !33, !34, !35}
|
||||
!17 = !{i32 0, !18, !18}
|
||||
!18 = !{}
|
||||
!19 = !{i32 0, !20, !21}
|
||||
!20 = !{i32 4, !"SV_DomainLocation", i32 7, i32 9}
|
||||
!21 = !{i32 0}
|
||||
!22 = !{i32 4, !23, !21}
|
||||
!23 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!24 = !{i32 4, !25, !21}
|
||||
!25 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!26 = !{i32 4, !27, !21}
|
||||
!27 = !{i32 4, !"NORMAL", i32 7, i32 9}
|
||||
!28 = !{i32 0, !29, !30}
|
||||
!29 = !{i32 4, !"SV_TessFactor", i32 7, i32 9}
|
||||
!30 = !{i32 0, i32 1, i32 2}
|
||||
!31 = !{i32 0, !32, !21}
|
||||
!32 = !{i32 4, !"SV_InsideTessFactor", i32 7, i32 9}
|
||||
!33 = !{i32 1, !23, !21}
|
||||
!34 = !{i32 1, !25, !21}
|
||||
!35 = !{i32 1, !27, !21}
|
||||
!36 = !{void (<3 x float>, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !"", !37, null, !46}
|
||||
!37 = !{!38, !38, !42}
|
||||
!38 = !{!39, !40, !41}
|
||||
!39 = !{i32 0, !"SV_Position", i8 9, i8 3, !21, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!40 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !21, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!41 = !{i32 2, !"NORMAL", i8 9, i8 0, !21, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!42 = !{!44, !45}
|
||||
!44 = !{i32 0, !"SV_TessFactor", i8 9, i8 25, !30, i8 0, i32 3, i8 1, i32 0, i8 0, null}
|
||||
!45 = !{i32 1, !"SV_InsideTessFactor", i8 9, i8 26, !21, i8 0, i32 1, i8 1, i32 3, i8 0, null}
|
||||
!46 = !{i32 2, !47}
|
||||
!47 = !{i32 4, i32 36}
|
||||
|
|
@ -1,205 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: GS output vertex count must be [0..1024]. 1025 specified
|
||||
; CHECK: GS instance count must be [1..32]. 33 specified
|
||||
; CHECK: GS output primitive topology unrecognized
|
||||
; CHECK: GS input primitive unrecognized
|
||||
; CHECK: Stream index (5) must between 0 and 3
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%b = type { <2 x float> }
|
||||
%struct.VSOutGSIn = type { <3 x float>, <4 x float> }
|
||||
%class.TriangleStream = type { %struct.VSOut }
|
||||
%struct.VSOut = type { <2 x float>, <4 x float>, <4 x float>, i32 }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
|
||||
@b = external constant %b
|
||||
@dx.typevar.0 = external addrspace(1) constant %struct.VSOutGSIn
|
||||
@dx.typevar.1 = external addrspace(1) constant %class.TriangleStream
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.VSOut
|
||||
@dx.typevar.3 = external addrspace(1) constant %b
|
||||
@llvm.used = appending global [6 x i8*] [i8* bitcast (%b* @b to i8*), i8* bitcast (%b* @b to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSOutGSIn addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.TriangleStream addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSOut addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%b addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat([1 x <3 x float>]* nocapture readnone, [1 x <4 x float>]* nocapture readnone, %class.TriangleStream* nocapture readnone, <2 x float>* nocapture readnone, <4 x float>* nocapture readnone, <4 x float>* nocapture readnone, i32* nocapture readnone) #0 {
|
||||
entry:
|
||||
%verts.0 = alloca [3 x float], align 4
|
||||
%verts.1 = alloca [3 x float], align 4
|
||||
%7 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 0
|
||||
%8 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 0
|
||||
store float -5.000000e-01, float* %7, align 4
|
||||
store float -5.000000e-01, float* %8, align 4
|
||||
%9 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 1
|
||||
%10 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 1
|
||||
store float 1.500000e+00, float* %9, align 4
|
||||
store float -5.000000e-01, float* %10, align 4
|
||||
%11 = getelementptr [3 x float], [3 x float]* %verts.0, i32 0, i32 2
|
||||
%12 = getelementptr [3 x float], [3 x float]* %verts.1, i32 0, i32 2
|
||||
store float -5.000000e-01, float* %11, align 4
|
||||
store float 1.500000e+00, float* %12, align 4
|
||||
%13 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 0)
|
||||
%14 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 0)
|
||||
%15 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 0)
|
||||
%16 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 0)
|
||||
%17 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 0)
|
||||
%18 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 2, i32 0)
|
||||
%19 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 3, i32 0)
|
||||
%load30 = load float, float* %7, align 4
|
||||
%load32 = load float, float* %8, align 4
|
||||
%mul.i0 = fmul fast float %load30, %13
|
||||
%mul.i1 = fmul fast float %load32, %13
|
||||
%add.i0 = fadd fast float %mul.i0, %14
|
||||
%add.i1 = fadd fast float %mul.i1, %15
|
||||
%20 = call %dx.types.Handle @dx.op.createHandle(i32 58, i8 2, i32 0, i32 0, i1 false)
|
||||
%21 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %20, i32 0)
|
||||
%22 = extractvalue %dx.types.CBufRet.f32 %21, 0
|
||||
%23 = extractvalue %dx.types.CBufRet.f32 %21, 1
|
||||
%mul.i.i0 = fmul fast float %22, 2.000000e+00
|
||||
%mul.i.i1 = fmul fast float %23, 2.000000e+00
|
||||
%mul1.i.i0 = fmul fast float %mul.i.i0, %add.i0
|
||||
%mul1.i.i1 = fmul fast float %mul.i.i1, %add.i1
|
||||
%sub.i = fadd fast float %mul1.i.i0, -1.000000e+00
|
||||
%sub2.i = fsub fast float 1.000000e+00, %mul1.i.i1
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %16)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %17)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %18)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %19)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %sub.i)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %sub2.i)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float 5.000000e-01)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 3, float 1.000000e+00)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 3, i32 0, i8 0, i32 0)
|
||||
call void @dx.op.emitStream(i32 97, i8 0)
|
||||
%load26 = load float, float* %9, align 4
|
||||
%load28 = load float, float* %10, align 4
|
||||
%mul12.i0 = fmul fast float %load26, %13
|
||||
%mul12.i1 = fmul fast float %load28, %13
|
||||
%add13.i0 = fadd fast float %mul12.i0, %14
|
||||
%add13.i1 = fadd fast float %mul12.i1, %15
|
||||
%mul1.i.29.i0 = fmul fast float %add13.i0, %mul.i.i0
|
||||
%mul1.i.29.i1 = fmul fast float %add13.i1, %mul.i.i1
|
||||
%sub.i.30 = fadd fast float %mul1.i.29.i0, -1.000000e+00
|
||||
%sub2.i.31 = fsub fast float 1.000000e+00, %mul1.i.29.i1
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 2.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %16)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %17)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %18)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %19)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %sub.i.30)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %sub2.i.31)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float 5.000000e-01)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 3, float 1.000000e+00)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 3, i32 0, i8 0, i32 2)
|
||||
call void @dx.op.emitStream(i32 97, i8 0)
|
||||
%load23 = load float, float* %11, align 4
|
||||
%load24 = load float, float* %12, align 4
|
||||
%mul22.i0 = fmul fast float %load23, %13
|
||||
%mul22.i1 = fmul fast float %load24, %13
|
||||
%add23.i0 = fadd fast float %mul22.i0, %14
|
||||
%add23.i1 = fadd fast float %mul22.i1, %15
|
||||
%mul1.i.34.i0 = fmul fast float %add23.i0, %mul.i.i0
|
||||
%mul1.i.34.i1 = fmul fast float %add23.i1, %mul.i.i1
|
||||
%sub.i.35 = fadd fast float %mul1.i.34.i0, -1.000000e+00
|
||||
%sub2.i.36 = fsub fast float 1.000000e+00, %mul1.i.34.i1
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 2.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %16)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %17)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %18)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %19)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %sub.i.35)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %sub2.i.36)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float 5.000000e-01)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 3, float 1.000000e+00)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 3, i32 0, i8 0, i32 1)
|
||||
call void @dx.op.emitStream(i32 97, i8 0)
|
||||
call void @dx.op.cutStream(i32 98, i8 0)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.cutStream(i32, i8) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.emitStream(i32, i8) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !18}
|
||||
!dx.entryPoints = !{!35}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"gs", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %b* @b, !"b", i32 0, i32 0, i32 1, i32 8, null}
|
||||
!6 = !{i32 0, %struct.VSOutGSIn addrspace(1)* @dx.typevar.0, !7, %class.TriangleStream addrspace(1)* @dx.typevar.1, !10, %struct.VSOut addrspace(1)* @dx.typevar.2, !12, %b addrspace(1)* @dx.typevar.3, !16}
|
||||
!7 = !{i32 32, !8, !9}
|
||||
!8 = !{i32 3, i32 0, i32 4, !"POSSIZE", i32 6, !"posSize", i32 7, i32 9}
|
||||
!9 = !{i32 3, i32 16, i32 4, !"COLOR", i32 6, !"clr", i32 7, i32 9}
|
||||
!10 = !{i32 52, !11}
|
||||
!11 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!12 = !{i32 52, !13, !9, !14, !15}
|
||||
!13 = !{i32 3, i32 0, i32 4, !"TEXCOORD0", i32 6, !"uv", i32 7, i32 9}
|
||||
!14 = !{i32 3, i32 32, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!15 = !{i32 3, i32 48, i32 4, !"SV_RenderTargetArrayIndex", i32 6, !"index", i32 7, i32 5}
|
||||
!16 = !{i32 0, !17}
|
||||
!17 = !{i32 3, i32 0, i32 6, !"invViewportSize", i32 7, i32 9}
|
||||
!18 = !{i32 1, void ([1 x <3 x float>]*, [1 x <4 x float>]*, %class.TriangleStream*, <2 x float>*, <4 x float>*, <4 x float>*, i32*)* @main.flat, !19}
|
||||
!19 = !{!20, !22, !25, !27, !28, !30, !31, !33}
|
||||
!20 = !{i32 0, !21, !21}
|
||||
!21 = !{}
|
||||
!22 = !{i32 0, !23, !24}
|
||||
!23 = !{i32 4, !"POSSIZE", i32 7, i32 9}
|
||||
!24 = !{i32 0}
|
||||
!25 = !{i32 0, !26, !24}
|
||||
!26 = !{i32 4, !"COLOR", i32 7, i32 9}
|
||||
!27 = !{i32 5, !21, !21}
|
||||
!28 = !{i32 5, !29, !24}
|
||||
!29 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!30 = !{i32 5, !26, !24}
|
||||
!31 = !{i32 5, !32, !24}
|
||||
!32 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!33 = !{i32 5, !34, !24}
|
||||
!34 = !{i32 4, !"SV_RenderTargetArrayIndex", i32 7, i32 5}
|
||||
!35 = !{void ([1 x <3 x float>]*, [1 x <4 x float>]*, %class.TriangleStream*, <2 x float>*, <4 x float>*, <4 x float>*, i32*)* @main.flat, !"", !36, !3, !44}
|
||||
!36 = !{!37, !40, null}
|
||||
!37 = !{!38, !39}
|
||||
!38 = !{i32 0, !"POSSIZE", i8 9, i8 0, !24, i8 2, i32 1, i8 3, i32 0, i8 0, null}
|
||||
!39 = !{i32 1, !"COLOR", i8 9, i8 0, !24, i8 2, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!40 = !{!41, !39, !42, !43}
|
||||
!41 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !24, i8 2, i32 1, i8 2, i32 0, i8 0, !50}
|
||||
!42 = !{i32 2, !"SV_Position", i8 9, i8 3, !24, i8 4, i32 1, i8 4, i32 2, i8 0, null}
|
||||
!43 = !{i32 3, !"SV_RenderTargetArrayIndex", i8 5, i8 4, !24, i8 1, i32 1, i8 1, i32 3, i8 0, null}
|
||||
!44 = !{i32 0, i64 512, i32 1, !45}
|
||||
!45 = !{i32 5, i32 1025, i32 1, i32 0, i32 33}
|
||||
;!45 = !{i32 1, i32 3, i32 1, i32 4, i32 1}
|
||||
|
||||
!50 = !{i32 0, i32 5}
|
|
@ -1,130 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: For pass thru hull shader, input control point count must match output control point count
|
||||
; CHECK: Total number of scalars across all HS output control points must not exceed
|
||||
; CHECK: Required TessFactor for domain not found declared anywhere in Patch Constant data
|
||||
; CHECK: Required TessFactor for domain not found declared anywhere in Patch Constant data
|
||||
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Texture2D = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
|
||||
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
|
||||
%struct.PSSceneIn = type { <4 x float>, <2 x float>, <3 x float> }
|
||||
%struct.VSSceneIn = type { <3 x float>, <3 x float>, <2 x float> }
|
||||
%struct.HSPerPatchData = type { [3 x float], float }
|
||||
%class.InputPatch = type { [3 x %struct.PSSceneIn] }
|
||||
%struct.HSPerVertexData = type { %struct.PSSceneIn }
|
||||
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Texture2D
|
||||
@dx.typevar.1 = external addrspace(1) constant %"class.Texture2D<vector<float, 4> >::mips_type"
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.PSSceneIn
|
||||
@dx.typevar.3 = external addrspace(1) constant %struct.VSSceneIn
|
||||
@dx.typevar.4 = external addrspace(1) constant %struct.HSPerPatchData
|
||||
@dx.typevar.5 = external addrspace(1) constant %class.InputPatch
|
||||
@dx.typevar.6 = external addrspace(1) constant %struct.HSPerVertexData
|
||||
@llvm.used = appending global [7 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Texture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.PSSceneIn addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSSceneIn addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerPatchData addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.InputPatch addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerVertexData addrspace(1)* @dx.typevar.6 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@@Z.flat"([3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, [3 x float]* nocapture readnone, float* nocapture readnone) #0 {
|
||||
entry:
|
||||
%retval.0 = alloca [3 x float], align 4
|
||||
%arrayidx3 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 0
|
||||
store float 1.000000e+00, float* %arrayidx3, align 4, !tbaa !62
|
||||
%arrayidx22 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 1
|
||||
store float 1.000000e+00, float* %arrayidx22, align 4, !tbaa !62
|
||||
%arrayidx41 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 2
|
||||
store float 1.000000e+00, float* %arrayidx41, align 4, !tbaa !62
|
||||
%load = load [3 x float], [3 x float]* %retval.0, align 4
|
||||
%5 = extractvalue [3 x float] %load, 0
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 0, i8 0, float %5)
|
||||
%6 = extractvalue [3 x float] %load, 1
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 1, i8 0, float %6)
|
||||
%7 = extractvalue [3 x float] %load, 2
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 2, i8 0, float %7)
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 1, i32 0, i8 0, float 1.000000e+00)
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storePatchConstant.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3, !24}
|
||||
!dx.entryPoints = !{!46}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"hs", i32 6, i32 0}
|
||||
!3 = !{i32 0, %class.Texture2D addrspace(1)* @dx.typevar.0, !4, %"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1, !7, %struct.PSSceneIn addrspace(1)* @dx.typevar.2, !9, %struct.VSSceneIn addrspace(1)* @dx.typevar.3, !13, %struct.HSPerPatchData addrspace(1)* @dx.typevar.4, !17, %class.InputPatch addrspace(1)* @dx.typevar.5, !20, %struct.HSPerVertexData addrspace(1)* @dx.typevar.6, !22}
|
||||
!4 = !{i32 20, !5, !6}
|
||||
!5 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!6 = !{i32 3, i32 16, i32 6, !"mips"}
|
||||
!7 = !{i32 4, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"handle", i32 7, i32 5}
|
||||
!9 = !{i32 44, !10, !11, !12}
|
||||
!10 = !{i32 3, i32 0, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!11 = !{i32 3, i32 16, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!12 = !{i32 3, i32 32, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!13 = !{i32 40, !14, !15, !16}
|
||||
!14 = !{i32 3, i32 0, i32 4, !"POSITION", i32 6, !"pos", i32 7, i32 9}
|
||||
!15 = !{i32 3, i32 16, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!16 = !{i32 3, i32 32, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!17 = !{i32 40, !18, !19}
|
||||
!18 = !{i32 3, i32 0, i32 4, !"SV_TessFactor", i32 6, !"edges", i32 7, i32 9}
|
||||
!19 = !{i32 3, i32 36, i32 4, !"SV_InsideTessFactor", i32 6, !"inside", i32 7, i32 9}
|
||||
!20 = !{i32 140, !21}
|
||||
!21 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!22 = !{i32 44, !23}
|
||||
!23 = !{i32 3, i32 0, i32 6, !"v"}
|
||||
!24 = !{i32 1, void ([3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@@Z.flat", !40}
|
||||
!25 = !{!26, !28, !31, !33, !35, !37, !38, !39}
|
||||
!26 = !{i32 0, !27, !27}
|
||||
!27 = !{}
|
||||
!28 = !{i32 0, !29, !30}
|
||||
!29 = !{i32 4, !"SV_OutputControlPointID", i32 7, i32 5}
|
||||
!30 = !{i32 0}
|
||||
!31 = !{i32 3, !32, !30}
|
||||
!32 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!33 = !{i32 3, !34, !30}
|
||||
!34 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!35 = !{i32 3, !36, !30}
|
||||
!36 = !{i32 4, !"NORMAL", i32 7, i32 9}
|
||||
!37 = !{i32 1, !32, !30}
|
||||
!38 = !{i32 1, !34, !30}
|
||||
!39 = !{i32 1, !36, !30}
|
||||
!40 = !{!26, !31, !33, !35, !41, !44}
|
||||
!41 = !{i32 1, !42, !43}
|
||||
!42 = !{i32 4, !"SV_TessFactor", i32 7, i32 9}
|
||||
!43 = !{i32 0, i32 1, i32 2}
|
||||
!44 = !{i32 1, !45, !30}
|
||||
!45 = !{i32 4, !"SV_InsideTessFactor", i32 7, i32 9}
|
||||
!46 = !{null, !"", !47, null, !60}
|
||||
!47 = !{!48, !53, !57}
|
||||
!48 = !{!50, !51, !52}
|
||||
!50 = !{i32 0, !"SV_Position", i8 9, i8 3, !30, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!51 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !30, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!52 = !{i32 2, !"NORMAL", i8 9, i8 0, !30, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!53 = !{!54, !55, !56, !66}
|
||||
!54 = !{i32 0, !"SV_Position", i8 9, i8 3, !30, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!55 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !30, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!56 = !{i32 2, !"NORMAL", i8 9, i8 0, !30, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!57 = !{!58, !59}
|
||||
!58 = !{i32 0, !"TessFactor", i8 9, i8 0, !43, i8 0, i32 3, i8 1, i32 0, i8 0, null}
|
||||
!59 = !{i32 1, !"InsideTessFactor", i8 9, i8 0, !30, i8 0, i32 1, i8 1, i32 3, i8 0, null}
|
||||
!60 = !{i32 3, !61}
|
||||
!61 = !{void ([3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@@Z.flat", i32 3, i32 2000, i32 2, i32 3, i32 3, float 6.400000e+01}
|
||||
!62 = !{!63, !63, i64 0}
|
||||
!63 = !{!"float", !64, i64 0}
|
||||
!64 = !{!"omnipotent char", !65, i64 0}
|
||||
!65 = !{!"Simple C/C++ TBAA"}
|
||||
!66 = !{i32 3, !"COLOR", i8 9, i8 0, !30, i8 2, i32 1, i8 3, i32 3, i8 0, null}
|
||||
|
|
@ -1,167 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Hull Shader declared with Tri Domain must specify output primitive point, triangle_cw or triangle_ccw. Line output is not compatible with the Tri domain
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Texture2D = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
|
||||
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
|
||||
%struct.PSSceneIn = type { <4 x float>, <2 x float>, <3 x float> }
|
||||
%struct.VSSceneIn = type { <3 x float>, <3 x float>, <2 x float> }
|
||||
%struct.HSPerPatchData = type { [3 x float], float }
|
||||
%class.InputPatch = type { [3 x %struct.PSSceneIn] }
|
||||
%class.OutputPatch = type { [3 x %struct.PSSceneIn] }
|
||||
%struct.HSPerVertexData = type { %struct.PSSceneIn }
|
||||
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Texture2D
|
||||
@dx.typevar.1 = external addrspace(1) constant %"class.Texture2D<vector<float, 4> >::mips_type"
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.PSSceneIn
|
||||
@dx.typevar.3 = external addrspace(1) constant %struct.VSSceneIn
|
||||
@dx.typevar.4 = external addrspace(1) constant %struct.HSPerPatchData
|
||||
@dx.typevar.5 = external addrspace(1) constant %class.InputPatch
|
||||
@dx.typevar.6 = external addrspace(1) constant %class.OutputPatch
|
||||
@dx.typevar.7 = external addrspace(1) constant %struct.HSPerVertexData
|
||||
@llvm.used = appending global [8 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Texture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.PSSceneIn addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSSceneIn addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerPatchData addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.InputPatch addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.OutputPatch addrspace(1)* @dx.typevar.6 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerVertexData addrspace(1)* @dx.typevar.7 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@V?$OutputPatch@UPSSceneIn@@$02@@@Z.flat"([3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, [3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, [3 x float]* nocapture readnone, float* nocapture readnone) #0 {
|
||||
entry:
|
||||
%retval.0 = alloca [3 x float], align 4
|
||||
%8 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 0)
|
||||
%arrayidx3 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 0
|
||||
store float %8, float* %arrayidx3, align 4, !tbaa !65
|
||||
%9 = call float @dx.op.loadOutputControlPoint.f32(i32 106, i32 1, i32 0, i8 1, i32 1)
|
||||
%arrayidx32 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 1
|
||||
store float %9, float* %arrayidx32, align 4, !tbaa !65
|
||||
%arrayidx51 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 2
|
||||
store float 1.000000e+00, float* %arrayidx51, align 4, !tbaa !65
|
||||
%load = load [3 x float], [3 x float]* %retval.0, align 4
|
||||
%10 = extractvalue [3 x float] %load, 0
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 0, i8 0, float %10)
|
||||
%11 = extractvalue [3 x float] %load, 1
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 1, i8 0, float %11)
|
||||
%12 = extractvalue [3 x float] %load, 2
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 2, i8 0, float %12)
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 1, i32 0, i8 0, float 1.000000e+00)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(i32, [3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, <4 x float>* nocapture readnone, <2 x float>* nocapture readnone, <3 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%7 = call i32 @dx.op.outputControlPointID.i32(i32 110)
|
||||
%8 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 %7)
|
||||
%9 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 %7)
|
||||
%10 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 %7)
|
||||
%11 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 %7)
|
||||
%12 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 %7)
|
||||
%13 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 %7)
|
||||
%14 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 %7)
|
||||
%15 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 %7)
|
||||
%16 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 %7)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %8)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %9)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %10)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %11)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %12)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %13)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %14)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %15)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float %16)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.outputControlPointID.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storePatchConstant.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadOutputControlPoint.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3, !24}
|
||||
!dx.entryPoints = !{!49}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"hs", i32 6, i32 0}
|
||||
!3 = !{i32 0, %class.Texture2D addrspace(1)* @dx.typevar.0, !4, %"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1, !7, %struct.PSSceneIn addrspace(1)* @dx.typevar.2, !9, %struct.VSSceneIn addrspace(1)* @dx.typevar.3, !13, %struct.HSPerPatchData addrspace(1)* @dx.typevar.4, !17, %class.InputPatch addrspace(1)* @dx.typevar.5, !20, %class.OutputPatch addrspace(1)* @dx.typevar.6, !20, %struct.HSPerVertexData addrspace(1)* @dx.typevar.7, !22}
|
||||
!4 = !{i32 20, !5, !6}
|
||||
!5 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!6 = !{i32 3, i32 16, i32 6, !"mips"}
|
||||
!7 = !{i32 4, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"handle", i32 7, i32 5}
|
||||
!9 = !{i32 44, !10, !11, !12}
|
||||
!10 = !{i32 3, i32 0, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!11 = !{i32 3, i32 16, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!12 = !{i32 3, i32 32, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!13 = !{i32 40, !14, !15, !16}
|
||||
!14 = !{i32 3, i32 0, i32 4, !"POSITION", i32 6, !"pos", i32 7, i32 9}
|
||||
!15 = !{i32 3, i32 16, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!16 = !{i32 3, i32 32, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!17 = !{i32 40, !18, !19}
|
||||
!18 = !{i32 3, i32 0, i32 4, !"SV_TessFactor", i32 6, !"edges", i32 7, i32 9}
|
||||
!19 = !{i32 3, i32 36, i32 4, !"SV_InsideTessFactor", i32 6, !"inside", i32 7, i32 9}
|
||||
!20 = !{i32 140, !21}
|
||||
!21 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!22 = !{i32 44, !23}
|
||||
!23 = !{i32 3, i32 0, i32 6, !"v"}
|
||||
!24 = !{i32 1, void (i32, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !25, void ([3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@V?$OutputPatch@UPSSceneIn@@$02@@@Z.flat", !40}
|
||||
!25 = !{!26, !28, !31, !33, !35, !37, !38, !39}
|
||||
!26 = !{i32 0, !27, !27}
|
||||
!27 = !{}
|
||||
!28 = !{i32 0, !29, !30}
|
||||
!29 = !{i32 4, !"SV_OutputControlPointID", i32 7, i32 5}
|
||||
!30 = !{i32 0}
|
||||
!31 = !{i32 3, !32, !30}
|
||||
!32 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!33 = !{i32 3, !34, !30}
|
||||
!34 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!35 = !{i32 3, !36, !30}
|
||||
!36 = !{i32 4, !"NORMAL", i32 7, i32 9}
|
||||
!37 = !{i32 1, !32, !30}
|
||||
!38 = !{i32 1, !34, !30}
|
||||
!39 = !{i32 1, !36, !30}
|
||||
!40 = !{!26, !31, !33, !35, !41, !42, !43, !44, !47}
|
||||
!41 = !{i32 4, !32, !30}
|
||||
!42 = !{i32 4, !34, !30}
|
||||
!43 = !{i32 4, !36, !30}
|
||||
!44 = !{i32 1, !45, !46}
|
||||
!45 = !{i32 4, !"SV_TessFactor", i32 7, i32 9}
|
||||
!46 = !{i32 0, i32 1, i32 2}
|
||||
!47 = !{i32 1, !48, !30}
|
||||
!48 = !{i32 4, !"SV_InsideTessFactor", i32 7, i32 9}
|
||||
!49 = !{void (i32, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !"", !50, null, !63}
|
||||
!50 = !{!51, !56, !60}
|
||||
!51 = !{!53, !54, !55}
|
||||
!53 = !{i32 0, !"SV_Position", i8 9, i8 3, !30, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!54 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !30, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!55 = !{i32 2, !"NORMAL", i8 9, i8 0, !30, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!56 = !{!57, !58, !59}
|
||||
!57 = !{i32 0, !"SV_Position", i8 9, i8 3, !30, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!58 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !30, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!59 = !{i32 2, !"NORMAL", i8 9, i8 0, !30, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!60 = !{!61, !62}
|
||||
!61 = !{i32 0, !"SV_TessFactor", i8 9, i8 25, !46, i8 0, i32 3, i8 1, i32 0, i8 0, null}
|
||||
!62 = !{i32 1, !"SV_InsideTessFactor", i8 9, i8 26, !30, i8 0, i32 1, i8 1, i32 3, i8 0, null}
|
||||
!63 = !{i32 3, !64}
|
||||
!64 = !{void ([3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@V?$OutputPatch@UPSSceneIn@@$02@@@Z.flat", i32 3, i32 3, i32 2, i32 3, i32 2, float 6.400000e+01}
|
||||
!65 = !{!66, !66, i64 0}
|
||||
!66 = !{!"float", !67, i64 0}
|
||||
!67 = !{!"omnipotent char", !68, i64 0}
|
||||
!68 = !{!"Simple C/C++ TBAA"}
|
|
@ -1,225 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Hull Shader declared with IsoLine Domain must specify output primitive point or line. Triangle_cw or triangle_ccw output are not compatible with the IsoLine Domain.
|
||||
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Position 0 xyzw 0 POS float
|
||||
; TEXCOORD 0 xy 1 NONE float
|
||||
; NORMAL 0 xyz 2 NONE float
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Position 0 xyzw 0 POS float xyzw
|
||||
; TEXCOORD 0 xy 1 NONE float xyzw
|
||||
; NORMAL 0 xyz 2 NONE float xyzw
|
||||
;
|
||||
;
|
||||
; Patch Constant signature signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_TessFactor 0 x 0 LINEDEN float xyzw
|
||||
; SV_TessFactor 1 x 1 LINEDET float xyzw
|
||||
;
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Hull Shader
|
||||
; InputControlPointCount=2
|
||||
; OutputControlPointCount=2
|
||||
; Domain=isoline
|
||||
; OutputPrimitive=line
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_Position 0 noperspective
|
||||
; TEXCOORD 0 linear
|
||||
; NORMAL 0 linear
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_Position 0 noperspective
|
||||
; TEXCOORD 0 linear
|
||||
; NORMAL 0 linear
|
||||
;
|
||||
; Patch Constant signature signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_TessFactor 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Texture2D = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
|
||||
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
|
||||
%struct.PSSceneIn = type { <4 x float>, <2 x float>, <3 x float> }
|
||||
%struct.VSSceneIn = type { <3 x float>, <3 x float>, <2 x float> }
|
||||
%struct.HSPerPatchData = type { [2 x float] }
|
||||
%struct.HSPerVertexData = type { %struct.PSSceneIn }
|
||||
%class.InputPatch = type { [2 x %struct.PSSceneIn] }
|
||||
%class.OutputPatch = type { [2 x %struct.HSPerVertexData] }
|
||||
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Texture2D
|
||||
@dx.typevar.1 = external addrspace(1) constant %"class.Texture2D<vector<float, 4> >::mips_type"
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.PSSceneIn
|
||||
@dx.typevar.3 = external addrspace(1) constant %struct.VSSceneIn
|
||||
@dx.typevar.4 = external addrspace(1) constant %struct.HSPerPatchData
|
||||
@dx.typevar.5 = external addrspace(1) constant %struct.HSPerVertexData
|
||||
@dx.typevar.6 = external addrspace(1) constant %class.InputPatch
|
||||
@dx.typevar.7 = external addrspace(1) constant %class.OutputPatch
|
||||
@llvm.used = appending global [8 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Texture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.PSSceneIn addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSSceneIn addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerPatchData addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerVertexData addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.InputPatch addrspace(1)* @dx.typevar.6 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.OutputPatch addrspace(1)* @dx.typevar.7 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$01@@V?$OutputPatch@UHSPerVertexData@@$01@@@Z.flat"([2 x <4 x float>]* nocapture readnone, [2 x <2 x float>]* nocapture readnone, [2 x <3 x float>]* nocapture readnone, [2 x <4 x float>]* nocapture readnone, [2 x <2 x float>]* nocapture readnone, [2 x <3 x float>]* nocapture readnone, [2 x float]* nocapture readnone) #0 {
|
||||
entry:
|
||||
%retval.0 = alloca [2 x float], align 4
|
||||
%7 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 0) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%arrayidx2 = getelementptr inbounds [2 x float], [2 x float]* %retval.0, i32 0, i32 0
|
||||
store float %7, float* %arrayidx2, align 4, !tbaa !61
|
||||
%8 = call float @dx.op.loadOutputControlPoint.f32(i32 106, i32 1, i32 0, i8 0, i32 1) ; LoadOutputControlPoint(inputSigId,row,col,index)
|
||||
%arrayidx31 = getelementptr inbounds [2 x float], [2 x float]* %retval.0, i32 0, i32 1
|
||||
store float %8, float* %arrayidx31, align 4, !tbaa !61
|
||||
%load = load [2 x float], [2 x float]* %retval.0, align 4
|
||||
%9 = extractvalue [2 x float] %load, 0
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 0, i8 0, float %9) ; StorePatchConstant(outputSigID,row,col,value)
|
||||
%10 = extractvalue [2 x float] %load, 1
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 1, i8 0, float %10) ; StorePatchConstant(outputSigID,row,col,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(i32, [2 x <4 x float>]* nocapture readnone, [2 x <2 x float>]* nocapture readnone, [2 x <3 x float>]* nocapture readnone, <4 x float>* nocapture readnone, <2 x float>* nocapture readnone, <3 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%7 = call i32 @dx.op.outputControlPointID.i32(i32 110) ; OutputControlPointID()
|
||||
%8 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%9 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%10 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%11 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%12 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%13 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%14 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%15 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%16 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 %7) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %8) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %9) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %10) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %11) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %12) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %13) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %14) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %15) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float %16) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.outputControlPointID.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storePatchConstant.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadOutputControlPoint.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3, !23}
|
||||
!dx.entryPoints = !{!46}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"hs", i32 6, i32 0}
|
||||
!3 = !{i32 0, %class.Texture2D addrspace(1)* @dx.typevar.0, !4, %"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1, !7, %struct.PSSceneIn addrspace(1)* @dx.typevar.2, !9, %struct.VSSceneIn addrspace(1)* @dx.typevar.3, !13, %struct.HSPerPatchData addrspace(1)* @dx.typevar.4, !17, %struct.HSPerVertexData addrspace(1)* @dx.typevar.5, !19, %class.InputPatch addrspace(1)* @dx.typevar.6, !21, %class.OutputPatch addrspace(1)* @dx.typevar.7, !21}
|
||||
!4 = !{i32 20, !5, !6}
|
||||
!5 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!6 = !{i32 3, i32 16, i32 6, !"mips"}
|
||||
!7 = !{i32 4, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"handle", i32 7, i32 5}
|
||||
!9 = !{i32 44, !10, !11, !12}
|
||||
!10 = !{i32 3, i32 0, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!11 = !{i32 3, i32 16, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!12 = !{i32 3, i32 32, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!13 = !{i32 40, !14, !15, !16}
|
||||
!14 = !{i32 3, i32 0, i32 4, !"POSITION", i32 6, !"pos", i32 7, i32 9}
|
||||
!15 = !{i32 3, i32 16, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!16 = !{i32 3, i32 32, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!17 = !{i32 20, !18}
|
||||
!18 = !{i32 3, i32 0, i32 4, !"SV_TessFactor", i32 6, !"edges", i32 7, i32 9}
|
||||
!19 = !{i32 44, !20}
|
||||
!20 = !{i32 3, i32 0, i32 6, !"v"}
|
||||
!21 = !{i32 92, !22}
|
||||
!22 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!23 = !{i32 1, void ([2 x <4 x float>]*, [2 x <2 x float>]*, [2 x <3 x float>]*, [2 x <4 x float>]*, [2 x <2 x float>]*, [2 x <3 x float>]*, [2 x float]*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$01@@V?$OutputPatch@UHSPerVertexData@@$01@@@Z.flat", !24, void (i32, [2 x <4 x float>]*, [2 x <2 x float>]*, [2 x <3 x float>]*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !40}
|
||||
!24 = !{!25, !27, !30, !32, !34, !35, !36, !37}
|
||||
!25 = !{i32 0, !26, !26}
|
||||
!26 = !{}
|
||||
!27 = !{i32 3, !28, !29}
|
||||
!28 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!29 = !{i32 0}
|
||||
!30 = !{i32 3, !31, !29}
|
||||
!31 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!32 = !{i32 3, !33, !29}
|
||||
!33 = !{i32 4, !"NORMAL", i32 7, i32 9}
|
||||
!34 = !{i32 4, !28, !29}
|
||||
!35 = !{i32 4, !31, !29}
|
||||
!36 = !{i32 4, !33, !29}
|
||||
!37 = !{i32 1, !38, !39}
|
||||
!38 = !{i32 4, !"SV_TessFactor", i32 7, i32 9}
|
||||
!39 = !{i32 0, i32 1}
|
||||
!40 = !{!25, !41, !27, !30, !32, !43, !44, !45}
|
||||
!41 = !{i32 0, !42, !29}
|
||||
!42 = !{i32 4, !"SV_OutputControlPointID", i32 7, i32 5}
|
||||
!43 = !{i32 1, !28, !29}
|
||||
!44 = !{i32 1, !31, !29}
|
||||
!45 = !{i32 1, !33, !29}
|
||||
!46 = !{void (i32, [2 x <4 x float>]*, [2 x <2 x float>]*, [2 x <3 x float>]*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !"", !47, null, !59}
|
||||
!47 = !{!48, !53, !57}
|
||||
!48 = !{!50, !51, !52}
|
||||
!50 = !{i32 0, !"SV_Position", i8 9, i8 3, !29, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!51 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !29, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!52 = !{i32 2, !"NORMAL", i8 9, i8 0, !29, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!53 = !{!54, !55, !56}
|
||||
!54 = !{i32 0, !"SV_Position", i8 9, i8 3, !29, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!55 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !29, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!56 = !{i32 2, !"NORMAL", i8 9, i8 0, !29, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!57 = !{!58}
|
||||
!58 = !{i32 0, !"SV_TessFactor", i8 9, i8 25, !39, i8 0, i32 2, i8 1, i32 0, i8 0, null}
|
||||
!59 = !{i32 3, !60}
|
||||
!60 = !{void ([2 x <4 x float>]*, [2 x <2 x float>]*, [2 x <3 x float>]*, [2 x <4 x float>]*, [2 x <2 x float>]*, [2 x <3 x float>]*, [2 x float]*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$01@@V?$OutputPatch@UHSPerVertexData@@$01@@@Z.flat", i32 2, i32 2, i32 1, i32 3, i32 3, float 6.400000e+01}
|
||||
!61 = !{!62, !62, i64 0}
|
||||
!62 = !{!"float", !63, i64 0}
|
||||
!63 = !{!"omnipotent char", !64, i64 0}
|
||||
!64 = !{!"Simple C/C++ TBAA"}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Instructions should not read uninitialized value
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; B 0 x 0 NONE unknown
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Depth 0 x 0 DEPTH float xyzw
|
||||
;
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Pixel Shader
|
||||
; DepthOutput=1
|
||||
; SampleFrequency=0
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; B 0 nointerpolation
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_Depth 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @"\01?main@@YAMM@Z.flat"(float, float* nocapture readnone) #0 {
|
||||
entry:
|
||||
%2 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%add = fadd fast float %2, undef
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %add) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!12}
|
||||
|
||||
!0 = !{!"clang version 3.7.0 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (float, float*)* @"\01?main@@YAMM@Z.flat", !4}
|
||||
!4 = !{!5, !7, !10}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"B", i32 7, i32 13}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 1, !11, !9}
|
||||
!11 = !{i32 4, !"SV_DEPTH", i32 7, i32 9}
|
||||
!12 = !{void (float, float*)* @"\01?main@@YAMM@Z.flat", !"", !13, null, null}
|
||||
!13 = !{!14, !16, null}
|
||||
!14 = !{!15}
|
||||
!15 = !{i32 0, !"B", i8 13, i8 0, !9, i8 1, i32 1, i8 1, i32 0, i8 0, null}
|
||||
!16 = !{!17}
|
||||
!17 = !{i32 0, !"SV_Depth", i8 9, i8 17, !9, i8 0, i32 1, i8 1, i32 0, i8 0, null}
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: BufferUpdateCounter valid only on UAV
|
||||
; CHECK: BufferUpdateCounter valid only on structured buffers
|
||||
; CHECK: inc of BufferUpdateCounter must be an immediate constant
|
||||
; CHECK: RWStructuredBuffers may increment or decrement their counters, but not both.
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Buffer = type { <2 x float> }
|
||||
%class.RWStructuredBuffer = type { %struct.Foo }
|
||||
%struct.Foo = type { <2 x float>, <3 x float>, [4 x <2 x i32>] }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
|
||||
|
||||
@"\01?buf1@@3V?$Buffer@V?$vector@M$01@@@@A" = available_externally global %class.Buffer zeroinitializer, align 4
|
||||
@"\01?buf2@@3V?$RWStructuredBuffer@UFoo@@@@A" = available_externally global %class.RWStructuredBuffer zeroinitializer, align 4
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Buffer
|
||||
@dx.typevar.1 = external addrspace(1) constant %class.RWStructuredBuffer
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.Foo
|
||||
@llvm.used = appending global [7 x i8*] [i8* bitcast (%class.RWStructuredBuffer* @"\01?buf2@@3V?$RWStructuredBuffer@UFoo@@@@A" to i8*), i8* bitcast (%class.Buffer* @"\01?buf1@@3V?$Buffer@V?$vector@M$01@@@@A" to i8*), i8* bitcast (%class.Buffer* @"\01?buf1@@3V?$Buffer@V?$vector@M$01@@@@A" to i8*), i8* bitcast (%class.RWStructuredBuffer* @"\01?buf2@@3V?$RWStructuredBuffer@UFoo@@@@A" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Buffer addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.RWStructuredBuffer addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.Foo addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(float, float, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%buf2_UAV_structbuf = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1, i32 0, i32 0, i1 false)
|
||||
%buf1_texture_buf = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0, i32 0, i32 0, i1 false)
|
||||
%3 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%5 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf2_UAV_structbuf, i8 1)
|
||||
call void @dx.op.bufferStore.f32(i32 71, %dx.types.Handle %buf2_UAV_structbuf, i32 %5, i32 0, float %4, float %3, float undef, float undef, i8 3)
|
||||
%6 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf2_UAV_structbuf, i8 -1)
|
||||
%BufferLoad1 = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 70, %dx.types.Handle %buf2_UAV_structbuf, i32 %6, i32 0)
|
||||
%7 = extractvalue %dx.types.ResRet.f32 %BufferLoad1, 0
|
||||
%8 = extractvalue %dx.types.ResRet.f32 %BufferLoad1, 1
|
||||
%9 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf1_texture_buf, i8 undef)
|
||||
%BufferLoad = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 70, %dx.types.Handle %buf1_texture_buf, i32 %6, i32 undef)
|
||||
%10 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 0
|
||||
%11 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 1
|
||||
%add.i0 = fadd fast float %10, %7
|
||||
%add.i1 = fadd fast float %11, %8
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %add.i0)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %add.i1)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float 0.000000e+00)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare i32 @dx.op.bufferUpdateCounter(i32, %dx.types.Handle, i8) #0
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32, %dx.types.Handle, i32, i32) #2
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.bufferStore.f32(i32, %dx.types.Handle, i32, i32, float, float, float, float, i8) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!10, !19}
|
||||
!dx.entryPoints = !{!32}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{!4, !7, null, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %class.Buffer* @"\01?buf1@@3V?$Buffer@V?$vector@M$01@@@@A", !"buf1", i32 0, i32 0, i32 1, i32 10, i32 0, !6}
|
||||
!6 = !{i32 0, i32 9}
|
||||
!7 = !{!8}
|
||||
!8 = !{i32 0, %class.RWStructuredBuffer* @"\01?buf2@@3V?$RWStructuredBuffer@UFoo@@@@A", !"buf2", i32 0, i32 0, i32 1, i32 12, i1 false, i1 false, i1 false, !9}
|
||||
!9 = !{i32 1, i32 52}
|
||||
!10 = !{i32 0, %class.Buffer addrspace(1)* @dx.typevar.0, !11, %class.RWStructuredBuffer addrspace(1)* @dx.typevar.1, !13, %struct.Foo addrspace(1)* @dx.typevar.2, !15}
|
||||
!11 = !{i32 8, !12}
|
||||
!12 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!13 = !{i32 88, !14}
|
||||
!14 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!15 = !{i32 88, !16, !17, !18}
|
||||
!16 = !{i32 3, i32 0, i32 6, !"a", i32 7, i32 9}
|
||||
!17 = !{i32 3, i32 16, i32 6, !"b", i32 7, i32 9}
|
||||
!18 = !{i32 3, i32 32, i32 6, !"c", i32 7, i32 4}
|
||||
!19 = !{i32 1, void (float, float, <4 x float>*)* @main.flat, !20}
|
||||
!20 = !{!21, !23, !26, !29}
|
||||
!21 = !{i32 0, !22, !22}
|
||||
!22 = !{}
|
||||
!23 = !{i32 0, !24, !25}
|
||||
!24 = !{i32 4, !"Idx1", i32 7, i32 9}
|
||||
!25 = !{i32 1}
|
||||
!26 = !{i32 0, !27, !28}
|
||||
!27 = !{i32 4, !"Idx2", i32 7, i32 9}
|
||||
!28 = !{i32 2}
|
||||
!29 = !{i32 1, !30, !31}
|
||||
!30 = !{i32 4, !"SV_Target", i32 7, i32 9}
|
||||
!31 = !{i32 0}
|
||||
!32 = !{void (float, float, <4 x float>*)* @main.flat, !"", !33, !3, !39}
|
||||
!33 = !{!34, !37, null}
|
||||
!34 = !{!35, !36}
|
||||
!35 = !{i32 0, !"Idx", i8 9, i8 0, !25, i8 2, i32 1, i8 1, i32 0, i8 0, null}
|
||||
!36 = !{i32 1, !"Idx", i8 9, i8 0, !28, i8 2, i32 1, i8 1, i32 1, i8 0, null}
|
||||
!37 = !{!38}
|
||||
!38 = !{i32 0, !"SV_Target", i8 9, i8 16, !31, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!39 = !{i32 0, i64 8208}
|
|
@ -1,82 +0,0 @@
|
|||
// RUN: %dxc -E main -T cs_6_0 %s | FileCheck %s
|
||||
|
||||
// CHECK: ; Buffer Definitions:
|
||||
|
||||
// CHECK: ; Resource bind info for mats
|
||||
// CHECK: ; {
|
||||
|
||||
// CHECK: ; struct dx.alignment.legacy.struct.mat
|
||||
// CHECK: ; {
|
||||
|
||||
// CHECK: ; row_major float2x2 f2x2; ; Offset: 0
|
||||
|
||||
// CHECK: ; } $Element; ; Offset: 0 Size: 16
|
||||
|
||||
// CHECK: ; }
|
||||
|
||||
// CHECK: ; Resource bind info for mats2
|
||||
// CHECK: ; {
|
||||
|
||||
// CHECK: ; column_major float2x2 $Element; ; Offset: 0 Size: 16
|
||||
|
||||
// CHECK: ; }
|
||||
|
||||
// CHECK: ; Resource bind info for fA
|
||||
// CHECK: ; {
|
||||
|
||||
// CHECK: ; column_major float2x2 $Element; ; Offset: 0 Size: 16
|
||||
|
||||
// CHECK: ; }
|
||||
|
||||
// CHECK: ; Resource Bindings:
|
||||
|
||||
// CHECK: ; Name Type Format Dim ID HLSL Bind Count
|
||||
// CHECK: ; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
// CHECK: ; mats texture struct r/o T0 t0 1
|
||||
// CHECK: ; mats2 texture struct r/o T1 t1 1
|
||||
// CHECK: ; fA UAV struct r/w U0 u0 1
|
||||
|
||||
// CHECK: threadId
|
||||
// CHECK: groupId
|
||||
// CHECK: threadIdInGroup
|
||||
// CHECK: flattenedThreadIdInGroup
|
||||
// CHECK: addrspace(3)
|
||||
// CHECK: barrier
|
||||
// CHECK: i32 8
|
||||
// CHECK: barrier
|
||||
// CHECK: i32 9
|
||||
// CHECK: barrier
|
||||
// CHECK: i32 10
|
||||
// CHECK: barrier
|
||||
// CHECK: i32 11
|
||||
// CHECK: barrier
|
||||
// CHECK: i32 2
|
||||
// CHECK: barrier
|
||||
// CHECK: i32 4
|
||||
|
||||
groupshared column_major float2x2 dataC[8*8];
|
||||
|
||||
RWStructuredBuffer<float2x2> fA;
|
||||
|
||||
struct mat {
|
||||
row_major float2x2 f2x2;
|
||||
};
|
||||
|
||||
StructuredBuffer<mat> mats;
|
||||
StructuredBuffer<float2x2> mats2;
|
||||
|
||||
[numthreads(8,8,1)]
|
||||
void main( uint2 tid : SV_DispatchThreadID, uint2 gid : SV_GroupID, uint2 gtid : SV_GroupThreadID, uint gidx : SV_GroupIndex )
|
||||
{
|
||||
dataC[tid.x%(8*8)] = mats.Load(gid.x).f2x2 + mats2.Load(gtid.y);
|
||||
GroupMemoryBarrier();
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
float2x2 f2x2 = dataC[8*8-1-tid.y%(8*8)];
|
||||
AllMemoryBarrier();
|
||||
fA[gidx+2] = f2x2;
|
||||
AllMemoryBarrierWithGroupSync();
|
||||
fA[gidx+1] = f2x2;
|
||||
DeviceMemoryBarrier();
|
||||
DeviceMemoryBarrierWithGroupSync();
|
||||
fA[gidx] = f2x2;
|
||||
}
|
|
@ -1,171 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Internal declaration 'internalGV' is unused
|
||||
; CHECK: Vector type '<4 x float>' is not allowed
|
||||
; CHECK: External declaration 'dx.typevar.2' is unused
|
||||
; CHECK: Mode of Barrier must be an immediate constant
|
||||
; CHECK: sync must include some form of memory barrier - _u (UAV) and/or _g (Thread Group Shared Memory). Only _t (thread group sync) is optional.
|
||||
; CHECK: sync can't specify both _ugroup and _uglobal. If both are needed, just specify _uglobal.
|
||||
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%dx.alignment.legacy.class.RWStructuredBuffer = type { [2 x <2 x float>] }
|
||||
%dx.alignment.legacy.class.StructuredBuffer = type { %dx.alignment.legacy.struct.mat }
|
||||
%dx.alignment.legacy.struct.mat = type { [2 x <2 x float>] }
|
||||
%dx.alignment.legacy.class.StructuredBuffer.0 = type { [2 x <2 x float>] }
|
||||
%class.RWStructuredBuffer = type { %class.matrix.float.2.2 }
|
||||
%class.matrix.float.2.2 = type { [2 x <2 x float>] }
|
||||
%class.StructuredBuffer = type { %struct.mat }
|
||||
%struct.mat = type { %class.matrix.float.2.2 }
|
||||
%class.StructuredBuffer.0 = type { %class.matrix.float.2.2 }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
|
||||
|
||||
@"internalGV" = internal global [64 x <4 x float>] undef
|
||||
@"\01?dataC@@3PAV?$matrix@M$01$01@@A.v" = addrspace(3) global [64 x <4 x float>] undef
|
||||
@"\01?fA@@3V?$RWStructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" = external global %dx.alignment.legacy.class.RWStructuredBuffer
|
||||
@"\01?mats@@3V?$StructuredBuffer@Umat@@@@A_legacy" = external global %dx.alignment.legacy.class.StructuredBuffer
|
||||
@"\01?mats2@@3V?$StructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" = external global %dx.alignment.legacy.class.StructuredBuffer.0
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.RWStructuredBuffer
|
||||
@dx.typevar.1 = external addrspace(1) constant %class.StructuredBuffer
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.mat
|
||||
@dx.typevar.3 = external addrspace(1) constant %class.StructuredBuffer.0
|
||||
@dx.typevar.4 = external addrspace(1) constant %dx.alignment.legacy.class.RWStructuredBuffer
|
||||
@dx.typevar.5 = external addrspace(1) constant %dx.alignment.legacy.struct.mat
|
||||
@dx.typevar.6 = external addrspace(1) constant %dx.alignment.legacy.class.StructuredBuffer
|
||||
@dx.typevar.7 = external addrspace(1) constant %dx.alignment.legacy.class.StructuredBuffer.0
|
||||
@llvm.used = appending global [11 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.struct.mat addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*), i8* bitcast (%dx.alignment.legacy.class.StructuredBuffer.0* @"\01?mats2@@3V?$StructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.RWStructuredBuffer addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.class.StructuredBuffer addrspace(1)* @dx.typevar.6 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.StructuredBuffer addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.StructuredBuffer.0 addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* bitcast (%dx.alignment.legacy.class.RWStructuredBuffer* @"\01?fA@@3V?$RWStructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.mat addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* bitcast (%dx.alignment.legacy.class.StructuredBuffer* @"\01?mats@@3V?$StructuredBuffer@Umat@@@@A_legacy" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.class.RWStructuredBuffer addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.class.StructuredBuffer.0 addrspace(1)* @dx.typevar.7 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: alwaysinline nounwind
|
||||
define void @main(<2 x i32> %tid, <2 x i32> %gid, <2 x i32> %gtid, i32 %gidx) #0 {
|
||||
entry:
|
||||
%fA_UAV_structbuf = tail call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1, i32 0, i32 0, i1 false)
|
||||
%mats2_texture_structbuf = tail call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0, i32 1, i32 1, i1 false)
|
||||
%mats_texture_structbuf = tail call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0, i32 0, i32 0, i1 false)
|
||||
%0 = tail call i32 @dx.op.threadId.i32(i32 96, i32 0)
|
||||
%1 = tail call i32 @dx.op.threadId.i32(i32 96, i32 1)
|
||||
%2 = tail call i32 @dx.op.groupId.i32(i32 96, i32 0)
|
||||
%3 = tail call i32 @dx.op.threadIdInGroup.i32(i32 97, i32 1)
|
||||
%4 = tail call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 98)
|
||||
%rem = and i32 %0, 63
|
||||
%5 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 0
|
||||
%6 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 1
|
||||
%7 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 2
|
||||
%8 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 3
|
||||
%BufferLoad = tail call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 70, %dx.types.Handle %mats_texture_structbuf, i32 %2, i32 0)
|
||||
%9 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 0
|
||||
%10 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 1
|
||||
%11 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 2
|
||||
%12 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 3
|
||||
%BufferLoad10 = tail call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 70, %dx.types.Handle %mats2_texture_structbuf, i32 %3, i32 0)
|
||||
%13 = extractvalue %dx.types.ResRet.f32 %BufferLoad10, 0
|
||||
%14 = extractvalue %dx.types.ResRet.f32 %BufferLoad10, 1
|
||||
%15 = extractvalue %dx.types.ResRet.f32 %BufferLoad10, 2
|
||||
%16 = extractvalue %dx.types.ResRet.f32 %BufferLoad10, 3
|
||||
%.i0 = fadd fast float %13, %9
|
||||
%.i1 = fadd fast float %14, %11
|
||||
%.i2 = fadd fast float %15, %10
|
||||
%.i3 = fadd fast float %16, %12
|
||||
store float %.i0, float addrspace(3)* %5, align 16
|
||||
store float %.i1, float addrspace(3)* %6, align 4
|
||||
store float %.i2, float addrspace(3)* %7, align 8
|
||||
store float %.i3, float addrspace(3)* %8, align 4
|
||||
tail call void @dx.op.barrier(i32 82, i32 15)
|
||||
tail call void @dx.op.barrier(i32 82, i32 0)
|
||||
%rem3 = and i32 %1, 63
|
||||
%sub = xor i32 %rem3, 63
|
||||
%17 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 0
|
||||
%18 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 1
|
||||
%19 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 2
|
||||
%20 = getelementptr inbounds [64 x <4 x float>], [64 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 3
|
||||
%21 = load float, float addrspace(3)* %17, align 16
|
||||
%22 = load float, float addrspace(3)* %18, align 4
|
||||
%23 = load float, float addrspace(3)* %19, align 8
|
||||
%24 = load float, float addrspace(3)* %20, align 4
|
||||
tail call void @dx.op.barrier(i32 82, i32 10)
|
||||
%add = add i32 %4, 2
|
||||
tail call void @dx.op.bufferStore.f32(i32 71, %dx.types.Handle %fA_UAV_structbuf, i32 %add, i32 0, float %21, float %22, float %23, float %24, i8 15)
|
||||
tail call void @dx.op.barrier(i32 82, i32 %rem)
|
||||
%add6 = add i32 %4, 1
|
||||
%25 = load %struct.mat, %struct.mat addrspace(1)* @dx.typevar.2, align 4
|
||||
tail call void @dx.op.bufferStore.f32(i32 71, %dx.types.Handle %fA_UAV_structbuf, i32 %add6, i32 0, float %21, float %22, float %23, float %24, i8 15)
|
||||
tail call void @dx.op.barrier(i32 82, i32 2)
|
||||
tail call void @dx.op.barrier(i32 82, i32 4)
|
||||
tail call void @dx.op.bufferStore.f32(i32 71, %dx.types.Handle %fA_UAV_structbuf, i32 %4, i32 0, float %21, float %22, float %23, float %24, i8 15)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.threadId.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.groupId.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.flattenedThreadIdInGroup.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32, %dx.types.Handle, i32, i32) #2
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.barrier(i32, i32) #3
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.bufferStore.f32(i32, %dx.types.Handle, i32, i32, float, float, float, float, i8) #3
|
||||
|
||||
attributes #0 = { alwaysinline nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="0" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
attributes #3 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!10, !19}
|
||||
!dx.entryPoints = !{!32}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"cs", i32 6, i32 0}
|
||||
!3 = !{!4, !8, null, null}
|
||||
!4 = !{!5, !7}
|
||||
!5 = !{i32 0, %dx.alignment.legacy.class.StructuredBuffer* @"\01?mats@@3V?$StructuredBuffer@Umat@@@@A_legacy", !"mats", i32 0, i32 0, i32 1, i32 12, i32 0, !6}
|
||||
!6 = !{i32 1, i32 16}
|
||||
!7 = !{i32 1, %dx.alignment.legacy.class.StructuredBuffer.0* @"\01?mats2@@3V?$StructuredBuffer@V?$matrix@M$01$01@@@@A_legacy", !"mats2", i32 0, i32 1, i32 1, i32 12, i32 0, !6}
|
||||
!8 = !{!9}
|
||||
!9 = !{i32 0, %dx.alignment.legacy.class.RWStructuredBuffer* @"\01?fA@@3V?$RWStructuredBuffer@V?$matrix@M$01$01@@@@A_legacy", !"fA", i32 0, i32 0, i32 1, i32 12, i1 false, i1 false, i1 false, !6}
|
||||
!10 = !{i32 0, %class.RWStructuredBuffer addrspace(1)* @dx.typevar.0, !11, %class.StructuredBuffer addrspace(1)* @dx.typevar.1, !14, %struct.mat addrspace(1)* @dx.typevar.2, !16, %class.StructuredBuffer.0 addrspace(1)* @dx.typevar.3, !11, %dx.alignment.legacy.class.RWStructuredBuffer addrspace(1)* @dx.typevar.4, !11, %dx.alignment.legacy.struct.mat addrspace(1)* @dx.typevar.5, !16, %dx.alignment.legacy.class.StructuredBuffer addrspace(1)* @dx.typevar.6, !14, %dx.alignment.legacy.class.StructuredBuffer.0 addrspace(1)* @dx.typevar.7, !11}
|
||||
!11 = !{i32 24, !12}
|
||||
!12 = !{i32 2, !13, i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!13 = !{i32 2, i32 2, i32 2}
|
||||
!14 = !{i32 24, !15}
|
||||
!15 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!16 = !{i32 24, !17}
|
||||
!17 = !{i32 2, !18, i32 3, i32 0, i32 6, !"f2x2", i32 7, i32 9}
|
||||
!18 = !{i32 2, i32 2, i32 1}
|
||||
!19 = !{i32 1, void (<2 x i32>, <2 x i32>, <2 x i32>, i32)* @main, !20}
|
||||
!20 = !{!21, !23, !26, !28, !30}
|
||||
!21 = !{i32 1, !22, !22}
|
||||
!22 = !{}
|
||||
!23 = !{i32 0, !24, !25}
|
||||
!24 = !{i32 4, !"SV_DispatchThreadID", i32 7, i32 5}
|
||||
!25 = !{i32 0}
|
||||
!26 = !{i32 0, !27, !25}
|
||||
!27 = !{i32 4, !"SV_GroupID", i32 7, i32 5}
|
||||
!28 = !{i32 0, !29, !25}
|
||||
!29 = !{i32 4, !"SV_GroupThreadID", i32 7, i32 5}
|
||||
!30 = !{i32 0, !31, !25}
|
||||
!31 = !{i32 4, !"SV_GroupIndex", i32 7, i32 5}
|
||||
!32 = !{void (<2 x i32>, <2 x i32>, <2 x i32>, i32)* @main, !"", null, !3, !33}
|
||||
!33 = !{i32 0, i64 16, i32 4, !34}
|
||||
!34 = !{i32 8, i32 8, i32 1}
|
|
@ -1,117 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK:Cbuffer access out of bound
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; no %s
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
;
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Pixel Shader
|
||||
; DepthOutput=0
|
||||
; SampleFrequency=0
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_Target 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
; cbuffer Foo2
|
||||
; {
|
||||
;
|
||||
; struct Foo2
|
||||
; {
|
||||
;
|
||||
; float4 g2; ; Offset: 0
|
||||
;
|
||||
; } Foo2 ; Offset: 0 Size: 16
|
||||
;
|
||||
; }
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; Foo2 cbuffer NA NA CB0 cb5 1
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%Foo2 = type { <4 x float> }
|
||||
%dx.types.Handle = type { i8* }
|
||||
|
||||
@Foo2 = external constant %Foo2
|
||||
@dx.typevar.0 = external addrspace(1) constant %Foo2
|
||||
@llvm.used = appending global [3 x i8*] [i8* bitcast (%Foo2* @Foo2 to i8*), i8* bitcast (%Foo2* @Foo2 to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%Foo2 addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%1 = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 2, i32 0, i32 5, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%2 = call float @dx.op.cbufferLoad.f32(i32 60, %dx.types.Handle %1, i32 0, i32 8) ; CBufferLoad(handle,byteOffset,alignment)
|
||||
%3 = call float @dx.op.cbufferLoad.f32(i32 60, %dx.types.Handle %1, i32 4, i32 8) ; CBufferLoad(handle,byteOffset,alignment)
|
||||
%4 = call float @dx.op.cbufferLoad.f32(i32 60, %dx.types.Handle %1, i32 8, i32 8) ; CBufferLoad(handle,byteOffset,alignment)
|
||||
%5 = call float @dx.op.cbufferLoad.f32(i32 60, %dx.types.Handle %1, i32 16, i32 8) ; CBufferLoad(handle,byteOffset,alignment)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %2) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %3) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %4) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %5) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.cbufferLoad.f32(i32, %dx.types.Handle, i32, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !9}
|
||||
!dx.entryPoints = !{!16}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %Foo2* @Foo2, !"Foo2", i32 0, i32 5, i32 1, i32 16, null}
|
||||
!6 = !{i32 0, %Foo2 addrspace(1)* @dx.typevar.0, !7}
|
||||
!7 = !{i32 0, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"g2", i32 7, i32 9}
|
||||
!9 = !{i32 1, void (<4 x float>*)* @main.flat, !10}
|
||||
!10 = !{!11, !13}
|
||||
!11 = !{i32 0, !12, !12}
|
||||
!12 = !{}
|
||||
!13 = !{i32 1, !14, !15}
|
||||
!14 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!15 = !{i32 0}
|
||||
!16 = !{void (<4 x float>*)* @main.flat, !"", !17, !3, null}
|
||||
!17 = !{null, !18, null}
|
||||
!18 = !{!19}
|
||||
!19 = !{i32 0, !"SV_Target", i8 9, i8 16, !15, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK:Cbuffer access out of bound
|
||||
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; no %s
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
;
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Pixel Shader
|
||||
; DepthOutput=0
|
||||
; SampleFrequency=0
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode
|
||||
; -------------------- ----- ----------------------
|
||||
; SV_Target 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
; cbuffer Foo2
|
||||
; {
|
||||
;
|
||||
; struct Foo2
|
||||
; {
|
||||
;
|
||||
; float4 g2; ; Offset: 0
|
||||
;
|
||||
; } Foo2 ; Offset: 0 Size: 16
|
||||
;
|
||||
; }
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; Foo2 cbuffer NA NA CB0 cb5 1
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%Foo2 = type { <4 x float> }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
|
||||
@Foo2 = external constant %Foo2
|
||||
@dx.typevar.0 = external addrspace(1) constant %Foo2
|
||||
@llvm.used = appending global [3 x i8*] [i8* bitcast (%Foo2* @Foo2 to i8*), i8* bitcast (%Foo2* @Foo2 to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%Foo2 addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%1 = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 2, i32 0, i32 5, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%2 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 61, %dx.types.Handle %1, i32 1) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%3 = extractvalue %dx.types.CBufRet.f32 %2, 0
|
||||
%4 = extractvalue %dx.types.CBufRet.f32 %2, 1
|
||||
%5 = extractvalue %dx.types.CBufRet.f32 %2, 2
|
||||
%6 = extractvalue %dx.types.CBufRet.f32 %2, 3
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %3) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %4) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %5) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %6) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !9}
|
||||
!dx.entryPoints = !{!16}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %Foo2* @Foo2, !"Foo2", i32 0, i32 5, i32 1, i32 16, null}
|
||||
!6 = !{i32 0, %Foo2 addrspace(1)* @dx.typevar.0, !7}
|
||||
!7 = !{i32 0, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"g2", i32 7, i32 9}
|
||||
!9 = !{i32 1, void (<4 x float>*)* @main.flat, !10}
|
||||
!10 = !{!11, !13}
|
||||
!11 = !{i32 0, !12, !12}
|
||||
!12 = !{}
|
||||
!13 = !{i32 1, !14, !15}
|
||||
!14 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!15 = !{i32 0}
|
||||
!16 = !{void (<4 x float>*)* @main.flat, !"", !17, !3, null}
|
||||
!17 = !{null, !18, null}
|
||||
!18 = !{!19}
|
||||
!19 = !{i32 0, !"SV_Target", i8 9, i8 16, !15, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Declared Thread Group X size 1025 outside valid range [1..1024]
|
||||
; CHECK: Declared Thread Group Y size 1025 outside valid range [1..1024]
|
||||
; CHECK: Declared Thread Group Z size 1025 outside valid range [1..64]
|
||||
; CHECK: Declared Thread Group Count 1076890625 (X*Y*Z) is beyond the valid maximum of 1024
|
||||
; CHECK: Total Thread Group Shared Memory storage is 1024000000, exceeded 32768
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%dx.alignment.legacy.class.RWStructuredBuffer = type { [2 x <2 x float>] }
|
||||
%dx.alignment.legacy.class.StructuredBuffer = type { %dx.alignment.legacy.struct.mat }
|
||||
%dx.alignment.legacy.struct.mat = type { [2 x <2 x float>] }
|
||||
%dx.alignment.legacy.class.StructuredBuffer.0 = type { [2 x <2 x float>] }
|
||||
%class.RWStructuredBuffer = type { %class.matrix.float.2.2 }
|
||||
%class.matrix.float.2.2 = type { [2 x <2 x float>] }
|
||||
%class.StructuredBuffer = type { %struct.mat }
|
||||
%struct.mat = type { %class.matrix.float.2.2 }
|
||||
%class.StructuredBuffer.0 = type { %class.matrix.float.2.2 }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
|
||||
|
||||
@"\01?dataC@@3PAV?$matrix@M$01$01@@A.v" = addrspace(3) global [64000000 x <4 x float>] undef
|
||||
@"\01?fA@@3V?$RWStructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" = external global %dx.alignment.legacy.class.RWStructuredBuffer
|
||||
@"\01?mats@@3V?$StructuredBuffer@Umat@@@@A_legacy" = external global %dx.alignment.legacy.class.StructuredBuffer
|
||||
@"\01?mats2@@3V?$StructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" = external global %dx.alignment.legacy.class.StructuredBuffer.0
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.RWStructuredBuffer
|
||||
@dx.typevar.1 = external addrspace(1) constant %class.StructuredBuffer
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.mat
|
||||
@dx.typevar.3 = external addrspace(1) constant %class.StructuredBuffer.0
|
||||
@dx.typevar.4 = external addrspace(1) constant %dx.alignment.legacy.class.RWStructuredBuffer
|
||||
@dx.typevar.5 = external addrspace(1) constant %dx.alignment.legacy.struct.mat
|
||||
@dx.typevar.6 = external addrspace(1) constant %dx.alignment.legacy.class.StructuredBuffer
|
||||
@dx.typevar.7 = external addrspace(1) constant %dx.alignment.legacy.class.StructuredBuffer.0
|
||||
@llvm.used = appending global [11 x i8*] [i8* bitcast (%dx.alignment.legacy.class.RWStructuredBuffer* @"\01?fA@@3V?$RWStructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.StructuredBuffer.0 addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* bitcast (%dx.alignment.legacy.class.StructuredBuffer* @"\01?mats@@3V?$StructuredBuffer@Umat@@@@A_legacy" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.class.StructuredBuffer addrspace(1)* @dx.typevar.6 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.RWStructuredBuffer addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.class.RWStructuredBuffer addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* bitcast (%dx.alignment.legacy.class.StructuredBuffer.0* @"\01?mats2@@3V?$StructuredBuffer@V?$matrix@M$01$01@@@@A_legacy" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast
|
||||
(%struct.mat addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.StructuredBuffer addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.class.StructuredBuffer.0 addrspace(1)* @dx.typevar.7 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%dx.alignment.legacy.struct.mat addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: alwaysinline nounwind
|
||||
define void @main(<2 x i32> %tid, <2 x i32> %gid, <2 x i32> %gtid, i32 %gidx) #0 {
|
||||
entry:
|
||||
%fA_UAV_structbuf = tail call %dx.types.Handle @dx.op.createHandle(i32 58, i8 1, i32 0, i32 0, i1 false)
|
||||
%mats2_texture_structbuf = tail call %dx.types.Handle @dx.op.createHandle(i32 58, i8 0, i32 1, i32 0, i1 false)
|
||||
%mats_texture_structbuf = tail call %dx.types.Handle @dx.op.createHandle(i32 58, i8 0, i32 0, i32 0, i1 false)
|
||||
%0 = tail call i32 @dx.op.threadId.i32(i32 93, i32 0)
|
||||
%1 = tail call i32 @dx.op.threadId.i32(i32 93, i32 1)
|
||||
%2 = tail call i32 @dx.op.groupId.i32(i32 94, i32 0)
|
||||
%3 = tail call i32 @dx.op.threadIdInGroup.i32(i32 95, i32 1)
|
||||
%4 = tail call i32 @dx.op.flattenedThreadIdInGroup.i32(i32 96)
|
||||
%rem = and i32 %0, 63
|
||||
%5 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 0
|
||||
%6 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 1
|
||||
%7 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 2
|
||||
%8 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %rem, i32 3
|
||||
%BufferLoad = tail call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 69, %dx.types.Handle %mats_texture_structbuf, i32 %2, i32 0)
|
||||
%9 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 0
|
||||
%10 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 1
|
||||
%11 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 2
|
||||
%12 = extractvalue %dx.types.ResRet.f32 %BufferLoad, 3
|
||||
%BufferLoad7 = tail call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 69, %dx.types.Handle %mats2_texture_structbuf, i32 %3, i32 0)
|
||||
%13 = extractvalue %dx.types.ResRet.f32 %BufferLoad7, 0
|
||||
%14 = extractvalue %dx.types.ResRet.f32 %BufferLoad7, 1
|
||||
%15 = extractvalue %dx.types.ResRet.f32 %BufferLoad7, 2
|
||||
%16 = extractvalue %dx.types.ResRet.f32 %BufferLoad7, 3
|
||||
%.i0 = fadd fast float %13, %9
|
||||
%.i1 = fadd fast float %14, %11
|
||||
%.i2 = fadd fast float %15, %10
|
||||
%.i3 = fadd fast float %16, %12
|
||||
store float %.i0, float addrspace(3)* %5, align 16
|
||||
store float %.i1, float addrspace(3)* %6, align 4
|
||||
store float %.i2, float addrspace(3)* %7, align 8
|
||||
store float %.i3, float addrspace(3)* %8, align 4
|
||||
tail call void @dx.op.barrier(i32 83, i32 9)
|
||||
%rem3 = and i32 %1, 63
|
||||
%sub = xor i32 %rem3, 63
|
||||
%17 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 0
|
||||
%18 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 1
|
||||
%19 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 2
|
||||
%20 = getelementptr inbounds [64000000 x <4 x float>], [64000000 x <4 x float>] addrspace(3)* @"\01?dataC@@3PAV?$matrix@M$01$01@@A.v", i32 0, i32 %sub, i32 3
|
||||
%21 = load float, float addrspace(3)* %17, align 16
|
||||
%22 = load float, float addrspace(3)* %18, align 4
|
||||
%23 = load float, float addrspace(3)* %19, align 8
|
||||
%24 = load float, float addrspace(3)* %20, align 4
|
||||
tail call void @dx.op.bufferStore.f32(i32 70, %dx.types.Handle %fA_UAV_structbuf, i32 %4, i32 0, float %21, float %22, float %23, float %24, i8 15)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.threadId.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.groupId.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.threadIdInGroup.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.flattenedThreadIdInGroup.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.bufferStore.f32(i32, %dx.types.Handle, i32, i32, float, float, float, float, i8) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32, %dx.types.Handle, i32, i32) #3
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.barrier(i32, i32) #2
|
||||
|
||||
attributes #0 = { alwaysinline nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="0" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind }
|
||||
attributes #3 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!10, !19}
|
||||
!dx.entryPoints = !{!32}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"cs", i32 6, i32 0}
|
||||
!3 = !{!4, !8, null, null}
|
||||
!4 = !{!5, !7}
|
||||
!5 = !{i32 0, %dx.alignment.legacy.class.StructuredBuffer* @"\01?mats@@3V?$StructuredBuffer@Umat@@@@A_legacy", !"mats", i32 0, i32 0, i32 1, i32 12, i32 0, !6}
|
||||
!6 = !{i32 1, i32 16}
|
||||
!7 = !{i32 1, %dx.alignment.legacy.class.StructuredBuffer.0* @"\01?mats2@@3V?$StructuredBuffer@V?$matrix@M$01$01@@@@A_legacy", !"mats2", i32 0, i32 1, i32 1, i32 12, i32 0, !6}
|
||||
!8 = !{!9}
|
||||
!9 = !{i32 0, %dx.alignment.legacy.class.RWStructuredBuffer* @"\01?fA@@3V?$RWStructuredBuffer@V?$matrix@M$01$01@@@@A_legacy", !"fA", i32 0, i32 0, i32 1, i32 12, i1 false, i1 false, i1 false, !6}
|
||||
!10 = !{i32 0, %class.RWStructuredBuffer addrspace(1)* @dx.typevar.0, !11, %class.StructuredBuffer addrspace(1)* @dx.typevar.1, !14, %struct.mat addrspace(1)* @dx.typevar.2, !16, %class.StructuredBuffer.0 addrspace(1)* @dx.typevar.3, !11, %dx.alignment.legacy.class.RWStructuredBuffer addrspace(1)* @dx.typevar.4, !11, %dx.alignment.legacy.struct.mat addrspace(1)* @dx.typevar.5, !16, %dx.alignment.legacy.class.StructuredBuffer addrspace(1)* @dx.typevar.6, !14, %dx.alignment.legacy.class.StructuredBuffer.0 addrspace(1)* @dx.typevar.7, !11}
|
||||
!11 = !{i32 24, !12}
|
||||
!12 = !{i32 2, !13, i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!13 = !{i32 2, i32 2, i32 2}
|
||||
!14 = !{i32 24, !15}
|
||||
!15 = !{i32 3, i32 0, i32 6, !"h"}
|
||||
!16 = !{i32 24, !17}
|
||||
!17 = !{i32 2, !18, i32 3, i32 0, i32 6, !"f2x2", i32 7, i32 9}
|
||||
!18 = !{i32 2, i32 2, i32 1}
|
||||
!19 = !{i32 1, void (<2 x i32>, <2 x i32>, <2 x i32>, i32)* @main, !20}
|
||||
!20 = !{!21, !23, !26, !28, !30}
|
||||
!21 = !{i32 1, !22, !22}
|
||||
!22 = !{}
|
||||
!23 = !{i32 0, !24, !25}
|
||||
!24 = !{i32 4, !"SV_DispatchThreadID", i32 7, i32 5}
|
||||
!25 = !{i32 0}
|
||||
!26 = !{i32 0, !27, !25}
|
||||
!27 = !{i32 4, !"SV_GroupID", i32 7, i32 5}
|
||||
!28 = !{i32 0, !29, !25}
|
||||
!29 = !{i32 4, !"SV_GroupThreadID", i32 7, i32 5}
|
||||
!30 = !{i32 0, !31, !25}
|
||||
!31 = !{i32 4, !"SV_GroupIndex", i32 7, i32 5}
|
||||
!32 = !{void (<2 x i32>, <2 x i32>, <2 x i32>, i32)* @main, !"", null, !3, !33}
|
||||
!33 = !{i32 0, i64 16, i32 4, !34}
|
||||
!34 = !{i32 1025, i32 1025, i32 1025}
|
||||
|
|
@ -1,92 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Named metadata 'dx.unused' is unknown
|
||||
; CHECK: Loop must have break
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%"$Globals" = type { i32 }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
|
||||
|
||||
@"\01?i@@3HA" = global i32 0, align 4
|
||||
@"$Globals" = external constant %"$Globals"
|
||||
@dx.typevar.0 = external addrspace(1) constant %"$Globals"
|
||||
@llvm.used = appending global [3 x i8*] [i8* bitcast (%"$Globals"* @"$Globals" to i8*), i8* bitcast (%"$Globals"* @"$Globals" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"$Globals" addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<2 x float>, <3 x i32>, float* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%5 = call %dx.types.Handle @dx.op.createHandle(i32 58, i8 2, i32 0, i32 0, i1 false)
|
||||
%6 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 60, %dx.types.Handle %5, i32 0)
|
||||
%7 = extractvalue %dx.types.CBufRet.i32 %6, 0
|
||||
%cmp = icmp slt i32 %7, %3
|
||||
br i1 %cmp, label %while.body, label %while.end
|
||||
|
||||
while.body: ; preds = %while.body, %entry
|
||||
%s.01 = phi float [ %add, %while.body ], [ 0.000000e+00, %entry ]
|
||||
%add = fadd fast float %s.01, %4
|
||||
br label %while.body
|
||||
|
||||
while.end: ; preds = %while.body, %entry
|
||||
%s.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %add, %while.body ]
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %s.0.lcssa)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !9}
|
||||
!dx.entryPoints = !{!20}
|
||||
!dx.unused = !{!20}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %"$Globals"* @"$Globals", !"$Globals", i32 0, i32 0, i32 1, i32 4, null}
|
||||
!6 = !{i32 0, %"$Globals" addrspace(1)* @dx.typevar.0, !7}
|
||||
!7 = !{i32 0, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"i", i32 7, i32 4}
|
||||
!9 = !{i32 1, void (<2 x float>, <3 x i32>, float*)* @main.flat, !10}
|
||||
!10 = !{!11, !13, !16, !18}
|
||||
!11 = !{i32 0, !12, !12}
|
||||
!12 = !{}
|
||||
!13 = !{i32 0, !14, !15}
|
||||
!14 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!15 = !{i32 0}
|
||||
!16 = !{i32 0, !17, !15}
|
||||
!17 = !{i32 4, !"B", i32 7, i32 4}
|
||||
!18 = !{i32 1, !19, !15}
|
||||
!19 = !{i32 4, !"SV_Target", i32 7, i32 9}
|
||||
!20 = !{void (<2 x float>, <3 x i32>, float*)* @main.flat, !"", !21, !3, null}
|
||||
!21 = !{!22, !25, null}
|
||||
!22 = !{!23, !24}
|
||||
!23 = !{i32 0, !"A", i8 9, i8 0, !15, i8 2, i32 1, i8 2, i32 0, i8 0, null}
|
||||
!24 = !{i32 1, !"B", i8 4, i8 0, !15, i8 1, i32 1, i8 3, i32 1, i8 0, null}
|
||||
!25 = !{!26}
|
||||
!26 = !{i32 0, !"SV_Target", i8 9, i8 16, !15, i8 0, i32 1, i8 1, i32 0, i8 0, null}
|
|
@ -1,159 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: HS input control point count must be [1..32]. 36 specified
|
||||
; CHECK: Invalid Tessellator Domain specified. Must be isoline, tri or quad
|
||||
; CHECK: Invalid Tessellator Partitioning specified. Must be integer, pow2, fractional_odd or fractional_even.
|
||||
; CHECK: Invalid Tessellator Output Primitive specified. Must be point, line, triangleCW or triangleCCW.
|
||||
; CHECK: Hull Shader MaxTessFactor must be [1.000000..64.000000]. 65.000000 specified
|
||||
; CHECK: Invalid Tessellator Domain specified. Must be isoline, tri or quad
|
||||
; CHECK: output control point count must be [0..32]. 36 specified
|
||||
|
||||
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Texture2D = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
|
||||
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
|
||||
%struct.PSSceneIn = type { <4 x float>, <2 x float>, <3 x float> }
|
||||
%struct.VSSceneIn = type { <3 x float>, <3 x float>, <2 x float> }
|
||||
%struct.HSPerPatchData = type { [3 x float], float }
|
||||
%struct.HSPerVertexData = type { %struct.PSSceneIn }
|
||||
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Texture2D
|
||||
@dx.typevar.1 = external addrspace(1) constant %"class.Texture2D<vector<float, 4> >::mips_type"
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.PSSceneIn
|
||||
@dx.typevar.3 = external addrspace(1) constant %struct.VSSceneIn
|
||||
@dx.typevar.4 = external addrspace(1) constant %struct.HSPerPatchData
|
||||
@dx.typevar.5 = external addrspace(1) constant %struct.HSPerVertexData
|
||||
@llvm.used = appending global [6 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Texture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.PSSceneIn addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.VSSceneIn addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerPatchData addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.HSPerVertexData addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@@Z.flat"([3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, [3 x float]* nocapture readnone, float* nocapture readnone) #0 {
|
||||
entry:
|
||||
%retval.0 = alloca [3 x float], align 4
|
||||
%arrayidx3 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 0
|
||||
store float 1.000000e+00, float* %arrayidx3, align 4, !tbaa !56
|
||||
%arrayidx22 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 1
|
||||
store float 1.000000e+00, float* %arrayidx22, align 4, !tbaa !56
|
||||
%arrayidx41 = getelementptr inbounds [3 x float], [3 x float]* %retval.0, i32 0, i32 2
|
||||
store float 1.000000e+00, float* %arrayidx41, align 4, !tbaa !56
|
||||
%load = load [3 x float], [3 x float]* %retval.0, align 4
|
||||
%5 = extractvalue [3 x float] %load, 0
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 0, i8 0, float %5)
|
||||
%6 = extractvalue [3 x float] %load, 1
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 1, i8 0, float %6)
|
||||
%7 = extractvalue [3 x float] %load, 2
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 0, i32 2, i8 0, float %7)
|
||||
call void @dx.op.storePatchConstant.f32(i32 109, i32 1, i32 0, i8 0, float 1.000000e+00)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(i32, [3 x <4 x float>]* nocapture readnone, [3 x <2 x float>]* nocapture readnone, [3 x <3 x float>]* nocapture readnone, <4 x float>* nocapture readnone, <2 x float>* nocapture readnone, <3 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%7 = call i32 @dx.op.outputControlPointID.i32(i32 110)
|
||||
%8 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 %7)
|
||||
%9 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 %7)
|
||||
%10 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 %7)
|
||||
%11 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 %7)
|
||||
%12 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 %7)
|
||||
%13 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 %7)
|
||||
%14 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 %7)
|
||||
%15 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 %7)
|
||||
%16 = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 %7)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %8)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %9)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %10)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %11)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %12)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %13)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 0, float %14)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 1, float %15)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 2, i32 0, i8 2, float %16)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.outputControlPointID.i32(i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storePatchConstant.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.valver = !{!1}
|
||||
!dx.version = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.typeAnnotations = !{!4, !23}
|
||||
!dx.entryPoints = !{!45}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 0}
|
||||
!3 = !{!"hs", i32 6, i32 0}
|
||||
!4 = !{i32 0, %class.Texture2D addrspace(1)* @dx.typevar.0, !5, %"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1, !8, %struct.PSSceneIn addrspace(1)* @dx.typevar.2, !10, %struct.VSSceneIn addrspace(1)* @dx.typevar.3, !14, %struct.HSPerPatchData addrspace(1)* @dx.typevar.4, !18, %struct.HSPerVertexData addrspace(1)* @dx.typevar.5, !21}
|
||||
!5 = !{i32 20, !6, !7}
|
||||
!6 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!7 = !{i32 3, i32 16, i32 6, !"mips"}
|
||||
!8 = !{i32 4, !9}
|
||||
!9 = !{i32 3, i32 0, i32 6, !"handle", i32 7, i32 5}
|
||||
!10 = !{i32 44, !11, !12, !13}
|
||||
!11 = !{i32 3, i32 0, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!12 = !{i32 3, i32 16, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!13 = !{i32 3, i32 32, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!14 = !{i32 40, !15, !16, !17}
|
||||
!15 = !{i32 3, i32 0, i32 4, !"POSITION", i32 6, !"pos", i32 7, i32 9}
|
||||
!16 = !{i32 3, i32 16, i32 4, !"NORMAL", i32 6, !"norm", i32 7, i32 9}
|
||||
!17 = !{i32 3, i32 32, i32 4, !"TEXCOORD0", i32 6, !"tex", i32 7, i32 9}
|
||||
!18 = !{i32 40, !19, !20}
|
||||
!19 = !{i32 3, i32 0, i32 4, !"SV_TessFactor", i32 6, !"edges", i32 7, i32 9}
|
||||
!20 = !{i32 3, i32 36, i32 4, !"SV_InsideTessFactor", i32 6, !"inside", i32 7, i32 9}
|
||||
!21 = !{i32 44, !22}
|
||||
!22 = !{i32 3, i32 0, i32 6, !"v"}
|
||||
!23 = !{i32 1, void ([3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@@Z.flat", !24, void (i32, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !39}
|
||||
!24 = !{!25, !27, !30, !32, !34, !37}
|
||||
!25 = !{i32 0, !26, !26}
|
||||
!26 = !{}
|
||||
!27 = !{i32 3, !28, !29}
|
||||
!28 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!29 = !{i32 0}
|
||||
!30 = !{i32 3, !31, !29}
|
||||
!31 = !{i32 4, !"TEXCOORD0", i32 7, i32 9}
|
||||
!32 = !{i32 3, !33, !29}
|
||||
!33 = !{i32 4, !"NORMAL", i32 7, i32 9}
|
||||
!34 = !{i32 1, !35, !36}
|
||||
!35 = !{i32 4, !"SV_TessFactor", i32 7, i32 9}
|
||||
!36 = !{i32 0, i32 1, i32 2}
|
||||
!37 = !{i32 1, !38, !29}
|
||||
!38 = !{i32 4, !"SV_InsideTessFactor", i32 7, i32 9}
|
||||
!39 = !{!25, !40, !27, !30, !32, !42, !43, !44}
|
||||
!40 = !{i32 0, !41, !29}
|
||||
!41 = !{i32 4, !"SV_OutputControlPointID", i32 7, i32 5}
|
||||
!42 = !{i32 1, !28, !29}
|
||||
!43 = !{i32 1, !31, !29}
|
||||
!44 = !{i32 1, !33, !29}
|
||||
!45 = !{void (i32, [3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, <4 x float>*, <2 x float>*, <3 x float>*)* @main.flat, !"", !46, null, !54}
|
||||
!46 = !{!47, !47, !51}
|
||||
!47 = !{!48, !49, !50}
|
||||
!48 = !{i32 0, !"SV_Position", i8 9, i8 3, !29, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!49 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !29, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!50 = !{i32 2, !"NORMAL", i8 9, i8 0, !29, i8 2, i32 1, i8 3, i32 2, i8 0, null}
|
||||
!51 = !{!52, !53}
|
||||
!52 = !{i32 0, !"SV_TessFactor", i8 9, i8 25, !36, i8 0, i32 3, i8 1, i32 0, i8 0, null}
|
||||
!53 = !{i32 1, !"SV_InsideTessFactor", i8 9, i8 26, !29, i8 0, i32 1, i8 1, i32 3, i8 0, null}
|
||||
!54 = !{i32 3, !55}
|
||||
!55 = !{void ([3 x <4 x float>]*, [3 x <2 x float>]*, [3 x <3 x float>]*, [3 x float]*, float*)* @"\01?HSPerPatchFunc@@YA?AUHSPerPatchData@@V?$InputPatch@UPSSceneIn@@$02@@@Z.flat", i32 36, i32 36, i32 0, i32 0, i32 0, float 6.500000e+01}
|
||||
!56 = !{!57, !57, i64 0}
|
||||
!57 = !{!"float", !58, i64 0}
|
||||
!58 = !{!"omnipotent char", !59, i64 0}
|
||||
!59 = !{!"Simple C/C++ TBAA"}
|
|
@ -1,58 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: signature element A at location (0,2) size (1,2) has interpolation mode that differs from another element packed into the same row.
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<2 x float>, <2 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef)
|
||||
%5 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%6 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %5)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %6)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %4)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!15}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<2 x float>, <2 x float>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !10, !13}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 0, !11, !12}
|
||||
!11 = !{i32 4, !"A1", i32 5, i32 3, i32 7, i32 9}
|
||||
!12 = !{i32 1}
|
||||
!13 = !{i32 1, !14, !9}
|
||||
!14 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!15 = !{void (<2 x float>, <2 x float>, <4 x float>*)* @main.flat, !"", !16, null, null}
|
||||
!16 = !{!17, !20, null}
|
||||
!17 = !{!18, !19}
|
||||
!18 = !{i32 0, !"A", i8 9, i8 0, !9, i8 2, i32 1, i8 2, i32 0, i8 0, null}
|
||||
!19 = !{i32 1, !"A", i8 9, i8 0, !12, i8 3, i32 1, i8 2, i32 0, i8 2, null}
|
||||
!20 = !{!21}
|
||||
!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
|
@ -1,76 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK:signature element A specifies invalid interpolation mode for integer component type.
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>, <4 x i32>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = tail call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = tail call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 1, i32 undef)
|
||||
%5 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%6 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
%7 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef)
|
||||
%8 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef)
|
||||
%conv.i0 = uitofp i32 %4 to float
|
||||
%conv.i1 = uitofp i32 %3 to float
|
||||
%mul.i0 = fmul fast float %5, %conv.i0
|
||||
%mul.i1 = fmul fast float %6, %conv.i1
|
||||
%mul.i2 = fmul fast float %7, %conv.i1
|
||||
%mul.i3 = fmul fast float %8, %conv.i1
|
||||
%FAbs = tail call float @dx.op.unary.f32(i32 6, float %mul.i0)
|
||||
%FAbs1 = tail call float @dx.op.unary.f32(i32 6, float %mul.i1)
|
||||
%FAbs2 = tail call float @dx.op.unary.f32(i32 6, float %mul.i2)
|
||||
%FAbs3 = tail call float @dx.op.unary.f32(i32 6, float %mul.i3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %FAbs)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %FAbs1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %FAbs2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %FAbs3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!15}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>, <4 x i32>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !10, !13}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 0, !11, !12}
|
||||
!11 = !{i32 4, !"A1", i32 5, i32 3, i32 7, i32 5}
|
||||
!12 = !{i32 1}
|
||||
!13 = !{i32 1, !14, !9}
|
||||
!14 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!15 = !{void (<4 x float>, <4 x i32>, <4 x float>*)* @main.flat, !"", !16, null, null}
|
||||
!16 = !{!17, !20, null}
|
||||
!17 = !{!18, !19}
|
||||
!18 = !{i32 0, !"A", i8 9, i8 0, !9, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!19 = !{i32 1, !"A", i8 5, i8 0, !12, i8 3, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!20 = !{!21}
|
||||
!21 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
|
@ -1,64 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: signature A specifies unrecognized or invalid component type
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%2 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%3 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
%4 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef)
|
||||
%5 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef)
|
||||
%mul.i0 = fmul fast float %3, %2
|
||||
%mul.i2 = fmul fast float %4, %2
|
||||
%mul.i3 = fmul fast float %5, %2
|
||||
%FAbs = tail call float @dx.op.unary.f32(i32 6, float %mul.i0)
|
||||
%FAbs2 = tail call float @dx.op.unary.f32(i32 6, float %mul.i2)
|
||||
%FAbs3 = tail call float @dx.op.unary.f32(i32 6, float %mul.i3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %FAbs)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %FAbs)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %FAbs2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %FAbs3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!12}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !10}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 1, !11, !9}
|
||||
!11 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!12 = !{void (<4 x float>, <4 x float>*)* @main.flat, !"", !13, null, null}
|
||||
!13 = !{!14, !16, null}
|
||||
!14 = !{!15}
|
||||
!15 = !{i32 0, !"A", i8 0, i8 0, !9, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!16 = !{!17}
|
||||
!17 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
|
@ -1,280 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Multiple GS output streams are used but 'XXX' is not pointlist
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%"$Globals" = type { i32 }
|
||||
%struct.MyStruct = type { <4 x float>, <2 x float> }
|
||||
%struct.MyStruct2 = type { <3 x i32>, [3 x <4 x float>], <3 x i32> }
|
||||
%class.PointStream = type { %struct.MyStruct2 }
|
||||
%class.TriangleStream = type { %struct.MyStruct }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
|
||||
|
||||
@"\01?g1@@3HA" = global i32 0, align 4
|
||||
@"$Globals" = external constant %"$Globals"
|
||||
@dx.typevar.0 = external addrspace(1) constant %struct.MyStruct
|
||||
@dx.typevar.1 = external addrspace(1) constant %struct.MyStruct2
|
||||
@dx.typevar.2 = external addrspace(1) constant %"$Globals"
|
||||
@llvm.used = appending global [5 x i8*] [i8* bitcast (%"$Globals"* @"$Globals" to i8*), i8* bitcast (%"$Globals"* @"$Globals" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.MyStruct addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.MyStruct2 addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"$Globals" addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat([1 x <4 x float>]* nocapture readnone, %class.TriangleStream* nocapture readnone, <4 x float>* nocapture readnone, <2 x float>* nocapture readnone, %class.PointStream* nocapture readnone, <3 x i32>* nocapture readnone, [3 x <4 x float>]* nocapture readnone, <3 x i32>* nocapture readnone, %class.TriangleStream* nocapture readnone, <4 x float>* nocapture readnone, <2 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%11 = call %dx.types.Handle @dx.op.createHandle(i32 58, i8 2, i32 0, i32 0, i1 false)
|
||||
%b.1.0 = alloca [3 x float], align 4
|
||||
%b.1.1 = alloca [3 x float], align 4
|
||||
%b.1.2 = alloca [3 x float], align 4
|
||||
%b.1.3 = alloca [3 x float], align 4
|
||||
%12 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 0)
|
||||
%13 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 0)
|
||||
%14 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 0)
|
||||
%15 = getelementptr [3 x float], [3 x float]* %b.1.0, i32 0, i32 0
|
||||
%16 = getelementptr [3 x float], [3 x float]* %b.1.1, i32 0, i32 0
|
||||
%17 = getelementptr [3 x float], [3 x float]* %b.1.2, i32 0, i32 0
|
||||
%18 = getelementptr [3 x float], [3 x float]* %b.1.3, i32 0, i32 0
|
||||
store float 0.000000e+00, float* %15, align 4
|
||||
store float 0.000000e+00, float* %16, align 4
|
||||
store float 0.000000e+00, float* %17, align 4
|
||||
store float 0.000000e+00, float* %18, align 4
|
||||
%19 = getelementptr [3 x float], [3 x float]* %b.1.0, i32 0, i32 1
|
||||
%20 = getelementptr [3 x float], [3 x float]* %b.1.1, i32 0, i32 1
|
||||
%21 = getelementptr [3 x float], [3 x float]* %b.1.2, i32 0, i32 1
|
||||
%22 = getelementptr [3 x float], [3 x float]* %b.1.3, i32 0, i32 1
|
||||
store float 0.000000e+00, float* %19, align 4
|
||||
store float 0.000000e+00, float* %20, align 4
|
||||
store float 0.000000e+00, float* %21, align 4
|
||||
store float 0.000000e+00, float* %22, align 4
|
||||
%23 = getelementptr [3 x float], [3 x float]* %b.1.0, i32 0, i32 2
|
||||
%24 = getelementptr [3 x float], [3 x float]* %b.1.1, i32 0, i32 2
|
||||
%25 = getelementptr [3 x float], [3 x float]* %b.1.2, i32 0, i32 2
|
||||
%26 = getelementptr [3 x float], [3 x float]* %b.1.3, i32 0, i32 2
|
||||
%conv = fptoui float %12 to i32
|
||||
%27 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 %conv)
|
||||
%28 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 %conv)
|
||||
%29 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 %conv)
|
||||
%30 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 %conv)
|
||||
%conv3.i1 = fptoui float %13 to i32
|
||||
%conv3.i2 = fptoui float %14 to i32
|
||||
%conv5.i0 = fptoui float %27 to i32
|
||||
%conv5.i1 = fptoui float %28 to i32
|
||||
%conv5.i2 = fptoui float %29 to i32
|
||||
%mul.i0 = fmul fast float %27, 4.400000e+01
|
||||
%mul.i1 = fmul fast float %28, 4.400000e+01
|
||||
%mul.i2 = fmul fast float %29, 4.400000e+01
|
||||
%mul.i3 = fmul fast float %30, 4.400000e+01
|
||||
store float %mul.i0, float* %23, align 4
|
||||
store float %mul.i1, float* %24, align 4
|
||||
store float %mul.i2, float* %25, align 4
|
||||
store float %mul.i3, float* %26, align 4
|
||||
%31 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 60, %dx.types.Handle %11, i32 0)
|
||||
%32 = extractvalue %dx.types.CBufRet.i32 %31, 0
|
||||
%tobool = icmp eq i32 %32, 0
|
||||
br i1 %tobool, label %if.else, label %if.then
|
||||
|
||||
if.then: ; preds = %entry
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %27)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %28)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %29)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %30)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %12)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %13)
|
||||
call void @dx.op.emitStream(i32 97, i8 0)
|
||||
call void @dx.op.cutStream(i32 98, i8 0)
|
||||
br label %if.end
|
||||
|
||||
if.else: ; preds = %entry
|
||||
%33 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 0)
|
||||
%conv8 = fptoui float %33 to i32
|
||||
%34 = getelementptr inbounds [3 x float], [3 x float]* %b.1.0, i32 0, i32 0
|
||||
%35 = load float, float* %34, align 4
|
||||
%36 = getelementptr inbounds [3 x float], [3 x float]* %b.1.1, i32 0, i32 0
|
||||
%37 = load float, float* %36, align 4
|
||||
%38 = getelementptr inbounds [3 x float], [3 x float]* %b.1.2, i32 0, i32 0
|
||||
%39 = load float, float* %38, align 4
|
||||
%40 = getelementptr inbounds [3 x float], [3 x float]* %b.1.3, i32 0, i32 0
|
||||
%41 = load float, float* %40, align 4
|
||||
%42 = getelementptr inbounds [3 x float], [3 x float]* %b.1.0, i32 0, i32 1
|
||||
%43 = load float, float* %42, align 4
|
||||
%44 = getelementptr inbounds [3 x float], [3 x float]* %b.1.1, i32 0, i32 1
|
||||
%45 = load float, float* %44, align 4
|
||||
%46 = getelementptr inbounds [3 x float], [3 x float]* %b.1.2, i32 0, i32 1
|
||||
%47 = load float, float* %46, align 4
|
||||
%48 = getelementptr inbounds [3 x float], [3 x float]* %b.1.3, i32 0, i32 1
|
||||
%49 = load float, float* %48, align 4
|
||||
%50 = getelementptr inbounds [3 x float], [3 x float]* %b.1.0, i32 0, i32 2
|
||||
%51 = load float, float* %50, align 4
|
||||
%52 = getelementptr inbounds [3 x float], [3 x float]* %b.1.1, i32 0, i32 2
|
||||
%53 = load float, float* %52, align 4
|
||||
%54 = getelementptr inbounds [3 x float], [3 x float]* %b.1.2, i32 0, i32 2
|
||||
%55 = load float, float* %54, align 4
|
||||
%56 = getelementptr inbounds [3 x float], [3 x float]* %b.1.3, i32 0, i32 2
|
||||
%57 = load float, float* %56, align 4
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 2, i32 0, i8 0, i32 %conv8)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 2, i32 0, i8 1, i32 %conv3.i1)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 2, i32 0, i8 2, i32 %conv3.i2)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 0, float %35)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 1, float %37)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 2, float %39)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 3, float %41)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 0, float %43)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 1, float %45)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 2, float %47)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 3, float %49)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 0, float %51)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 1, float %53)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 2, float %55)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 3, float %57)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 4, i32 0, i8 0, i32 %conv5.i0)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 4, i32 0, i8 1, i32 %conv5.i1)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 4, i32 0, i8 2, i32 %conv5.i2)
|
||||
call void @dx.op.emitStream(i32 97, i8 1)
|
||||
call void @dx.op.cutStream(i32 98, i8 1)
|
||||
br label %if.end
|
||||
|
||||
if.end: ; preds = %if.else, %if.then
|
||||
%b.0.0.i0 = phi i32 [ %conv, %if.then ], [ %conv8, %if.else ]
|
||||
%58 = getelementptr inbounds [3 x float], [3 x float]* %b.1.0, i32 0, i32 0
|
||||
%59 = load float, float* %58, align 4
|
||||
%60 = getelementptr inbounds [3 x float], [3 x float]* %b.1.1, i32 0, i32 0
|
||||
%61 = load float, float* %60, align 4
|
||||
%62 = getelementptr inbounds [3 x float], [3 x float]* %b.1.2, i32 0, i32 0
|
||||
%63 = load float, float* %62, align 4
|
||||
%64 = getelementptr inbounds [3 x float], [3 x float]* %b.1.3, i32 0, i32 0
|
||||
%65 = load float, float* %64, align 4
|
||||
%66 = getelementptr inbounds [3 x float], [3 x float]* %b.1.0, i32 0, i32 1
|
||||
%67 = load float, float* %66, align 4
|
||||
%68 = getelementptr inbounds [3 x float], [3 x float]* %b.1.1, i32 0, i32 1
|
||||
%69 = load float, float* %68, align 4
|
||||
%70 = getelementptr inbounds [3 x float], [3 x float]* %b.1.2, i32 0, i32 1
|
||||
%71 = load float, float* %70, align 4
|
||||
%72 = getelementptr inbounds [3 x float], [3 x float]* %b.1.3, i32 0, i32 1
|
||||
%73 = load float, float* %72, align 4
|
||||
%74 = getelementptr inbounds [3 x float], [3 x float]* %b.1.0, i32 0, i32 2
|
||||
%75 = load float, float* %74, align 4
|
||||
%76 = getelementptr inbounds [3 x float], [3 x float]* %b.1.1, i32 0, i32 2
|
||||
%77 = load float, float* %76, align 4
|
||||
%78 = getelementptr inbounds [3 x float], [3 x float]* %b.1.2, i32 0, i32 2
|
||||
%79 = load float, float* %78, align 4
|
||||
%80 = getelementptr inbounds [3 x float], [3 x float]* %b.1.3, i32 0, i32 2
|
||||
%81 = load float, float* %80, align 4
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 2, i32 0, i8 0, i32 %b.0.0.i0)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 2, i32 0, i8 1, i32 %conv3.i1)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 2, i32 0, i8 2, i32 %conv3.i2)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 0, float %59)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 1, float %61)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 2, float %63)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 0, i8 3, float %65)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 0, float %67)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 1, float %69)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 2, float %71)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 1, i8 3, float %73)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 0, float %75)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 1, float %77)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 2, float %79)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 3, i32 2, i8 3, float %81)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 4, i32 0, i8 0, i32 %conv5.i0)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 4, i32 0, i8 1, i32 %conv5.i1)
|
||||
call void @dx.op.storeOutput.i32(i32 5, i32 4, i32 0, i8 2, i32 %conv5.i2)
|
||||
call void @dx.op.emitStream(i32 97, i8 1)
|
||||
call void @dx.op.cutStream(i32 98, i8 1)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 0, float %27)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 1, float %28)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 2, float %29)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 5, i32 0, i8 3, float %30)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 6, i32 0, i8 0, float %12)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 6, i32 0, i8 1, float %13)
|
||||
call void @dx.op.emitStream(i32 97, i8 2)
|
||||
call void @dx.op.cutStream(i32 98, i8 2)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.i32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.cutStream(i32, i8) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.emitStream(i32, i8) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !16}
|
||||
!dx.entryPoints = !{!39}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"gs", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %"$Globals"* @"$Globals", !"$Globals", i32 0, i32 0, i32 1, i32 4, null}
|
||||
!6 = !{i32 0, %struct.MyStruct addrspace(1)* @dx.typevar.0, !7, %struct.MyStruct2 addrspace(1)* @dx.typevar.1, !10, %"$Globals" addrspace(1)* @dx.typevar.2, !14}
|
||||
!7 = !{i32 24, !8, !9}
|
||||
!8 = !{i32 3, i32 0, i32 4, !"SV_Position", i32 6, !"pos", i32 7, i32 9}
|
||||
!9 = !{i32 3, i32 16, i32 4, !"AAA", i32 6, !"a", i32 7, i32 9}
|
||||
!10 = !{i32 76, !11, !12, !13}
|
||||
!11 = !{i32 3, i32 0, i32 4, !"XXX", i32 6, !"X", i32 7, i32 5}
|
||||
!12 = !{i32 3, i32 16, i32 4, !"PPP", i32 6, !"p", i32 7, i32 9}
|
||||
!13 = !{i32 3, i32 64, i32 4, !"YYY", i32 6, !"Y", i32 7, i32 5}
|
||||
!14 = !{i32 0, !15}
|
||||
!15 = !{i32 3, i32 0, i32 6, !"g1", i32 7, i32 4}
|
||||
!16 = !{i32 1, void ([1 x <4 x float>]*, %class.TriangleStream*, <4 x float>*, <2 x float>*, %class.PointStream*, <3 x i32>*, [3 x <4 x float>]*, <3 x i32>*, %class.TriangleStream*, <4 x float>*, <2 x float>*)* @main.flat, !17}
|
||||
!17 = !{!18, !20, !23, !24, !26, !28, !29, !31, !34, !36, !37, !38}
|
||||
!18 = !{i32 0, !19, !19}
|
||||
!19 = !{}
|
||||
!20 = !{i32 0, !21, !22}
|
||||
!21 = !{i32 4, !"COORD", i32 7, i32 9}
|
||||
!22 = !{i32 0}
|
||||
!23 = !{i32 5, !19, !19}
|
||||
!24 = !{i32 5, !25, !22}
|
||||
!25 = !{i32 4, !"SV_Position", i32 7, i32 9}
|
||||
!26 = !{i32 5, !27, !22}
|
||||
!27 = !{i32 4, !"AAA", i32 7, i32 9}
|
||||
!28 = !{i32 6, !19, !19}
|
||||
!29 = !{i32 6, !30, !22}
|
||||
!30 = !{i32 4, !"XXX", i32 7, i32 5}
|
||||
!31 = !{i32 6, !32, !33}
|
||||
!32 = !{i32 4, !"PPP", i32 7, i32 9}
|
||||
!33 = !{i32 0, i32 1, i32 2}
|
||||
!34 = !{i32 6, !35, !22}
|
||||
!35 = !{i32 4, !"YYY", i32 7, i32 5}
|
||||
!36 = !{i32 7, !19, !19}
|
||||
!37 = !{i32 7, !25, !22}
|
||||
!38 = !{i32 7, !27, !22}
|
||||
!39 = !{void ([1 x <4 x float>]*, %class.TriangleStream*, <4 x float>*, <2 x float>*, %class.PointStream*, <3 x i32>*, [3 x <4 x float>]*, <3 x i32>*, %class.TriangleStream*, <4 x float>*, <2 x float>*)* @main.flat, !"", !40, !3, !53}
|
||||
!40 = !{!41, !43, null}
|
||||
!41 = !{!42}
|
||||
!42 = !{i32 0, !"COORD", i8 9, i8 0, !22, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!43 = !{!44, !45, !46, !48, !49, !50, !52}
|
||||
!44 = !{i32 0, !"SV_Position", i8 9, i8 3, !22, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!45 = !{i32 1, !"AAA", i8 9, i8 0, !22, i8 2, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!46 = !{i32 2, !"XXX", i8 5, i8 0, !22, i8 1, i32 1, i8 3, i32 0, i8 0, !47}
|
||||
!47 = !{i32 0, i32 1}
|
||||
!48 = !{i32 3, !"PPP", i8 9, i8 0, !33, i8 2, i32 3, i8 4, i32 1, i8 0, !47}
|
||||
!49 = !{i32 4, !"YYY", i8 5, i8 0, !22, i8 1, i32 1, i8 3, i32 4, i8 0, !47}
|
||||
!50 = !{i32 5, !"SV_Position", i8 9, i8 3, !22, i8 4, i32 1, i8 4, i32 0, i8 0, !51}
|
||||
!51 = !{i32 0, i32 2}
|
||||
!52 = !{i32 6, !"AAA", i8 9, i8 0, !22, i8 2, i32 1, i8 2, i32 1, i8 0, !51}
|
||||
!53 = !{i32 1, !54}
|
||||
!54 = !{i32 1, i32 12, i32 7, i32 4, i32 1}
|
|
@ -1,117 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
; CHECK: TGSM pointers must originate from an unambiguous TGSM global variable
|
||||
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; no %s
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; no %s
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
;
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
; cbuffer $Globals
|
||||
; {
|
||||
;
|
||||
; struct $Globals
|
||||
; {
|
||||
;
|
||||
; float t; ; Offset: 0
|
||||
;
|
||||
; } $Globals ; Offset: 0 Size: 4
|
||||
;
|
||||
; }
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; $Globals cbuffer NA NA CB0 cb0 1
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%"$Globals" = type { float }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
|
||||
@"\01?g_Data@@3PAIA" = addrspace(3) global [32 x i32] zeroinitializer, align 4
|
||||
@"\01?g_Data2@@3PAIA" = addrspace(3) global [32 x i32] zeroinitializer, align 4
|
||||
@"\01?t@@3MA" = global float 0.000000e+00, align 4
|
||||
@dx.typevar.0 = external addrspace(1) constant %"$Globals"
|
||||
@llvm.used = appending global [1 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%"$Globals" addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: alwaysinline nounwind
|
||||
define void @main(i32 %idx) #0 {
|
||||
entry:
|
||||
%0 = call i32 @dx.op.threadId.i32(i32 93, i32 0) ; ThreadId(component)
|
||||
%1 = call %dx.types.Handle @dx.op.createHandle(i32 58, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%2 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %1, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%3 = extractvalue %dx.types.CBufRet.f32 %2, 0
|
||||
%cmp = fcmp fast ogt float %3, 1.000000e+00
|
||||
br i1 %cmp, label %if.then, label %if.else
|
||||
|
||||
if.then: ; preds = %entry
|
||||
%arrayidx = getelementptr inbounds [32 x i32], [32 x i32] addrspace(3)* @"\01?g_Data@@3PAIA", i32 0, i32 %0
|
||||
br label %if.end
|
||||
|
||||
if.else: ; preds = %entry
|
||||
%arrayidx2 = getelementptr inbounds [32 x i32], [32 x i32] addrspace(3)* @"\01?g_Data2@@3PAIA", i32 0, i32 %0
|
||||
br label %if.end
|
||||
|
||||
if.end: ; preds = %if.else, %if.then
|
||||
%arrayPhi = phi i32 addrspace(3)* [ %arrayidx, %if.then ], [ %arrayidx2, %if.else ]
|
||||
%4 = atomicrmw add i32 addrspace(3)* %arrayPhi, i32 1 seq_cst
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.threadId.i32(i32, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
attributes #0 = { alwaysinline nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-realign-stack" "stack-protector-buffer-size"="0" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !9}
|
||||
!dx.entryPoints = !{!16}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"cs", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %"$Globals"* undef, !"$Globals", i32 0, i32 0, i32 1, i32 4, null}
|
||||
!6 = !{i32 0, %"$Globals" addrspace(1)* @dx.typevar.0, !7}
|
||||
!7 = !{i32 0, !8}
|
||||
!8 = !{i32 3, i32 0, i32 6, !"t", i32 7, i32 9}
|
||||
!9 = !{i32 1, void (i32)* @main, !10}
|
||||
!10 = !{!11, !13}
|
||||
!11 = !{i32 1, !12, !12}
|
||||
!12 = !{}
|
||||
!13 = !{i32 0, !14, !15}
|
||||
!14 = !{i32 4, !"SV_DispatchThreadId", i32 7, i32 5}
|
||||
!15 = !{i32 0}
|
||||
!16 = !{void (i32)* @main, !"", null, !3, !17}
|
||||
!17 = !{i32 4, !18}
|
||||
!18 = !{i32 64, i32 1, i32 1}
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
; CHECK: Execution flow must be reducible
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%struct.Interpolants2 = type { <4 x float>, <4 x float>, <4 x float> }
|
||||
%struct.Inh = type { %struct.Interpolants, float }
|
||||
%struct.Interpolants = type { <4 x float>, <4 x float> }
|
||||
%"$Globals" = type { %struct.Interpolants2, %struct.Inh, i32, <4 x i32> }
|
||||
%struct.Vertex = type { <4 x float>, <4 x float> }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
|
||||
@"\01?c2@@3UInterpolants2@@A" = global %struct.Interpolants2 zeroinitializer, align 4
|
||||
@"\01?c@@3UInh@@A" = global %struct.Inh zeroinitializer, align 4
|
||||
@"\01?i@@3HA" = global i32 0, align 4
|
||||
@"\01?i4@@3V?$vector@I$03@@A" = global <4 x i32> zeroinitializer, align 4
|
||||
@"$Globals" = external constant %"$Globals"
|
||||
@dx.typevar.0 = external addrspace(1) constant %struct.Interpolants2
|
||||
@dx.typevar.1 = external addrspace(1) constant %struct.Inh
|
||||
@dx.typevar.2 = external addrspace(1) constant %struct.Interpolants
|
||||
@dx.typevar.3 = external addrspace(1) constant %struct.Vertex
|
||||
@dx.typevar.4 = external addrspace(1) constant %"$Globals"
|
||||
@llvm.used = appending global [7 x i8*] [i8* bitcast (%"$Globals"* @"$Globals" to i8*), i8* bitcast (%"$Globals"* @"$Globals" to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.Interpolants2 addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.Inh addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.Interpolants addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.Vertex addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"$Globals" addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>* nocapture readnone, <4 x float>* nocapture readnone, <4 x float>* nocapture readnone, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%4 = call %dx.types.Handle @dx.op.createHandle(i32 58, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%5 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 60, %dx.types.Handle %4, i32 5) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%6 = extractvalue %dx.types.CBufRet.i32 %5, 1
|
||||
%cmp = icmp sgt i32 %6, 1
|
||||
br i1 %cmp, label %if.then, label %if.else
|
||||
|
||||
if.then: ; preds = %entry
|
||||
%7 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 60, %dx.types.Handle %4, i32 6) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%8 = extractvalue %dx.types.CBufRet.i32 %7, 2
|
||||
%9 = uitofp i32 %8 to float
|
||||
br label %if.then.5
|
||||
|
||||
if.else: ; preds = %entry
|
||||
%cmp2 = icmp sgt i32 %6, 0
|
||||
br i1 %cmp2, label %if.then.5, label %if.else.6
|
||||
|
||||
if.then.5: ; preds = %if.else
|
||||
%10 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %4, i32 3) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%11 = extractvalue %dx.types.CBufRet.f32 %10, 0
|
||||
%12 = extractvalue %dx.types.CBufRet.f32 %10, 1
|
||||
%13 = extractvalue %dx.types.CBufRet.f32 %10, 2
|
||||
%14 = extractvalue %dx.types.CBufRet.f32 %10, 3
|
||||
%15 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %4, i32 4) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%16 = extractvalue %dx.types.CBufRet.f32 %15, 0
|
||||
%17 = extractvalue %dx.types.CBufRet.f32 %15, 1
|
||||
%18 = extractvalue %dx.types.CBufRet.f32 %15, 2
|
||||
%19 = extractvalue %dx.types.CBufRet.f32 %15, 3
|
||||
%cmp12 = icmp sgt i32 %6, 1
|
||||
br i1 %cmp2, label %if.then, label %if.else.6
|
||||
|
||||
if.else.6: ; preds = %if.else
|
||||
%cmp7 = icmp sgt i32 %6, -1
|
||||
br i1 %cmp7, label %if.then.10, label %if.end.13
|
||||
|
||||
if.then.10: ; preds = %if.else.6
|
||||
%20 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %4, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%21 = extractvalue %dx.types.CBufRet.f32 %20, 0
|
||||
%22 = extractvalue %dx.types.CBufRet.f32 %20, 1
|
||||
%23 = extractvalue %dx.types.CBufRet.f32 %20, 2
|
||||
%24 = extractvalue %dx.types.CBufRet.f32 %20, 3
|
||||
%25 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 60, %dx.types.Handle %4, i32 1) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%26 = extractvalue %dx.types.CBufRet.f32 %25, 0
|
||||
%27 = extractvalue %dx.types.CBufRet.f32 %25, 1
|
||||
%28 = extractvalue %dx.types.CBufRet.f32 %25, 2
|
||||
%29 = extractvalue %dx.types.CBufRet.f32 %25, 3
|
||||
br label %return
|
||||
|
||||
if.end.13: ; preds = %if.else.6
|
||||
%30 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%31 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%32 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%33 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%34 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%35 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%36 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%37 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 3, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
br label %return
|
||||
|
||||
return: ; preds = %if.end.13, %if.then.10, %if.then.5, %if.then
|
||||
%retval.1.0.i0 = phi float [ %9, %if.then ], [ %16, %if.then.5 ], [ %26, %if.then.10 ], [ %34, %if.end.13 ]
|
||||
%retval.1.0.i1 = phi float [ %9, %if.then ], [ %17, %if.then.5 ], [ %27, %if.then.10 ], [ %35, %if.end.13 ]
|
||||
%retval.1.0.i2 = phi float [ %9, %if.then ], [ %18, %if.then.5 ], [ %28, %if.then.10 ], [ %36, %if.end.13 ]
|
||||
%retval.1.0.i3 = phi float [ %9, %if.then ], [ %19, %if.then.5 ], [ %29, %if.then.10 ], [ %37, %if.end.13 ]
|
||||
%retval.0.0.i0 = phi float [ %9, %if.then ], [ %11, %if.then.5 ], [ %21, %if.then.10 ], [ %30, %if.end.13 ]
|
||||
%retval.0.0.i1 = phi float [ %9, %if.then ], [ %12, %if.then.5 ], [ %22, %if.then.10 ], [ %31, %if.end.13 ]
|
||||
%retval.0.0.i2 = phi float [ %9, %if.then ], [ %13, %if.then.5 ], [ %23, %if.then.10 ], [ %32, %if.end.13 ]
|
||||
%retval.0.0.i3 = phi float [ %9, %if.then ], [ %14, %if.then.5 ], [ %24, %if.then.10 ], [ %33, %if.end.13 ]
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %retval.0.0.i0) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %retval.0.0.i1) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %retval.0.0.i2) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %retval.0.0.i3) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %retval.1.0.i0) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %retval.1.0.i1) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %retval.1.0.i2) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %retval.1.0.i3) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!6, !22}
|
||||
!dx.entryPoints = !{!34}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"vs", i32 6, i32 0}
|
||||
!3 = !{null, null, !4, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %"$Globals"* @"$Globals", !"$Globals", i32 0, i32 0, i32 1, i32 112, null}
|
||||
!6 = !{i32 0, %struct.Interpolants2 addrspace(1)* @dx.typevar.0, !7, %struct.Inh addrspace(1)* @dx.typevar.1, !11, %struct.Interpolants addrspace(1)* @dx.typevar.2, !14, %struct.Vertex addrspace(1)* @dx.typevar.3, !15, %"$Globals" addrspace(1)* @dx.typevar.4, !17}
|
||||
!7 = !{i32 48, !8, !9, !10}
|
||||
!8 = !{i32 3, i32 0, i32 4, !"SV_POSITION0", i32 6, !"position", i32 7, i32 9}
|
||||
!9 = !{i32 3, i32 16, i32 4, !"COLOR0", i32 6, !"color", i32 7, i32 9}
|
||||
!10 = !{i32 3, i32 32, i32 4, !"COLOR2", i32 6, !"color2", i32 7, i32 9}
|
||||
!11 = !{i32 36, !12, !13}
|
||||
!12 = !{i32 3, i32 0, i32 6, !"Interpolants"}
|
||||
!13 = !{i32 3, i32 32, i32 6, !"a", i32 7, i32 9}
|
||||
!14 = !{i32 32, !8, !9}
|
||||
!15 = !{i32 32, !16, !9}
|
||||
!16 = !{i32 3, i32 0, i32 4, !"POSITION0", i32 6, !"position", i32 7, i32 9}
|
||||
!17 = !{i32 0, !18, !19, !20, !21}
|
||||
!18 = !{i32 3, i32 0, i32 6, !"c2"}
|
||||
!19 = !{i32 3, i32 48, i32 6, !"c"}
|
||||
!20 = !{i32 3, i32 84, i32 6, !"i", i32 7, i32 4}
|
||||
!21 = !{i32 3, i32 96, i32 6, !"i4", i32 7, i32 5}
|
||||
!22 = !{i32 1, void (<4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*)* @main.flat, !23}
|
||||
!23 = !{!24, !26, !29, !31, !33}
|
||||
!24 = !{i32 0, !25, !25}
|
||||
!25 = !{}
|
||||
!26 = !{i32 0, !27, !28}
|
||||
!27 = !{i32 4, !"POSITION0", i32 7, i32 9}
|
||||
!28 = !{i32 0}
|
||||
!29 = !{i32 0, !30, !28}
|
||||
!30 = !{i32 4, !"COLOR0", i32 7, i32 9}
|
||||
!31 = !{i32 1, !32, !28}
|
||||
!32 = !{i32 4, !"SV_POSITION0", i32 7, i32 9}
|
||||
!33 = !{i32 1, !30, !28}
|
||||
!34 = !{void (<4 x float>*, <4 x float>*, <4 x float>*, <4 x float>*)* @main.flat, !"", !35, !3, null}
|
||||
!35 = !{!36, !39, null}
|
||||
!36 = !{!37, !38}
|
||||
!37 = !{i32 0, !"POSITION", i8 9, i8 3, !28, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!38 = !{i32 1, !"COLOR", i8 9, i8 0, !28, i8 0, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!39 = !{!40, !41}
|
||||
!40 = !{i32 0, !"SV_Position", i8 9, i8 3, !28, i8 4, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!41 = !{i32 1, !"COLOR", i8 9, i8 0, !28, i8 2, i32 1, i8 4, i32 1, i8 0, null}
|
||||
|
|
@ -1,153 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: bias amount for sample_b must be in the range [-16.000000,15.990000], but 18.000000 was specified as an immediate
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Texture2D = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
|
||||
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
|
||||
%"$Globals" = type { float }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
%struct.SamplerState = type { i32 }
|
||||
|
||||
@"\01?bias@@3MA" = global float 0.000000e+00, align 4
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Texture2D
|
||||
@dx.typevar.1 = external addrspace(1) constant %"class.Texture2D<vector<float, 4> >::mips_type"
|
||||
@dx.typevar.2 = external addrspace(1) constant %"$Globals"
|
||||
@llvm.used = appending global [3 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Texture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"$Globals" addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<2 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
%text1_texture_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0, i32 0, i32 3, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%samp1_sampler = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 3, i32 0, i32 5, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%3 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%5 = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%6 = call %dx.types.ResRet.f32 @dx.op.sampleBias.f32(i32 63, %dx.types.Handle %text1_texture_2d, %dx.types.Handle %samp1_sampler, float %3, float %4, float undef, float undef, i32 undef, i32 undef, i32 undef, float 1.8000000e01, float undef) ; SampleBias(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,bias,clamp)
|
||||
%7 = extractvalue %dx.types.ResRet.f32 %6, 0
|
||||
%8 = extractvalue %dx.types.ResRet.f32 %6, 1
|
||||
%9 = extractvalue %dx.types.ResRet.f32 %6, 2
|
||||
%10 = extractvalue %dx.types.ResRet.f32 %6, 3
|
||||
%11 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 61, %dx.types.Handle %5, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%12 = extractvalue %dx.types.CBufRet.f32 %11, 0
|
||||
%13 = call %dx.types.ResRet.f32 @dx.op.sampleBias.f32(i32 63, %dx.types.Handle %text1_texture_2d, %dx.types.Handle %samp1_sampler, float %3, float %4, float undef, float undef, i32 -5, i32 7, i32 undef, float %12, float undef) ; SampleBias(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,bias,clamp)
|
||||
%14 = extractvalue %dx.types.ResRet.f32 %13, 0
|
||||
%15 = extractvalue %dx.types.ResRet.f32 %13, 1
|
||||
%16 = extractvalue %dx.types.ResRet.f32 %13, 2
|
||||
%17 = extractvalue %dx.types.ResRet.f32 %13, 3
|
||||
%.i0 = fadd fast float %14, %7
|
||||
%.i1 = fadd fast float %15, %8
|
||||
%.i2 = fadd fast float %16, %9
|
||||
%.i3 = fadd fast float %17, %10
|
||||
%18 = call %dx.types.ResRet.f32 @dx.op.sampleBias.f32(i32 63, %dx.types.Handle %text1_texture_2d, %dx.types.Handle %samp1_sampler, float %3, float %4, float undef, float undef, i32 -4, i32 1, i32 undef, float %12, float 1.8000000e01) ; SampleBias(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,bias,clamp)
|
||||
%19 = extractvalue %dx.types.ResRet.f32 %18, 0
|
||||
%20 = extractvalue %dx.types.ResRet.f32 %18, 1
|
||||
%21 = extractvalue %dx.types.ResRet.f32 %18, 2
|
||||
%22 = extractvalue %dx.types.ResRet.f32 %18, 3
|
||||
%.i01 = fadd fast float %.i0, %19
|
||||
%.i12 = fadd fast float %.i1, %20
|
||||
%.i23 = fadd fast float %.i2, %21
|
||||
%.i34 = fadd fast float %.i3, %22
|
||||
%23 = call %dx.types.ResRet.f32 @dx.op.sampleBias.f32(i32 63, %dx.types.Handle %text1_texture_2d, %dx.types.Handle %samp1_sampler, float %3, float %4, float undef, float undef, i32 -3, i32 2, i32 undef, float %12, float 0.000000e+00) ; SampleBias(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,bias,clamp)
|
||||
%24 = extractvalue %dx.types.ResRet.f32 %23, 0
|
||||
%25 = extractvalue %dx.types.ResRet.f32 %23, 1
|
||||
%26 = extractvalue %dx.types.ResRet.f32 %23, 2
|
||||
%27 = extractvalue %dx.types.ResRet.f32 %23, 3
|
||||
%28 = extractvalue %dx.types.ResRet.f32 %23, 4
|
||||
%.i05 = fadd fast float %.i01, %24
|
||||
%.i16 = fadd fast float %.i12, %25
|
||||
%.i27 = fadd fast float %.i23, %26
|
||||
%.i38 = fadd fast float %.i34, %27
|
||||
%29 = uitofp i32 %28 to float
|
||||
%.i09 = fadd fast float %.i05, %29
|
||||
%.i110 = fadd fast float %.i16, %29
|
||||
%.i211 = fadd fast float %.i27, %29
|
||||
%.i312 = fadd fast float %.i38, %29
|
||||
%30 = call %dx.types.ResRet.f32 @dx.op.sampleBias.f32(i32 63, %dx.types.Handle %text1_texture_2d, %dx.types.Handle %samp1_sampler, float %3, float %4, float undef, float undef, i32 -3, i32 2, i32 undef, float %12, float %3) ; SampleBias(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,bias,clamp)
|
||||
%31 = extractvalue %dx.types.ResRet.f32 %30, 0
|
||||
%32 = extractvalue %dx.types.ResRet.f32 %30, 1
|
||||
%33 = extractvalue %dx.types.ResRet.f32 %30, 2
|
||||
%34 = extractvalue %dx.types.ResRet.f32 %30, 3
|
||||
%35 = extractvalue %dx.types.ResRet.f32 %30, 4
|
||||
%.i013 = fadd fast float %.i09, %31
|
||||
%.i114 = fadd fast float %.i110, %32
|
||||
%.i215 = fadd fast float %.i211, %33
|
||||
%.i316 = fadd fast float %.i312, %34
|
||||
%36 = uitofp i32 %35 to float
|
||||
%.i017 = fadd fast float %.i013, %36
|
||||
%.i118 = fadd fast float %.i114, %36
|
||||
%.i219 = fadd fast float %.i215, %36
|
||||
%.i320 = fadd fast float %.i316, %36
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %.i017) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %.i118) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %.i219) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %.i320) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.sampleBias.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float, float) #2
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.valver = !{!1}
|
||||
!dx.version = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.resources = !{!4}
|
||||
!dx.typeAnnotations = !{!12, !20}
|
||||
!dx.entryPoints = !{!29}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 0}
|
||||
!3 = !{!"ps", i32 6, i32 0}
|
||||
!4 = !{!5, null, !8, !10}
|
||||
!5 = !{!6}
|
||||
!6 = !{i32 0, %class.Texture2D* undef, !"text1", i32 0, i32 3, i32 1, i32 2, i32 0, !7}
|
||||
!7 = !{i32 0, i32 9}
|
||||
!8 = !{!9}
|
||||
!9 = !{i32 0, %"$Globals"* undef, !"$Globals", i32 0, i32 0, i32 1, i32 4, null}
|
||||
!10 = !{!11}
|
||||
!11 = !{i32 0, %struct.SamplerState* undef, !"samp1", i32 0, i32 5, i32 1, i32 0, null}
|
||||
!12 = !{i32 0, %class.Texture2D addrspace(1)* @dx.typevar.0, !13, %"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1, !16, %"$Globals" addrspace(1)* @dx.typevar.2, !18}
|
||||
!13 = !{i32 20, !14, !15}
|
||||
!14 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!15 = !{i32 3, i32 16, i32 6, !"mips"}
|
||||
!16 = !{i32 4, !17}
|
||||
!17 = !{i32 3, i32 0, i32 6, !"handle", i32 7, i32 5}
|
||||
!18 = !{i32 0, !19}
|
||||
!19 = !{i32 3, i32 0, i32 6, !"bias", i32 7, i32 9}
|
||||
!20 = !{i32 1, void (<2 x float>, <4 x float>*)* @main.flat, !21}
|
||||
!21 = !{!22, !24, !27}
|
||||
!22 = !{i32 0, !23, !23}
|
||||
!23 = !{}
|
||||
!24 = !{i32 0, !25, !26}
|
||||
!25 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!26 = !{i32 0}
|
||||
!27 = !{i32 1, !28, !26}
|
||||
!28 = !{i32 4, !"SV_Target", i32 7, i32 9}
|
||||
!29 = !{void (<2 x float>, <4 x float>*)* @main.flat, !"main", !30, !4, null}
|
||||
!30 = !{!31, !33, null}
|
||||
!31 = !{!32}
|
||||
!32 = !{i32 0, !"A", i8 9, i8 0, !26, i8 2, i32 1, i8 2, i32 0, i8 0, null}
|
||||
!33 = !{!34}
|
||||
!34 = !{i32 0, !"SV_Target", i8 9, i8 16, !26, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
|
|
@ -1,219 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Invalid sampler mode on sampler 'g_samLinear'
|
||||
; CHECK: Invalid sampler mode on sampler 'g_samLinearC'
|
||||
; CHECK: Type 'st' is a struct type but is used as a parameter in function 'main.flat'
|
||||
; CHECK: sample_c_*/gather_c instructions require sampler declared in comparison mode
|
||||
; CHECK: sample, lod and gather should on srv resource
|
||||
; CHECK: lod instruction requires sampler declared in default mode
|
||||
; CHECK: sample, lod and gather should on srv resource
|
||||
; CHECK: sample/_l/_d/_cl_s/gather instruction requires sampler declared in default mode
|
||||
; CHECK: sample, lod and gather should on srv resource
|
||||
; CHECK: sample/_l/_d/_cl_s/gather instruction requires sampler declared in default mode
|
||||
; CHECK: sample, lod and gather should on srv resource
|
||||
; CHECK: sample_c_*/gather_c instructions require sampler declared in comparison mode
|
||||
; CHECK: sample, lod and gather should on srv resource
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.Texture2D = type { <4 x float>, %"class.Texture2D<vector<float, 4> >::mips_type" }
|
||||
%"class.Texture2D<vector<float, 4> >::mips_type" = type { i32 }
|
||||
%class.RWTexture2D = type { <4 x float> }
|
||||
%struct.PS_INPUT = type { <3 x float>, <2 x float> }
|
||||
%"$Globals" = type { float }
|
||||
%cbPerFrame = type { <3 x float>, float }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
%struct.SamplerState = type { i32 }
|
||||
%struct.SamplerComparisonState = type { i32 }
|
||||
|
||||
@"\01?cmpVal@@3MA" = global float 0.000000e+00, align 4
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.Texture2D
|
||||
@dx.typevar.1 = external addrspace(1) constant %"class.Texture2D<vector<float, 4> >::mips_type"
|
||||
@dx.typevar.2 = external addrspace(1) constant %class.RWTexture2D
|
||||
@dx.typevar.3 = external addrspace(1) constant %struct.PS_INPUT
|
||||
@dx.typevar.4 = external addrspace(1) constant %"$Globals"
|
||||
@dx.typevar.5 = external addrspace(1) constant %cbPerFrame
|
||||
@llvm.used = appending global [6 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.Texture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%class.RWTexture2D addrspace(1)* @dx.typevar.2 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%struct.PS_INPUT addrspace(1)* @dx.typevar.3 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%"$Globals" addrspace(1)* @dx.typevar.4 to i8 addrspace(1)*) to i8*), i8* addrspacecast (i8 addrspace(1)* bitcast (%cbPerFrame addrspace(1)* @dx.typevar.5 to i8 addrspace(1)*) to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<3 x float>* nocapture readnone, <2 x float>* nocapture readnone, <4 x float>* nocapture readnone, %struct.PS_INPUT * %st) #0 {
|
||||
entry:
|
||||
%uav1_UAV_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1, i32 0, i32 3, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%g_txDiffuse_texture_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1, i32 0, i32 3, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%g_samLinearC_sampler = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 3, i32 1, i32 1, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%g_samLinear_sampler = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 3, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%3 = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 2, i32 1, i32 1, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%4 = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%5 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%6 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%7 = call %dx.types.ResRet.f32 @dx.op.sample.f32(i32 62, %dx.types.Handle %g_txDiffuse_texture_2d, %dx.types.Handle %g_samLinear_sampler, float %5, float %6, float undef, float undef, i32 undef, i32 undef, i32 undef, float undef) ; Sample(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,clamp)
|
||||
%8 = extractvalue %dx.types.ResRet.f32 %7, 0
|
||||
%9 = extractvalue %dx.types.ResRet.f32 %7, 1
|
||||
%10 = extractvalue %dx.types.ResRet.f32 %7, 2
|
||||
%11 = extractvalue %dx.types.ResRet.f32 %7, 3
|
||||
%12 = call float @dx.op.calculateLOD.f32(i32 83, %dx.types.Handle %g_txDiffuse_texture_2d, %dx.types.Handle %g_samLinear_sampler, float %5, float %6, float undef, i1 true) ; CalculateLOD(handle,sampler,coord0,coord1,coord2,clamped)
|
||||
%add.i0 = fadd fast float %8, %12
|
||||
%add.i1 = fadd fast float %9, %12
|
||||
%add.i2 = fadd fast float %10, %12
|
||||
%add.i3 = fadd fast float %11, %12
|
||||
%13 = call %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32 75, %dx.types.Handle %g_txDiffuse_texture_2d, %dx.types.Handle %g_samLinear_sampler, float %5, float %6, float undef, float undef, i32 undef, i32 undef, i32 0) ; TextureGather(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,channel)
|
||||
%14 = extractvalue %dx.types.ResRet.f32 %13, 0
|
||||
%15 = extractvalue %dx.types.ResRet.f32 %13, 1
|
||||
%16 = extractvalue %dx.types.ResRet.f32 %13, 2
|
||||
%17 = extractvalue %dx.types.ResRet.f32 %13, 3
|
||||
%add5.i0 = fadd fast float %add.i0, %14
|
||||
%add5.i1 = fadd fast float %add.i1, %15
|
||||
%add5.i2 = fadd fast float %add.i2, %16
|
||||
%add5.i3 = fadd fast float %add.i3, %17
|
||||
%18 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 61, %dx.types.Handle %4, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%19 = extractvalue %dx.types.CBufRet.f32 %18, 0
|
||||
%20 = call %dx.types.ResRet.f32 @dx.op.sampleCmp.f32(i32 66, %dx.types.Handle %g_txDiffuse_texture_2d, %dx.types.Handle %g_samLinearC_sampler, float %5, float %6, float undef, float undef, i32 undef, i32 undef, i32 undef, float %19, float undef) ; SampleCmp(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,compareValue,clamp)
|
||||
%21 = extractvalue %dx.types.ResRet.f32 %20, 0
|
||||
%add10.i0 = fadd fast float %add5.i0, %21
|
||||
%add10.i1 = fadd fast float %add5.i1, %21
|
||||
%add10.i2 = fadd fast float %add5.i2, %21
|
||||
%add10.i3 = fadd fast float %add5.i3, %21
|
||||
%22 = call %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32 76, %dx.types.Handle %g_txDiffuse_texture_2d, %dx.types.Handle %g_samLinearC_sampler, float %5, float %6, float undef, float undef, i32 undef, i32 undef, i32 0, float %19) ; TextureGatherCmp(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,channel,compareVale)
|
||||
%23 = extractvalue %dx.types.ResRet.f32 %22, 0
|
||||
%24 = extractvalue %dx.types.ResRet.f32 %22, 1
|
||||
%25 = extractvalue %dx.types.ResRet.f32 %22, 2
|
||||
%26 = extractvalue %dx.types.ResRet.f32 %22, 3
|
||||
%add13.i0 = fadd fast float %add10.i0, %23
|
||||
%add13.i1 = fadd fast float %add10.i1, %24
|
||||
%add13.i2 = fadd fast float %add10.i2, %25
|
||||
%add13.i3 = fadd fast float %add10.i3, %26
|
||||
%27 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%28 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%29 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%30 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 61, %dx.types.Handle %3, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%31 = extractvalue %dx.types.CBufRet.f32 %30, 0
|
||||
%32 = extractvalue %dx.types.CBufRet.f32 %30, 1
|
||||
%33 = extractvalue %dx.types.CBufRet.f32 %30, 2
|
||||
%34 = call float @dx.op.dot3.f32(i32 57, float %31, float %32, float %33, float %27, float %28, float %29) ; Dot3(ax,ay,az,bx,by,bz)
|
||||
%Saturate = call float @dx.op.unary.f32(i32 7, float %34) ; Saturate(value)
|
||||
%35 = extractvalue %dx.types.CBufRet.f32 %30, 3
|
||||
%FMax = call float @dx.op.binary.f32(i32 35, float %Saturate, float %35) ; FMax(a,b)
|
||||
%mul.i0 = fmul fast float %FMax, %add13.i0
|
||||
%mul.i1 = fmul fast float %FMax, %add13.i1
|
||||
%mul.i2 = fmul fast float %FMax, %add13.i2
|
||||
%mul.i3 = fmul fast float %FMax, %add13.i3
|
||||
%TextureLoad = call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 68, %dx.types.Handle %uav1_UAV_2d, i32 undef, i32 0, i32 0, i32 undef, i32 undef, i32 undef, i32 undef) ; TextureLoad(srv,mipLevelOrSampleCount,coord0,coord1,coord2,offset0,offset1,offset2)
|
||||
%36 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 0
|
||||
%37 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 1
|
||||
%38 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 2
|
||||
%39 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 3
|
||||
%mul20.i0 = fmul fast float %mul.i0, %36
|
||||
%mul20.i1 = fmul fast float %mul.i1, %37
|
||||
%mul20.i2 = fmul fast float %mul.i2, %38
|
||||
%mul20.i3 = fmul fast float %mul.i3, %39
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %mul20.i0) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %mul20.i1) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %mul20.i2) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %mul20.i3) ; StoreOutput(outputtSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.textureGatherCmp.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare float @dx.op.calculateLOD.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, i1) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.textureGather.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.sample.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.sampleCmp.f32(i32, %dx.types.Handle, %dx.types.Handle, float, float, float, float, i32, i32, i32, float, float) #2
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32, %dx.types.Handle, i32, i32, i32, i32, i32, i32, i32) #2
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.dot3.f32(i32, float, float, float, float, float, float) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #1
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.binary.f32(i32, float, float) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.valver = !{!1}
|
||||
!dx.version = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.resources = !{!4}
|
||||
!dx.typeAnnotations = !{!16, !31}
|
||||
!dx.entryPoints = !{!42}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 0}
|
||||
!3 = !{!"ps", i32 6, i32 0}
|
||||
!4 = !{!5, !8, !10, !13}
|
||||
!5 = !{!6}
|
||||
!6 = !{i32 0, %class.Texture2D* undef, !"g_txDiffuse", i32 0, i32 0, i32 1, i32 2, i32 0, !7}
|
||||
!7 = !{i32 0, i32 9}
|
||||
!8 = !{!9}
|
||||
!9 = !{i32 0, %class.RWTexture2D* undef, !"uav1", i32 0, i32 3, i32 1, i32 2, i1 false, i1 false, i1 false, !7}
|
||||
!10 = !{!11, !12}
|
||||
!11 = !{i32 0, %"$Globals"* undef, !"$Globals", i32 0, i32 0, i32 1, i32 4, null}
|
||||
!12 = !{i32 1, %cbPerFrame* undef, !"cbPerFrame", i32 0, i32 1, i32 1, i32 16, null}
|
||||
!13 = !{!14, !15}
|
||||
!14 = !{i32 0, %struct.SamplerState* undef, !"g_samLinear", i32 0, i32 0, i32 1, i32 3, null}
|
||||
!15 = !{i32 1, %struct.SamplerComparisonState* undef, !"g_samLinearC", i32 0, i32 1, i32 1, i32 3, null}
|
||||
!16 = !{i32 0, %class.Texture2D addrspace(1)* @dx.typevar.0, !17, %"class.Texture2D<vector<float, 4> >::mips_type" addrspace(1)* @dx.typevar.1, !20, %class.RWTexture2D addrspace(1)* @dx.typevar.2, !22, %struct.PS_INPUT addrspace(1)* @dx.typevar.3, !23, %"$Globals" addrspace(1)* @dx.typevar.4, !26, %cbPerFrame addrspace(1)* @dx.typevar.5, !28}
|
||||
!17 = !{i32 20, !18, !19}
|
||||
!18 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!19 = !{i32 3, i32 16, i32 6, !"mips"}
|
||||
!20 = !{i32 4, !21}
|
||||
!21 = !{i32 3, i32 0, i32 6, !"handle", i32 7, i32 5}
|
||||
!22 = !{i32 16, !18}
|
||||
!23 = !{i32 24, !24, !25}
|
||||
!24 = !{i32 3, i32 0, i32 4, !"NORMAL", i32 5, i32 6, i32 6, !"vNormal", i32 7, i32 9}
|
||||
!25 = !{i32 3, i32 16, i32 4, !"TEXCOORD0", i32 5, i32 4, i32 6, !"vTexcoord", i32 7, i32 9}
|
||||
!26 = !{i32 0, !27}
|
||||
!27 = !{i32 3, i32 0, i32 6, !"cmpVal", i32 7, i32 9}
|
||||
!28 = !{i32 0, !29, !30}
|
||||
!29 = !{i32 3, i32 0, i32 6, !"g_vLightDir", i32 7, i32 9}
|
||||
!30 = !{i32 3, i32 12, i32 6, !"g_fAmbient", i32 7, i32 9}
|
||||
!31 = !{i32 1, void (<3 x float>*, <2 x float>*, <4 x float>*, %struct.PS_INPUT * )* @main.flat, !32}
|
||||
!32 = !{!33, !35, !38, !40, !40}
|
||||
!33 = !{i32 0, !34, !34}
|
||||
!34 = !{}
|
||||
!35 = !{i32 0, !36, !37}
|
||||
!36 = !{i32 4, !"NORMAL", i32 5, i32 6, i32 7, i32 9}
|
||||
!37 = !{i32 0}
|
||||
!38 = !{i32 0, !39, !37}
|
||||
!39 = !{i32 4, !"TEXCOORD0", i32 5, i32 4, i32 7, i32 9}
|
||||
!40 = !{i32 1, !41, !37}
|
||||
!41 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!42 = !{void (<3 x float>*, <2 x float>*, <4 x float>*, %struct.PS_INPUT * )* @main.flat, !"main", !43, !4, !49}
|
||||
!43 = !{!44, !47, null}
|
||||
!44 = !{!45, !46}
|
||||
!45 = !{i32 0, !"NORMAL", i8 9, i8 0, !37, i8 6, i32 1, i8 3, i32 0, i8 0, null}
|
||||
!46 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !37, i8 4, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!47 = !{!48}
|
||||
!48 = !{i32 0, !"SV_Target", i8 9, i8 16, !37, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!49 = !{i32 0, i64 8192}
|
|
@ -1,68 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Semantic 'A' overlap at 0
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>, <4 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef)
|
||||
%5 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%6 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
%7 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef)
|
||||
%8 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef)
|
||||
%mul.i0 = fmul fast float %5, %4
|
||||
%mul.i1 = fmul fast float %6, %3
|
||||
%mul.i2 = fmul fast float %7, %3
|
||||
%mul.i3 = fmul fast float %8, %3
|
||||
%FAbs = tail call float @dx.op.unary.f32(i32 6, float %mul.i0)
|
||||
%FAbs1 = tail call float @dx.op.unary.f32(i32 6, float %mul.i1)
|
||||
%FAbs2 = tail call float @dx.op.unary.f32(i32 6, float %mul.i2)
|
||||
%FAbs3 = tail call float @dx.op.unary.f32(i32 6, float %mul.i3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %FAbs)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %FAbs1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %FAbs2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %FAbs3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!12}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>, <4 x float>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !7, !10}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 1, !11, !9}
|
||||
!11 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!12 = !{void (<4 x float>, <4 x float>, <4 x float>*)* @main.flat, !"", !13, null, null}
|
||||
!13 = !{!14, !17, null}
|
||||
!14 = !{!15, !16}
|
||||
!15 = !{i32 0, !"A", i8 9, i8 0, !9, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!16 = !{i32 1, !"A", i8 9, i8 0, !9, i8 2, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!17 = !{!18}
|
||||
!18 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
|
@ -1,69 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: signature element A at location (8000,0) size (1,4) is out of range.
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>, <4 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef)
|
||||
%5 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%6 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
%7 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef)
|
||||
%8 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef)
|
||||
%mul.i0 = fmul fast float %5, %4
|
||||
%mul.i1 = fmul fast float %6, %3
|
||||
%mul.i2 = fmul fast float %7, %3
|
||||
%mul.i3 = fmul fast float %8, %3
|
||||
%FAbs = tail call float @dx.op.unary.f32(i32 6, float %mul.i0)
|
||||
%FAbs1 = tail call float @dx.op.unary.f32(i32 6, float %mul.i1)
|
||||
%FAbs2 = tail call float @dx.op.unary.f32(i32 6, float %mul.i2)
|
||||
%FAbs3 = tail call float @dx.op.unary.f32(i32 6, float %mul.i3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %FAbs)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %FAbs1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %FAbs2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %FAbs3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!12}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>, <4 x float>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !7, !10}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 1, !11, !9}
|
||||
!11 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!12 = !{void (<4 x float>, <4 x float>, <4 x float>*)* @main.flat, !"", !13, null, null}
|
||||
!13 = !{!14, !17, null}
|
||||
!14 = !{!15, !16}
|
||||
!15 = !{i32 0, !"A", i8 9, i8 0, !9, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!16 = !{i32 1, !"A", i8 9, i8 0, !19, i8 2, i32 1, i8 4, i32 8000, i8 0, null}
|
||||
!17 = !{!18}
|
||||
!18 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!19 = !{i32 1}
|
|
@ -1,69 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: signature element A at location (0,0) size (1,4) overlaps another signature element.
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<4 x float>, <4 x float>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%3 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = tail call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef)
|
||||
%5 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%6 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
%7 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef)
|
||||
%8 = tail call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef)
|
||||
%mul.i0 = fmul fast float %5, %4
|
||||
%mul.i1 = fmul fast float %6, %3
|
||||
%mul.i2 = fmul fast float %7, %3
|
||||
%mul.i3 = fmul fast float %8, %3
|
||||
%FAbs = tail call float @dx.op.unary.f32(i32 6, float %mul.i0)
|
||||
%FAbs1 = tail call float @dx.op.unary.f32(i32 6, float %mul.i1)
|
||||
%FAbs2 = tail call float @dx.op.unary.f32(i32 6, float %mul.i2)
|
||||
%FAbs3 = tail call float @dx.op.unary.f32(i32 6, float %mul.i3)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %FAbs)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %FAbs1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %FAbs2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %FAbs3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.unary.f32(i32, float) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!12}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>, <4 x float>, <4 x float>*)* @main.flat, !4}
|
||||
!4 = !{!5, !7, !7, !10}
|
||||
!5 = !{i32 0, !6, !6}
|
||||
!6 = !{}
|
||||
!7 = !{i32 0, !8, !9}
|
||||
!8 = !{i32 4, !"A", i32 7, i32 9}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 1, !11, !9}
|
||||
!11 = !{i32 4, !"SV_TARGET", i32 7, i32 9}
|
||||
!12 = !{void (<4 x float>, <4 x float>, <4 x float>*)* @main.flat, !"", !13, null, null}
|
||||
!13 = !{!14, !17, null}
|
||||
!14 = !{!15, !16}
|
||||
!15 = !{i32 0, !"A", i8 9, i8 0, !9, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!16 = !{i32 1, !"A", i8 9, i8 0, !19, i8 2, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!17 = !{!18}
|
||||
!18 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!19 = !{i32 1}
|
|
@ -1,119 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: uav load don't support offset
|
||||
; CHECK: uav load don't support mipLevel/sampleIndex
|
||||
; CHECK: store on typed uav must write to all four components of the UAV
|
||||
; CHECK: sync in a non-Compute Shader must only sync UAV (sync_uglobal)
|
||||
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%class.RWTexture2D = type { <4 x float> }
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.ResRet.f32 = type { float, float, float, float, i32 }
|
||||
|
||||
@"\01?uav1@@3V?$RWTexture2D@V?$vector@M$03@@@@A" = available_externally global %class.RWTexture2D zeroinitializer, align 4
|
||||
@dx.typevar.0 = external addrspace(1) constant %class.RWTexture2D
|
||||
@llvm.used = appending global [2 x i8*] [i8* addrspacecast (i8 addrspace(1)* bitcast (%class.RWTexture2D addrspace(1)* @dx.typevar.0 to i8 addrspace(1)*) to i8*), i8* bitcast (%class.RWTexture2D* @"\01?uav1@@3V?$RWTexture2D@V?$vector@M$03@@@@A" to i8*)], section "llvm.metadata"
|
||||
|
||||
; Function Attrs: nounwind
|
||||
define void @main.flat(<2 x i32>, <2 x i32>, <4 x float>* nocapture readnone) #0 {
|
||||
entry:
|
||||
%uav1_UAV_2d = tail call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1, i32 0, i32 0, i1 false)
|
||||
%3 = tail call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef)
|
||||
%4 = tail call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 1, i32 undef)
|
||||
%5 = tail call i32 @dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 0, i32 undef)
|
||||
%6 = tail call i32 @dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 1, i32 undef)
|
||||
%TextureLoad = tail call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 68, %dx.types.Handle %uav1_UAV_2d, i32 %3, i32 %3, i32 %4, i32 %3, i32 undef, i32 %3, i32 undef)
|
||||
%7 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 0
|
||||
%8 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 1
|
||||
%9 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 2
|
||||
%10 = extractvalue %dx.types.ResRet.f32 %TextureLoad, 3
|
||||
tail call void @dx.op.barrier(i32 82, i32 9)
|
||||
%TextureLoad1 = tail call %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32 68, %dx.types.Handle %uav1_UAV_2d, i32 undef, i32 %5, i32 %6, i32 undef, i32 undef, i32 undef, i32 undef)
|
||||
%11 = extractvalue %dx.types.ResRet.f32 %TextureLoad1, 0
|
||||
%12 = extractvalue %dx.types.ResRet.f32 %TextureLoad1, 1
|
||||
%13 = extractvalue %dx.types.ResRet.f32 %TextureLoad1, 2
|
||||
%14 = extractvalue %dx.types.ResRet.f32 %TextureLoad1, 3
|
||||
%15 = extractvalue %dx.types.ResRet.f32 %TextureLoad1, 4
|
||||
%conv = uitofp i32 %15 to float
|
||||
%factor = fmul fast float %conv, 2.000000e+00
|
||||
%add4.i0 = fadd fast float %11, %7
|
||||
%add9.i0 = fadd fast float %add4.i0, %factor
|
||||
%factor4 = fmul fast float %conv, 2.000000e+00
|
||||
%add4.i1 = fadd fast float %12, %8
|
||||
%add9.i1 = fadd fast float %add4.i1, %factor4
|
||||
%factor5 = fmul fast float %conv, 2.000000e+00
|
||||
%add4.i2 = fadd fast float %13, %9
|
||||
%add9.i2 = fadd fast float %add4.i2, %factor5
|
||||
%factor6 = fmul fast float %conv, 2.000000e+00
|
||||
%add4.i3 = fadd fast float %14, %10
|
||||
%add9.i3 = fadd fast float %add4.i3, %factor6
|
||||
tail call void @dx.op.barrier(i32 82, i32 2)
|
||||
tail call void @dx.op.textureStore.f32(i32 69, %dx.types.Handle %uav1_UAV_2d, i32 %3, i32 %4, i32 undef, float %add9.i0, float %add9.i1, float %add9.i2, float undef, i8 7)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %add9.i0)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %add9.i1)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %add9.i2)
|
||||
tail call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %add9.i3)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #1
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #1
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.ResRet.f32 @dx.op.textureLoad.f32(i32, %dx.types.Handle, i32, i32, i32, i32, i32, i32, i32) #2
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.textureStore.f32(i32, %dx.types.Handle, i32, i32, i32, float, float, float, float, i8) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.barrier(i32, i32) #0
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readnone }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.resources = !{!3}
|
||||
!dx.typeAnnotations = !{!7, !10}
|
||||
!dx.entryPoints = !{!21}
|
||||
|
||||
!0 = !{!"clang version 3.7 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"ps", i32 6, i32 0}
|
||||
!3 = !{null, !4, null, null}
|
||||
!4 = !{!5}
|
||||
!5 = !{i32 0, %class.RWTexture2D* @"\01?uav1@@3V?$RWTexture2D@V?$vector@M$03@@@@A", !"uav1", i32 0, i32 3, i32 1, i32 2, i1 false, i1 false, i1 false, !6}
|
||||
!6 = !{i32 0, i32 9}
|
||||
!7 = !{i32 0, %class.RWTexture2D addrspace(1)* @dx.typevar.0, !8}
|
||||
!8 = !{i32 16, !9}
|
||||
!9 = !{i32 3, i32 0, i32 6, !"h", i32 7, i32 9}
|
||||
!10 = !{i32 1, void (<2 x i32>, <2 x i32>, <4 x float>*)* @main.flat, !11}
|
||||
!11 = !{!12, !14, !17, !19}
|
||||
!12 = !{i32 0, !13, !13}
|
||||
!13 = !{}
|
||||
!14 = !{i32 0, !15, !16}
|
||||
!15 = !{i32 4, !"A", i32 7, i32 5}
|
||||
!16 = !{i32 0}
|
||||
!17 = !{i32 0, !18, !16}
|
||||
!18 = !{i32 4, !"B", i32 7, i32 5}
|
||||
!19 = !{i32 1, !20, !16}
|
||||
!20 = !{i32 4, !"SV_Target", i32 7, i32 9}
|
||||
!21 = !{void (<2 x i32>, <2 x i32>, <4 x float>*)* @main.flat, !"", !22, !3, !28}
|
||||
!22 = !{!23, !26, null}
|
||||
!23 = !{!24, !25}
|
||||
!24 = !{i32 0, !"A", i8 5, i8 0, !16, i8 1, i32 1, i8 2, i32 0, i8 0, null}
|
||||
!25 = !{i32 1, !"B", i8 5, i8 0, !16, i8 1, i32 1, i8 2, i32 1, i8 0, null}
|
||||
!26 = !{!27}
|
||||
!27 = !{i32 0, !"SV_Target", i8 9, i8 16, !16, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!28 = !{i32 0, i64 8192}
|
|
@ -1,53 +0,0 @@
|
|||
; RUN: %dxv %s | FileCheck %s
|
||||
|
||||
; CHECK: Semantic 'SV_Target' is invalid as vs Output
|
||||
|
||||
target datalayout = "e-m:e-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%dx.types.wave_t = type { i8* }
|
||||
|
||||
define void @"\01?main@@YA?AV?$vector@M$03@@XZ.flat"(<4 x float>*) {
|
||||
entry:
|
||||
; CHECK: Declaration '%dx.types.wave_t = type { i8* }' uses a reserved prefix
|
||||
%wave_local = alloca %dx.types.wave_t
|
||||
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float 0.000000e+00)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float 0.000000e+00)
|
||||
ret void
|
||||
; CHECK: Instructions must be of an allowed type
|
||||
unreachable
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #0
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.wave_t @dx.op.waveCapture(i32, i8) #1
|
||||
; Function Attrs: nounwind readonly
|
||||
declare i1 @dx.op.waveAllIsTrue(i32, %dx.types.wave_t, i1) #1
|
||||
|
||||
attributes #0 = { nounwind }
|
||||
attributes #1 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.shaderModel = !{!2}
|
||||
!dx.typeAnnotations = !{!3}
|
||||
!dx.entryPoints = !{!9}
|
||||
|
||||
!0 = !{!"clang version 3.7.0 (tags/RELEASE_370/final)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{!"vs", i32 6, i32 0}
|
||||
!3 = !{i32 1, void (<4 x float>*)* @"\01?main@@YA?AV?$vector@M$03@@XZ.flat", !4}
|
||||
!4 = !{!5, !7}
|
||||
!5 = !{i32 0, !6, !13}
|
||||
!6 = !{}
|
||||
!7 = !{i32 1, !8, !13}
|
||||
!8 = !{i32 4, !"SV_Target", i32 7, i32 9}
|
||||
!9 = !{void (<4 x float>*)* @"\01?main@@YA?AV?$vector@M$03@@XZ.flat", !"", !10, null, null}
|
||||
!10 = !{null, !11, null}
|
||||
!11 = !{!12}
|
||||
!12 = !{i32 0, !"SV_Target", i8 9, i8 16, !13, i8 0, i32 1, i8 4, i32 0, i8 0, null}
|
||||
!13 = !{i32 0}
|
|
@ -221,8 +221,8 @@ namespace MainNs
|
|||
" <InputElement SemanticName='POSITION' Format='R32G32B32_FLOAT' AlignedByteOffset='0' />\r\n" +
|
||||
" <InputElement SemanticName='COLOR' Format='R32G32B32A32_FLOAT' AlignedByteOffset='12' />\r\n" +
|
||||
" </InputElements>\r\n" +
|
||||
" <Shader Name='VS' Target='vs_5_1' EntryPoint='VSMain' />\r\n" +
|
||||
" <Shader Name='PS' Target='ps_5_1' EntryPoint='PSMain' />\r\n" +
|
||||
" <Shader Name='VS' Target='vs_6_0' EntryPoint='VSMain' />\r\n" +
|
||||
" <Shader Name='PS' Target='ps_6_0' EntryPoint='PSMain' />\r\n" +
|
||||
"</ShaderOp>\r\n";
|
||||
|
||||
this.CodeBox.Text =
|
||||
|
@ -670,7 +670,7 @@ namespace MainNs
|
|||
result.SetFromText = options.Count > 0;
|
||||
result.Mode = GetValueOrDefault(options, "mode", "hlsl");
|
||||
result.Entry = GetValueOrDefault(options, "hlsl-entry", "main");
|
||||
result.Target = GetValueOrDefault(options, "hlsl-target", "ps_5_1");
|
||||
result.Target = GetValueOrDefault(options, "hlsl-target", "ps_6_0");
|
||||
result.Arguments = GetValueOrDefault(options, "hlsl-args", "").Split(' ').Select(a => a.Trim()).ToArray();
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,6 @@ public:
|
|||
TEST_METHOD(WhenDepthNotFloatThenFail);
|
||||
TEST_METHOD(BarrierFail);
|
||||
TEST_METHOD(CBufferLegacyOutOfBoundFail);
|
||||
TEST_METHOD(CBufferOutOfBoundFail);
|
||||
TEST_METHOD(CsThreadSizeFail);
|
||||
TEST_METHOD(DeadLoopFail);
|
||||
TEST_METHOD(EvalFail);
|
||||
|
@ -466,11 +465,38 @@ TEST_F(ValidationTest, WhenUnknownBlocksThenFail) {
|
|||
}
|
||||
|
||||
TEST_F(ValidationTest, WhenInstrDisallowedThenFail) {
|
||||
TestCheck(L"val-inst-disallowed.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\abs2.hlsl", "ps_6_0",
|
||||
{
|
||||
"target triple = \"dxil-ms-dx\"",
|
||||
"ret void",
|
||||
"dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 3, i32 undef)",
|
||||
"!\"ps\", i32 6, i32 0",
|
||||
},
|
||||
{
|
||||
"target triple = \"dxil-ms-dx\"\n%dx.types.wave_t = type { i8* }",
|
||||
"unreachable",
|
||||
"dx.op.loadInput.i32(i32 4, i32 0, i32 0, i8 3, i32 undef)\n%wave_local = alloca %dx.types.wave_t",
|
||||
"!\"vs\", i32 6, i32 0",
|
||||
},
|
||||
{"Semantic 'SV_Target' is invalid as vs Output",
|
||||
"Declaration '%dx.types.wave_t = type { i8* }' uses a reserved prefix",
|
||||
"Instructions must be of an allowed type",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
TEST_F(ValidationTest, WhenDepthNotFloatThenFail) {
|
||||
TestCheck(L"dxil_validation\\IntegerDepth.ll");
|
||||
RewriteAssemblyCheckMsg(L"..\\CodeGenHLSL\\IntegerDepth2.hlsl", "ps_6_0",
|
||||
{
|
||||
"!\"SV_Depth\", i8 9",
|
||||
},
|
||||
{
|
||||
"!\"SV_Depth\", i8 4",
|
||||
},
|
||||
{
|
||||
"SV_Depth must be float",
|
||||
});
|
||||
}
|
||||
|
||||
TEST_F(ValidationTest, BarrierFail) {
|
||||
|
@ -500,85 +526,317 @@ TEST_F(ValidationTest, BarrierFail) {
|
|||
});
|
||||
}
|
||||
TEST_F(ValidationTest, CBufferLegacyOutOfBoundFail) {
|
||||
TestCheck(L"dxil_validation\\cbuffer1.50_legacy.ll");
|
||||
}
|
||||
TEST_F(ValidationTest, CBufferOutOfBoundFail) {
|
||||
TestCheck(L"dxil_validation\\cbuffer1.50.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\cbuffer1.50.hlsl", "ps_6_0",
|
||||
"cbufferLoadLegacy.f32(i32 61, %dx.types.Handle %Foo2_buffer, i32 0)",
|
||||
"cbufferLoadLegacy.f32(i32 61, %dx.types.Handle %Foo2_buffer, i32 6)",
|
||||
"Cbuffer access out of bound");
|
||||
}
|
||||
|
||||
TEST_F(ValidationTest, CsThreadSizeFail) {
|
||||
TestCheck(L"dxil_validation\\csThreadSize.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\share_mem1.hlsl", "cs_6_0",
|
||||
{"!{i32 8, i32 8, i32 1",
|
||||
"[256 x float]"},
|
||||
{"!{i32 1025, i32 1025, i32 1025",
|
||||
"[64000000 x float]"},
|
||||
{"Declared Thread Group X size 1025 outside valid range",
|
||||
"Declared Thread Group Y size 1025 outside valid range",
|
||||
"Declared Thread Group Z size 1025 outside valid range",
|
||||
"Declared Thread Group Count 1076890625 (X*Y*Z) is beyond the valid maximum",
|
||||
"Total Thread Group Shared Memory storage is 256000000, exceeded 32768",
|
||||
});
|
||||
}
|
||||
TEST_F(ValidationTest, DeadLoopFail) {
|
||||
TestCheck(L"dxil_validation\\deadloop.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\loop1.hlsl", "ps_6_0",
|
||||
{"br i1 %exitcond, label %for.end.loopexit, label %for.body, !llvm.loop !([0-9]+)",
|
||||
"%add.lcssa = phi float \\[ %add, %for.body \\]",
|
||||
"!dx.entryPoints = !\\{!([0-9]+)\\}",
|
||||
"\\[ %add.lcssa, %for.end.loopexit \\]"
|
||||
},
|
||||
{"br label %for.body",
|
||||
"",
|
||||
"!dx.entryPoints = !\\{!\\1\\}\n!dx.unused = !\\{!\\1\\}",
|
||||
"[ 0.000000e+00, %for.end.loopexit ]"
|
||||
},
|
||||
{"Loop must have break",
|
||||
"Named metadata 'dx.unused' is unknown",
|
||||
},
|
||||
/*bRegex*/true);
|
||||
}
|
||||
TEST_F(ValidationTest, EvalFail) {
|
||||
TestCheck(L"dxil_validation\\Eval.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\Eval.hlsl", "ps_6_0",
|
||||
"!\"A\", i8 9, i8 0, !([0-9]+), i8 2, i32 1, i8 4",
|
||||
"!\"A\", i8 9, i8 0, !\\1, i8 0, i32 1, i8 4",
|
||||
"Interpolation mode on A used with eval_\\* instruction must be ",
|
||||
/*bRegex*/true);
|
||||
}
|
||||
TEST_F(ValidationTest, GetDimCalcLODFail) {
|
||||
TestCheck(L"dxil_validation\\GetDimCalcLOD.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\GetDimCalcLOD.hlsl", "ps_6_0",
|
||||
{"extractvalue %dx.types.Dimensions %2, 1",
|
||||
"float 1.000000e+00, i1 true"
|
||||
},
|
||||
{"extractvalue %dx.types.Dimensions %2, 2",
|
||||
"float undef, i1 true"
|
||||
},
|
||||
{"GetDimensions used undef dimension z on TextureCube",
|
||||
"coord uninitialized"});
|
||||
}
|
||||
TEST_F(ValidationTest, HsAttributeFail) {
|
||||
TestCheck(L"dxil_validation\\hsAttribute.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\hsAttribute.hlsl", "hs_6_0",
|
||||
{"i32 3, i32 3, i32 2, i32 3, i32 3, float 6.400000e+01"
|
||||
},
|
||||
{"i32 36, i32 36, i32 0, i32 0, i32 0, float 6.500000e+01"
|
||||
},
|
||||
{"HS input control point count must be [1..32]. 36 specified",
|
||||
"Invalid Tessellator Domain specified. Must be isoline, tri or quad",
|
||||
"Invalid Tessellator Partitioning specified",
|
||||
"Invalid Tessellator Output Primitive specified",
|
||||
"Hull Shader MaxTessFactor must be [1.000000..64.000000]. 65.000000 specified",
|
||||
"output control point count must be [0..32]. 36 specified"});
|
||||
}
|
||||
TEST_F(ValidationTest, InnerCoverageFail) {
|
||||
TestCheck(L"dxil_validation\\InnerCoverage.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\InnerCoverage2.hlsl", "ps_6_0",
|
||||
{"dx.op.coverage.i32(i32 93)",
|
||||
"declare i32 @dx.op.coverage.i32(i32)"
|
||||
},
|
||||
{"dx.op.coverage.i32(i32 93)\n %inner = call i32 @dx.op.innercoverage.i32(i32 94)",
|
||||
"declare i32 @dx.op.coverage.i32(i32)\n"
|
||||
"declare i32 @dx.op.innercoverage.i32(i32)"
|
||||
},
|
||||
"InnerCoverage and Coverage are mutually exclusive.");
|
||||
}
|
||||
TEST_F(ValidationTest, InterpChangeFail) {
|
||||
TestCheck(L"dxil_validation\\interpChange.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\interpChange.hlsl", "ps_6_0",
|
||||
"i32 1, i8 0, null}",
|
||||
"i32 0, i8 2, null}",
|
||||
"interpolation mode that differs from another element packed",
|
||||
/*bRegex*/true);
|
||||
}
|
||||
TEST_F(ValidationTest, InterpOnIntFail) {
|
||||
TestCheck(L"dxil_validation\\interpOnInt.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\interpOnInt2.hlsl", "ps_6_0",
|
||||
"!\"A\", i8 5, i8 0, !([0-9]+), i8 1",
|
||||
"!\"A\", i8 5, i8 0, !\\1, i8 2",
|
||||
"signature element A specifies invalid interpolation mode for integer component type",
|
||||
/*bRegex*/true);
|
||||
}
|
||||
TEST_F(ValidationTest, InvalidSigCompTyFail) {
|
||||
TestCheck(L"dxil_validation\\invalidSigCompTy.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\abs2.hlsl", "ps_6_0",
|
||||
"!\"A\", i8 4",
|
||||
"!\"A\", i8 0",
|
||||
"A specifies unrecognized or invalid component type");
|
||||
}
|
||||
TEST_F(ValidationTest, MultiStream2Fail) {
|
||||
TestCheck(L"dxil_validation\\multiStream2.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\multiStreamGS.hlsl", "gs_6_0",
|
||||
"i32 1, i32 12, i32 7, i32 1, i32 1",
|
||||
"i32 1, i32 12, i32 7, i32 2, i32 1",
|
||||
"Multiple GS output streams are used but 'XXX' is not pointlist");
|
||||
}
|
||||
TEST_F(ValidationTest, PhiTGSMFail) {
|
||||
TestCheck(L"dxil_validation\\phiTGSM.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\phiTGSM.hlsl", "cs_6_0",
|
||||
"ret void",
|
||||
"%arrayPhi = phi i32 addrspace(3)* [ %arrayidx, %if.then ], [ %arrayidx2, %if.else ]\n"
|
||||
"%phiAtom = atomicrmw add i32 addrspace(3)* %arrayPhi, i32 1 seq_cst\n"
|
||||
"ret void",
|
||||
"TGSM pointers must originate from an unambiguous TGSM global variable");
|
||||
}
|
||||
TEST_F(ValidationTest, ReducibleFail) {
|
||||
TestCheck(L"dxil_validation\\reducible.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\reducible.hlsl", "ps_6_0",
|
||||
{"%conv\n"
|
||||
" br label %if.end",
|
||||
"to float\n"
|
||||
" br label %if.end"
|
||||
},
|
||||
{"%conv\n"
|
||||
" br i1 %cmp.i0, label %if.else, label %if.end",
|
||||
"to float\n"
|
||||
" br i1 %cmp.i0, label %if.then, label %if.end"
|
||||
},
|
||||
"Execution flow must be reducible");
|
||||
}
|
||||
TEST_F(ValidationTest, SampleBiasFail) {
|
||||
TestCheck(L"dxil_validation\\sampleBias.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\sampleBias.hlsl", "ps_6_0",
|
||||
{"float -1.600000e+01"
|
||||
},
|
||||
{"float 1.800000e+01"
|
||||
},
|
||||
"bias amount for sample_b must be in the range [-16.000000,15.990000]");
|
||||
}
|
||||
TEST_F(ValidationTest, SamplerKindFail) {
|
||||
TestCheck(L"dxil_validation\\samplerKind.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\samplerKind.hlsl", "ps_6_0",
|
||||
{"uav1_UAV_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1",
|
||||
"g_txDiffuse_texture_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0",
|
||||
"\"g_samLinear\", i32 0, i32 0, i32 1, i32 0",
|
||||
"\"g_samLinearC\", i32 0, i32 1, i32 1, i32 1",
|
||||
},
|
||||
{"uav1_UAV_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 0",
|
||||
"g_txDiffuse_texture_2d = call %dx.types.Handle @dx.op.createHandle(i32 59, i8 1",
|
||||
"\"g_samLinear\", i32 0, i32 0, i32 1, i32 3",
|
||||
"\"g_samLinearC\", i32 0, i32 1, i32 1, i32 3",
|
||||
},
|
||||
{"Invalid sampler mode",
|
||||
"require sampler declared in comparison mode",
|
||||
"requires sampler declared in default mode",
|
||||
"should on srv resource"});
|
||||
}
|
||||
TEST_F(ValidationTest, SemaOverlapFail) {
|
||||
TestCheck(L"dxil_validation\\semaOverlap.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\semaOverlap1.hlsl", "ps_6_0",
|
||||
{"!([0-9]+) = !\\{i32 0, !\"A\", i8 9, i8 0, !([0-9]+), i8 2, i32 1, i8 4, i32 0, i8 0, null\\}\n"
|
||||
"!([0-9]+) = !\\{i32 0\\}\n"
|
||||
"!([0-9]+) = !\\{i32 1, !\"A\", i8 9, i8 0, !([0-9]+)",
|
||||
},
|
||||
{"!\\1 = !\\{i32 0, !\"A\", i8 9, i8 0, !\\2, i8 2, i32 1, i8 4, i32 0, i8 0, null\\}\n"
|
||||
"!\\3 = !\\{i32 0\\}\n"
|
||||
"!\\4 = !\\{i32 1, !\"A\", i8 9, i8 0, !\\2",
|
||||
},
|
||||
{"Semantic 'A' overlap at 0"},
|
||||
/*bRegex*/true);
|
||||
}
|
||||
TEST_F(ValidationTest, SigOutOfRangeFail) {
|
||||
TestCheck(L"dxil_validation\\sigOutOfRange.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\semaOverlap1.hlsl", "ps_6_0",
|
||||
{"i32 1, i8 0, null}",
|
||||
},
|
||||
{"i32 8000, i8 0, null}",
|
||||
},
|
||||
{"signature element A at location (8000,0) size (1,4) is out of range"});
|
||||
}
|
||||
TEST_F(ValidationTest, SigOverlapFail) {
|
||||
TestCheck(L"dxil_validation\\sigOverlap.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\semaOverlap1.hlsl", "ps_6_0",
|
||||
{"i32 1, i8 0, null}",
|
||||
},
|
||||
{"i32 0, i8 0, null}",
|
||||
},
|
||||
{"signature element A at location (0,0) size (1,4) overlaps another signature element"});
|
||||
}
|
||||
TEST_F(ValidationTest, SimpleHs1Fail) {
|
||||
TestCheck(L"dxil_validation\\SimpleHs1.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\SimpleHs1.hlsl", "hs_6_0",
|
||||
{"i32 3, i32 3, i32 2, i32 3, i32 3, float 6.400000e+01}",
|
||||
"\"SV_TessFactor\", i8 9, i8 25",
|
||||
"\"SV_InsideTessFactor\", i8 9, i8 26",
|
||||
},
|
||||
{"i32 3, i32 3000, i32 2, i32 3, i32 3, float 6.400000e+01}",
|
||||
"\"TessFactor\", i8 9, i8 0",
|
||||
"\"InsideTessFactor\", i8 9, i8 0",
|
||||
},
|
||||
{"output control point count must be [0..32]. 3000 specified",
|
||||
"Required TessFactor for domain not found declared anywhere in Patch Constant data",
|
||||
// TODO: enable this after support pass thru hull shader.
|
||||
//"For pass thru hull shader, input control point count must match output control point count",
|
||||
//"Total number of scalars across all HS output control points must not exceed",
|
||||
});
|
||||
}
|
||||
TEST_F(ValidationTest, SimpleHs3Fail) {
|
||||
TestCheck(L"dxil_validation\\SimpleHs3.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\SimpleHs3.hlsl", "hs_6_0",
|
||||
{
|
||||
"i32 3, i32 3, i32 2, i32 3, i32 3, float 6.400000e+01}",
|
||||
},
|
||||
{
|
||||
"i32 3, i32 3, i32 2, i32 3, i32 2, float 6.400000e+01}",
|
||||
},
|
||||
{"Hull Shader declared with Tri Domain must specify output primitive "
|
||||
"point, triangle_cw or triangle_ccw. Line output is not compatible with "
|
||||
"the Tri domain"});
|
||||
}
|
||||
TEST_F(ValidationTest, SimpleHs4Fail) {
|
||||
TestCheck(L"dxil_validation\\SimpleHs4.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\SimpleHs4.hlsl", "hs_6_0",
|
||||
{
|
||||
"i32 2, i32 2, i32 1, i32 3, i32 2, float 6.400000e+01}",
|
||||
},
|
||||
{
|
||||
"i32 2, i32 2, i32 1, i32 3, i32 3, float 6.400000e+01}",
|
||||
},
|
||||
{"Hull Shader declared with IsoLine Domain must specify output primitive "
|
||||
"point or line. Triangle_cw or triangle_ccw output are not compatible "
|
||||
"with the IsoLine Domain"});
|
||||
}
|
||||
TEST_F(ValidationTest, SimpleDs1Fail) {
|
||||
TestCheck(L"dxil_validation\\SimpleDs1.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\SimpleDs1.hlsl", "ds_6_0",
|
||||
{"!{i32 2, i32 3}"
|
||||
},
|
||||
{"!{i32 4, i32 36}"
|
||||
},
|
||||
{"DS input control point count must be [0..32]. 36 specified",
|
||||
"Invalid Tessellator Domain specified. Must be isoline, tri or quad",
|
||||
"DomainLocation component index out of bounds for the domain"});
|
||||
}
|
||||
TEST_F(ValidationTest, SimpleGs1Fail) {
|
||||
TestCheck(L"dxil_validation\\SimpleGs1.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\SimpleGs1.hlsl", "gs_6_0",
|
||||
{"!{i32 1, i32 3, i32 1, i32 5, i32 1}",
|
||||
"i8 4, i32 1, i8 4, i32 1, i8 0, null}"
|
||||
},
|
||||
{"!{i32 5, i32 1025, i32 1, i32 0, i32 33}",
|
||||
"i8 4, i32 1, i8 4, i32 1, i8 0, !100}\n"
|
||||
"!100 = !{i32 0, i32 5}"
|
||||
},
|
||||
{"GS output vertex count must be [0..1024]. 1025 specified",
|
||||
"GS instance count must be [1..32]. 33 specified",
|
||||
"GS output primitive topology unrecognized",
|
||||
"GS input primitive unrecognized",
|
||||
"Stream index (5) must between 0 and 3"});
|
||||
}
|
||||
TEST_F(ValidationTest, UavBarrierFail) {
|
||||
TestCheck(L"dxil_validation\\uavBarrier.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\uavBarrier.hlsl", "ps_6_0",
|
||||
{"dx.op.barrier(i32 82, i32 2)",
|
||||
"textureLoad.f32(i32 68, %dx.types.Handle %uav1_UAV_2d, i32 undef",
|
||||
"i32 undef, i32 undef, i32 undef, i32 undef)",
|
||||
"float %add9.i3, i8 15)",
|
||||
},
|
||||
{"dx.op.barrier(i32 82, i32 9)",
|
||||
"textureLoad.f32(i32 68, %dx.types.Handle %uav1_UAV_2d, i32 1",
|
||||
"i32 1, i32 2, i32 undef, i32 undef)",
|
||||
"float undef, i8 7)",
|
||||
},
|
||||
{"uav load don't support offset",
|
||||
"uav load don't support mipLevel/sampleIndex",
|
||||
"store on typed uav must write to all four components of the UAV",
|
||||
"sync in a non-Compute Shader must only sync UAV (sync_uglobal)"});
|
||||
}
|
||||
TEST_F(ValidationTest, UndefValueFail) {
|
||||
TestCheck(L"dxil_validation\\UndefValue.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\UndefValue.hlsl", "ps_6_0",
|
||||
{"fadd fast float %([0-9]+)"
|
||||
},
|
||||
{"fadd fast float undef"
|
||||
},
|
||||
{"Instructions should not read uninitialized value"},
|
||||
/*bRegex*/ true);
|
||||
}
|
||||
TEST_F(ValidationTest, UpdateCounterFail) {
|
||||
TestCheck(L"dxil_validation\\UpdateCounter.ll");
|
||||
RewriteAssemblyCheckMsg(
|
||||
L"..\\CodeGenHLSL\\UpdateCounter2.hlsl", "ps_6_0",
|
||||
{"%2 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf2_UAV_structbuf, i8 1)",
|
||||
"%3 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf2_UAV_structbuf, i8 1)"
|
||||
},
|
||||
{"%2 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf2_UAV_structbuf, i8 -1)",
|
||||
"%3 = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf2_UAV_structbuf, i8 1)\n"
|
||||
"%srvUpdate = call i32 @dx.op.bufferUpdateCounter(i32 72, %dx.types.Handle %buf1_texture_buf, i8 undef)"
|
||||
},
|
||||
{"BufferUpdateCounter valid only on UAV",
|
||||
"BufferUpdateCounter valid only on structured buffers",
|
||||
"inc of BufferUpdateCounter must be an immediate constant",
|
||||
"RWStructuredBuffers may increment or decrement their counters, but not both"});
|
||||
}
|
||||
|
||||
TEST_F(ValidationTest, WhenIncorrectModelThenFail) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче