SPV: Implement Vulkan 1.1 features and extensions.
This commit is contained in:
53
Test/hlsl.wavebroadcast.comp
Normal file
53
Test/hlsl.wavebroadcast.comp
Normal file
@@ -0,0 +1,53 @@
|
||||
struct Types
|
||||
{
|
||||
uint4 u;
|
||||
int4 i;
|
||||
float4 f;
|
||||
double4 d;
|
||||
};
|
||||
|
||||
RWStructuredBuffer<Types> data;
|
||||
|
||||
[numthreads(32, 16, 1)]
|
||||
void CSMain(uint3 dti : SV_DispatchThreadID)
|
||||
{
|
||||
data[dti.x].u = WaveReadLaneAt(data[dti.x].u, 13);
|
||||
data[dti.x].u.x = WaveReadLaneAt(data[dti.x].u.x, 13);
|
||||
data[dti.x].u.xy = WaveReadLaneAt(data[dti.x].u.xy, 13);
|
||||
data[dti.x].u.xyz = WaveReadLaneAt(data[dti.x].u.xyz, 13);
|
||||
|
||||
data[dti.x].i = WaveReadLaneAt(data[dti.x].i, 13);
|
||||
data[dti.x].i.x = WaveReadLaneAt(data[dti.x].i.x, 13);
|
||||
data[dti.x].i.xy = WaveReadLaneAt(data[dti.x].i.xy, 13);
|
||||
data[dti.x].i.xyz = WaveReadLaneAt(data[dti.x].i.xyz, 13);
|
||||
|
||||
data[dti.x].f = WaveReadLaneAt(data[dti.x].f, 13);
|
||||
data[dti.x].f.x = WaveReadLaneAt(data[dti.x].f.x, 13);
|
||||
data[dti.x].f.xy = WaveReadLaneAt(data[dti.x].f.xy, 13);
|
||||
data[dti.x].f.xyz = WaveReadLaneAt(data[dti.x].f.xyz, 13);
|
||||
|
||||
data[dti.x].d = WaveReadFirstLane(data[dti.x].d);
|
||||
data[dti.x].d.x = WaveReadFirstLane(data[dti.x].d.x);
|
||||
data[dti.x].d.xy = WaveReadFirstLane(data[dti.x].d.xy);
|
||||
data[dti.x].d.xyz = WaveReadFirstLane(data[dti.x].d.xyz);
|
||||
|
||||
data[dti.x].u = WaveReadFirstLane(data[dti.x].u);
|
||||
data[dti.x].u.x = WaveReadFirstLane(data[dti.x].u.x);
|
||||
data[dti.x].u.xy = WaveReadFirstLane(data[dti.x].u.xy);
|
||||
data[dti.x].u.xyz = WaveReadFirstLane(data[dti.x].u.xyz);
|
||||
|
||||
data[dti.x].i = WaveReadFirstLane(data[dti.x].i);
|
||||
data[dti.x].i.x = WaveReadFirstLane(data[dti.x].i.x);
|
||||
data[dti.x].i.xy = WaveReadFirstLane(data[dti.x].i.xy);
|
||||
data[dti.x].i.xyz = WaveReadFirstLane(data[dti.x].i.xyz);
|
||||
|
||||
data[dti.x].f = WaveReadFirstLane(data[dti.x].f);
|
||||
data[dti.x].f.x = WaveReadFirstLane(data[dti.x].f.x);
|
||||
data[dti.x].f.xy = WaveReadFirstLane(data[dti.x].f.xy);
|
||||
data[dti.x].f.xyz = WaveReadFirstLane(data[dti.x].f.xyz);
|
||||
|
||||
data[dti.x].d = WaveReadFirstLane(data[dti.x].d);
|
||||
data[dti.x].d.x = WaveReadFirstLane(data[dti.x].d.x);
|
||||
data[dti.x].d.xy = WaveReadFirstLane(data[dti.x].d.xy);
|
||||
data[dti.x].d.xyz = WaveReadFirstLane(data[dti.x].d.xyz);
|
||||
}
|
||||
Reference in New Issue
Block a user