blob: b801dfd07cb3b117b7053c6323242e51c2f358b9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//DIAGNOSTIC_TEST:SIMPLE(filecheck=CHECK): -stage compute -entry computeMain -target spirv
RWStructuredBuffer<vector<float, 8>> bufferIn1;
RWStructuredBuffer<vector<float, 0>> bufferIn2;
RWStructuredBuffer<float> resultOut;
[shader("compute")]
[numthreads(32,1,1)]
void computeMain(uint3 threadId : SV_DispatchThreadID)
{
// CHECK: error 38203: vector has invalid element count '0', valid values are between '1' and '4' inclusive
// CHECK: error 38203: vector has invalid element count '8', valid values are between '1' and '4' inclusive
uint index = threadId.x;
resultOut[index] = bufferIn1[index][0] + bufferIn2[index][0];
}
|