-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for invalid swizzle causing crash (#4690)
* Fix for invalid swizzle causing crash Fixes #4689 If swizzle code is provided 5+ element swizzle the checkSwizzleExpr code will do an out of bounds array access and crash. * switch test to check for to ensure no crash * cleanup swizzle errors to only emit once --------- Co-authored-by: Yong He <yonghe@outlook.com>
- Loading branch information
Showing
2 changed files
with
22 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//TEST:SIMPLE(filecheck=CHECK): -target spirv -stage compute -entry computeMain -emit-spirv-directly | ||
// CHECK: error 30052 | ||
// CHECK-NOT: error 30052 | ||
RWStructuredBuffer<float> outputBuffer; | ||
|
||
[numthreads(1,1,1)] | ||
void computeMain( uint2 dispatchThreadID : SV_DispatchThreadID ) | ||
{ | ||
float4 vecVal = float4(0); | ||
outputBuffer[0] = vecVal.xxtyxx; | ||
} |