Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,51 +1,71 @@
// RUN: %dxc -T vs_6_6 -DETY=float -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=bool -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=uint64_t -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=double -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI

// RUN: %dxc -T vs_6_6 -DETY=float1 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=bool1 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=uint64_t1 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=double1 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI

// RUN: %dxc -T vs_6_6 -DETY=float4 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=bool4 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=uint64_t4 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DETY=double4 -DCOLS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI

// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=float -DCOLS=2 -DROWS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=bool -DCOLS=2 -DROWS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=uint64_t -DCOLS=2 -DROWS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=double -DCOLS=2 -DROWS=2 %s | FileCheck %s

// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=float -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=bool -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=uint64_t -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DATY=matrix -DETY=double -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI

// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=float -DCOLS=2 -DROWS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=uint64_t -DCOLS=2 -DROWS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=double -DCOLS=2 -DROWS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=float -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=bool -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=uint64_t -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI
// RUN: %dxc -T vs_6_6 -DATY=Matrix -DETY=double -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefixes=CHECK,MULTI

// RUN: %dxc -T vs_6_6 -DATY=Vector -DETY=float -DCOLS=4 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=Vector -DETY=bool -DCOLS=4 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=Vector -DETY=uint64_t -DCOLS=2 %s | FileCheck %s
// RUN: %dxc -T vs_6_6 -DATY=Vector -DETY=double -DCOLS=2 %s | FileCheck %s

// RUN: %dxc -T vs_6_6 -DATY=OffVector -DETY=float -DCOLS=4 %s | FileCheck %s --check-prefixes=CHECK,OFF
// RUN: %dxc -T vs_6_6 -DATY=OffVector -DETY=bool -DCOLS=4 %s | FileCheck %s --check-prefixes=CHECK,OFF
// RUN: %dxc -T vs_6_6 -DATY=OffVector -DETY=uint64_t -DCOLS=2 %s | FileCheck %s --check-prefixes=CHECK,OFF
// RUN: %dxc -T vs_6_6 -DATY=OffVector -DETY=double -DCOLS=2 %s | FileCheck %s --check-prefixes=CHECK,OFF
// RUN: %dxc -fcgl -T vs_6_6 -DETY=float -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
Comment thread
llvm-beanz marked this conversation as resolved.
Outdated
// RUN: %dxc -fcgl -T vs_6_6 -DETY=bool -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=uint64_t -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=double -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DETY=float1 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=bool1 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=uint64_t1 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=double1 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DETY=float4 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=bool4 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=uint64_t4 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DETY=double4 -DCOLS=3 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=float -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=bool -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=uint64_t -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=double -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=float -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=bool -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=uint64_t -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=matrix -DETY=double -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=float -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=uint64_t -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=double -DCOLS=2 -DROWS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=float -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=bool -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=uint64_t -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Matrix -DETY=double -DCOLS=3 -DROWS=3 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DATY=Vector -DETY=float -DCOLS=4 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Vector -DETY=bool -DCOLS=4 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Vector -DETY=uint64_t -DCOLS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=Vector -DETY=double -DCOLS=2 %s | FileCheck %s --check-prefix=FCGL

// RUN: %dxc -fcgl -T vs_6_6 -DATY=OffVector -DETY=float -DCOLS=4 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=OffVector -DETY=bool -DCOLS=4 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=OffVector -DETY=uint64_t -DCOLS=2 %s | FileCheck %s --check-prefix=FCGL
// RUN: %dxc -fcgl -T vs_6_6 -DATY=OffVector -DETY=double -DCOLS=2 %s | FileCheck %s --check-prefix=FCGL

///////////////////////////////////////////////////////////////////////
// Test codegen for various load and store operations and conversions
// for different aggregate buffer types and indices.
///////////////////////////////////////////////////////////////////////

// FCGL-LABEL: define void @main

