blob: 18e8c85977dcb9c1784d4da26983622cf04059c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// spirv-instruction.slang
//TEST(compute, vulkan):SIMPLE:-target glsl -entry computeMain -stage compute
[[vk::spirv_instruction(1, "NonSemantic.DebugBreak")]]
void _spvDebugBreak(int v);
[ForceInline]
void _debugBreak() { _spvDebugBreak(1); }
//TEST_INPUT:set resultBuffer = out ubuffer(data=[0 0 0 0], stride=4)
RWStructuredBuffer<uint> resultBuffer;
[numthreads(4,1,1)]
void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
{
uint threadId = dispatchThreadID.x;
_debugBreak();
resultBuffer[threadId] = threadId + threadId;
}
|