forked from shader-slang/slang
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add load paths to return value check (shader-slang#5042)
- Loading branch information
1 parent
170558c
commit d9fc7bc
Showing
2 changed files
with
30 additions
and
0 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
24 changes: 24 additions & 0 deletions
24
tests/diagnostics/uninitialized-struct-from-constructor.slang
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,24 @@ | ||
//TEST:SIMPLE(filecheck=CHK): -target spirv | ||
|
||
struct TangentSpace | ||
{ | ||
static const float3 localNormal = {0, 1, 0}; | ||
|
||
float4x4 tangentTransform; | ||
float3 geometryNormal; | ||
|
||
__init(in float3 normal, in float3 inRay) | ||
{ | ||
// Should not warn here | ||
tangentTransform = getMatrix(normal, inRay); | ||
geometryNormal = localNormal; | ||
} | ||
|
||
float4x4 getMatrix(in float3 normal, in float3 inRay) | ||
{ | ||
return float4x4(0.0f); | ||
} | ||
} | ||
|
||
//CHK-NOT: warning 41020 | ||
//CHK-NOT: warning 41021 |