// ByteAddressBuffer loads and stores.
// FCGL-COUNT-4: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL-COUNT-2: call void @"dx.hl.op{{.*}}"(i32 277,

// StructuredBuffer loads, subscripts, and stores.
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call void @"dx.hl.op{{.*}}"(i32 277,

// ConsumeStructuredBuffer and AppendStructuredBuffer.
// FCGL: call {{.*}}@"dx.hl.op..consume{{.*}}"(i32 283,
// FCGL: call void @"dx.hl.op..appendvoid{{.*}}"(i32 226,

// CHECK: %dx.types.ResRet.[[TY:[a-z][0-9][0-9]]] = type { [[TYPE:[a-z0-9]*]],

#if !defined(ATY)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,48 @@
// RUN: %dxc -DTYPE=float4 -T vs_6_6 %s | FileCheck %s
// RUN: %dxc -DTYPE=bool4 -T vs_6_6 %s | FileCheck %s --check-prefixes=CHECK,I1
// RUN: %dxc -DTYPE=uint64_t2 -T vs_6_6 %s | FileCheck %s --check-prefixes=CHECK,I64
// RUN: %dxc -DTYPE=double2 -T vs_6_6 %s | FileCheck %s --check-prefixes=CHECK,F64
// RUN: %dxc -fcgl -DTYPE=float4 -T vs_6_6 %s | FileCheck %s --check-prefixes=FCGL,FLOAT
// RUN: %dxc -fcgl -DTYPE=bool4 -T vs_6_6 %s | FileCheck %s --check-prefixes=FCGL,BOOL
// RUN: %dxc -fcgl -DTYPE=uint64_t2 -T vs_6_6 %s | FileCheck %s --check-prefixes=FCGL,UINT64
// RUN: %dxc -fcgl -DTYPE=double2 -T vs_6_6 %s | FileCheck %s --check-prefixes=FCGL,DOUBLE
Comment thread
llvm-beanz marked this conversation as resolved.
Outdated

///////////////////////////////////////////////////////////////////////
// Test codegen for various load and store operations and conversions
// for different scalar/vector buffer types and indices.
///////////////////////////////////////////////////////////////////////

// FCGL-LABEL: define void @main

// ByteAddressBuffer loads and stores.
// FLOAT: call <4 x float> @"dx.hl.op.ro.<4 x float> (i32, %dx.types.Handle, i32)"(i32 231,
// BOOL: call <4 x i1> @"dx.hl.op.ro.<4 x i1> (i32, %dx.types.Handle, i32)"(i32 231,
// UINT64: call <2 x i64> @"dx.hl.op.ro.<2 x i64> (i32, %dx.types.Handle, i32)"(i32 231,
// DOUBLE: call <2 x double> @"dx.hl.op.ro.<2 x double> (i32, %dx.types.Handle, i32)"(i32 231,
// FCGL-COUNT-3: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL-COUNT-2: call void @"dx.hl.op{{.*}}"(i32 277,

// StructuredBuffer loads, subscripts, and stores.
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL-COUNT-2: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call void @"dx.hl.op{{.*}}"(i32 277,

// ConsumeStructuredBuffer and AppendStructuredBuffer.
// FCGL: call {{.*}}@"dx.hl.op..consume{{.*}}"(i32 283,
// FCGL: call void @"dx.hl.op..appendvoid{{.*}}"(i32 226,

// Typed buffer loads, subscripts, and store.
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL-COUNT-2: call {{.*}}@"dx.hl.op{{.*}}"(i32 231,
// FCGL: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,
// FCGL: call void @"dx.hl.op{{.*}}"(i32 277,

// Texture loads and store use resource subscripts in frontend IR.
// FCGL-COUNT-7: call {{.*}}@"dx.hl.subscript.{{.*}}"(i32 0,


// These -DAGs must match the same line. That is the only reason for the -DAG.
// The first match will assign [[TY]] to the native type
Expand Down
Loading