aboutsummaryrefslogtreecommitdiffstats
path: root/examples/hellodevicereset/tdr.hlsl
blob: f32d4fbacebd25237f911a645ac8885809d1ef5b (plain)
1
2
3
4
5
6
7
8
9
10
11
// http://gamedev.stackexchange.com/questions/108141/how-can-i-test-dxgi-error-device-removed-error-handling

RWBuffer<uint> uav;
cbuffer ConstantBuffer { uint zero; }

[numthreads(256, 1, 1)]
void timeout(uint3 id: SV_DispatchThreadID)
{
    while (zero == 0)
        uav[id.x] = zero;
}