forked from microsoft/DirectXShaderCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lit][SPIRV] convert runCodeTest to lit and remove dependence on effc…
…ee (microsoft#6077) Convert runCodeTest to lit FileCheck test and remove all the code related to runCodeTest. Remove effcee and re2 from git submodule since nothing is dependent on them after the change.
- Loading branch information
1 parent
ad3958c
commit 5f7834d
Showing
14 changed files
with
82 additions
and
891 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule effcee
deleted from
66edef
Submodule re2
deleted from
b76a3e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: %dxc -T ps_6_0 -E PSMain -fcgl %s -spirv | FileCheck %s | ||
|
||
struct PSInput | ||
{ | ||
float4 color : COLOR; | ||
}; | ||
|
||
// CHECK: OpFunctionCall %v4float %src_PSMain | ||
float4 PSMain(PSInput input) : SV_TARGET | ||
{ | ||
return input.color; | ||
} |
12 changes: 12 additions & 0 deletions
12
tools/clang/test/CodeGenSPIRV/InlinedCodeWithErrorTest.hlsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: not %dxc -T ps_6_0 -E PSMain -fcgl %s -spirv 2>&1 | FileCheck %s | ||
|
||
struct PSInput | ||
{ | ||
float4 color : COLOR; | ||
}; | ||
|
||
// CHECK: error: cannot initialize return object of type 'float4' with an lvalue of type 'PSInput' | ||
float4 PSMain(PSInput input) : SV_TARGET | ||
{ | ||
return input; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// RUN: not %dxc -T vs_6_2 -E main -DTY=float -DARRAY=[4] -fcgl %s -spirv 2>&1 | FileCheck %s | ||
// RUN: not %dxc -T vs_6_2 -E main -DTY=double4 -fcgl %s -spirv 2>&1 | FileCheck %s | ||
// RUN: not %dxc -T vs_6_2 -E main -DTY=int4 -fcgl %s -spirv 2>&1 | FileCheck %s | ||
// RUN: not %dxc -T vs_6_2 -E main -DTY=float1x4 -fcgl %s -spirv 2>&1 | FileCheck %s | ||
// RUN: not %dxc -T vs_6_2 -E main -DTY=float3 -fcgl %s -spirv 2>&1 | FileCheck %s | ||
// RUN: not %dxc -T vs_6_2 -E main -DTY=InvalidType -fcgl %s -spirv 2>&1 | FileCheck %s | ||
|
||
// RUN: %dxc -T vs_6_2 -E main -DTY=ValidType -fcgl %s -spirv | FileCheck %s --check-prefix=VALID_TY | ||
|
||
// RUN: %dxc -T vs_6_2 -E main -DTY=float4 -fcgl %s -spirv | FileCheck %s --check-prefix=VALID_FLOAT | ||
// RUN: %dxc -T vs_6_2 -E main -DTY=min10float4 -fcgl %s -spirv | FileCheck %s --check-prefix=VALID_FLOAT | ||
// RUN: %dxc -T vs_6_2 -E main -DTY=min16float4 -fcgl %s -spirv | FileCheck %s --check-prefix=VALID_FLOAT | ||
// RUN: %dxc -T vs_6_2 -E main -DTY=half4 -fcgl %s -spirv | FileCheck %s --check-prefix=VALID_FLOAT | ||
|
||
// RUN: not %dxc -T vs_6_2 -E main -enable-16bit-types -DTY=half4 -fcgl %s -spirv 2>&1 | FileCheck %s | ||
// RUN: not %dxc -T vs_6_2 -E main -enable-16bit-types -DTY=min10float4 -fcgl %s -spirv 2>&1 | FileCheck %s | ||
|
||
|
||
// CHECK: error: SV_Position must be a 4-component 32-bit float vector or a composite which recursively contains only such a vector | ||
|
||
// VALID_TY: %ValidType = OpTypeStruct %v4float | ||
// VALID_TY: %output = OpTypeStruct %ValidType | ||
|
||
// VALID_FLOAT: %output = OpTypeStruct %v4float | ||
|
||
|
||
|
||
|
||
struct InvalidType { | ||
float3 x; | ||
}; | ||
|
||
struct ValidType { | ||
float4 x; | ||
}; | ||
|
||
#ifndef ARRAY | ||
#define ARRAY | ||
#endif | ||
|
||
#define POSITION TY x ARRAY | ||
|
||
struct output { | ||
POSITION; | ||
}; | ||
|
||
|
||
|
||
output main() : SV_Position | ||
{ | ||
output result; | ||
return result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// RUN: %dxc -T ps_6_0 -E PSMain -Zi -fcgl %s -spirv | FileCheck %s | ||
|
||
float4 PSMain(float4 color : COLOR) : SV_TARGET { return color; } | ||
// CHECK: float4 PSMain(float4 color : COLOR) : SV_TARGET { return color; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.