-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into cheneym2/adapterInfo
- Loading branch information
Showing
6 changed files
with
79 additions
and
35 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// binding-attribute-ignored.slang | ||
// Test that binding attributes on uniforms that get packed into the default uniform buffer trigger a warning | ||
|
||
//TEST:SIMPLE(filecheck=CHECK):-target spirv | ||
|
||
//CHECK: ([[# @LINE+2]]): warning 39071 | ||
[[vk::binding(1, 2)]] | ||
uniform float4 g_position; | ||
|
||
//CHECK: ([[# @LINE+2]]): warning 39071 | ||
[[vk::binding(3, 1)]] | ||
uniform float4x4 g_transform; | ||
|
||
// This won't trigger a warning because it's a texture (not packed into default uniform buffer) | ||
[[vk::binding(0, 0)]] | ||
Texture2D g_texture; | ||
|
||
[shader("vertex")] | ||
float4 main(float4 pos : POSITION) : SV_POSITION | ||
{ | ||
return g_position; | ||
} |
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,13 @@ | ||
// array-zero-size.slang | ||
|
||
// Test that array size cannot be zero | ||
|
||
//TEST:SIMPLE: | ||
|
||
[numthreads(4, 1, 1)] | ||
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) | ||
{ | ||
bar(); | ||
} | ||
|
||
func bar() -> int[0]; // expected-error 30025 "array size must be larger than zero." |
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