Welcome to mirror list, hosted at ThFree Co, Russian Federation.

nmin-max-clamp.asm.comp « comp « asm « shaders-hlsl « reference - github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a6e88684fb1888e209d7b2b774448af2e4b43f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
RWByteAddressBuffer _4 : register(u0);

void comp_main()
{
    _4.Store(0, asuint(isnan(asfloat(_4.Load(96))) ? asfloat(_4.Load(48)) : (isnan(asfloat(_4.Load(48))) ? asfloat(_4.Load(96)) : min(asfloat(_4.Load(48)), asfloat(_4.Load(96))))));
    bool2 _145 = isnan(asfloat(_4.Load2(56)));
    bool2 _146 = isnan(asfloat(_4.Load2(104)));
    float2 _147 = min(asfloat(_4.Load2(56)), asfloat(_4.Load2(104)));
    float2 _148 = float2(_145.x ? asfloat(_4.Load2(104)).x : _147.x, _145.y ? asfloat(_4.Load2(104)).y : _147.y);
    _4.Store2(8, asuint(float2(_146.x ? asfloat(_4.Load2(56)).x : _148.x, _146.y ? asfloat(_4.Load2(56)).y : _148.y)));
    bool3 _150 = isnan(asfloat(_4.Load3(64)));
    bool3 _151 = isnan(asfloat(_4.Load3(112)));
    float3 _152 = min(asfloat(_4.Load3(64)), asfloat(_4.Load3(112)));
    float3 _153 = float3(_150.x ? asfloat(_4.Load3(112)).x : _152.x, _150.y ? asfloat(_4.Load3(112)).y : _152.y, _150.z ? asfloat(_4.Load3(112)).z : _152.z);
    _4.Store3(16, asuint(float3(_151.x ? asfloat(_4.Load3(64)).x : _153.x, _151.y ? asfloat(_4.Load3(64)).y : _153.y, _151.z ? asfloat(_4.Load3(64)).z : _153.z)));
    bool4 _155 = isnan(asfloat(_4.Load4(80)));
    bool4 _156 = isnan(asfloat(_4.Load4(128)));
    float4 _157 = min(asfloat(_4.Load4(80)), asfloat(_4.Load4(128)));
    float4 _158 = float4(_155.x ? asfloat(_4.Load4(128)).x : _157.x, _155.y ? asfloat(_4.Load4(128)).y : _157.y, _155.z ? asfloat(_4.Load4(128)).z : _157.z, _155.w ? asfloat(_4.Load4(128)).w : _157.w);
    _4.Store4(32, asuint(float4(_156.x ? asfloat(_4.Load4(80)).x : _158.x, _156.y ? asfloat(_4.Load4(80)).y : _158.y, _156.z ? asfloat(_4.Load4(80)).z : _158.z, _156.w ? asfloat(_4.Load4(80)).w : _158.w)));
    _4.Store(0, asuint(isnan(asfloat(_4.Load(96))) ? asfloat(_4.Load(48)) : (isnan(asfloat(_4.Load(48))) ? asfloat(_4.Load(96)) : max(asfloat(_4.Load(48)), asfloat(_4.Load(96))))));
    bool2 _165 = isnan(asfloat(_4.Load2(56)));
    bool2 _166 = isnan(asfloat(_4.Load2(104)));
    float2 _167 = max(asfloat(_4.Load2(56)), asfloat(_4.Load2(104)));
    float2 _168 = float2(_165.x ? asfloat(_4.Load2(104)).x : _167.x, _165.y ? asfloat(_4.Load2(104)).y : _167.y);
    _4.Store2(8, asuint(float2(_166.x ? asfloat(_4.Load2(56)).x : _168.x, _166.y ? asfloat(_4.Load2(56)).y : _168.y)));
    bool3 _170 = isnan(asfloat(_4.Load3(64)));
    bool3 _171 = isnan(asfloat(_4.Load3(112)));
    float3 _172 = max(asfloat(_4.Load3(64)), asfloat(_4.Load3(112)));
    float3 _173 = float3(_170.x ? asfloat(_4.Load3(112)).x : _172.x, _170.y ? asfloat(_4.Load3(112)).y : _172.y, _170.z ? asfloat(_4.Load3(112)).z : _172.z);
    _4.Store3(16, asuint(float3(_171.x ? asfloat(_4.Load3(64)).x : _173.x, _171.y ? asfloat(_4.Load3(64)).y : _173.y, _171.z ? asfloat(_4.Load3(64)).z : _173.z)));
    bool4 _175 = isnan(asfloat(_4.Load4(80)));
    bool4 _176 = isnan(asfloat(_4.Load4(128)));
    float4 _177 = max(asfloat(_4.Load4(80)), asfloat(_4.Load4(128)));
    float4 _178 = float4(_175.x ? asfloat(_4.Load4(128)).x : _177.x, _175.y ? asfloat(_4.Load4(128)).y : _177.y, _175.z ? asfloat(_4.Load4(128)).z : _177.z, _175.w ? asfloat(_4.Load4(128)).w : _177.w);
    _4.Store4(32, asuint(float4(_176.x ? asfloat(_4.Load4(80)).x : _178.x, _176.y ? asfloat(_4.Load4(80)).y : _178.y, _176.z ? asfloat(_4.Load4(80)).z : _178.z, _176.w ? asfloat(_4.Load4(80)).w : _178.w)));
    float _179 = isnan(asfloat(_4.Load(48))) ? asfloat(_4.Load(0)) : (isnan(asfloat(_4.Load(0))) ? asfloat(_4.Load(48)) : max(asfloat(_4.Load(0)), asfloat(_4.Load(48))));
    _4.Store(0, asuint(isnan(asfloat(_4.Load(96))) ? _179 : (isnan(_179) ? asfloat(_4.Load(96)) : min(_179, asfloat(_4.Load(96))))));
    bool2 _192 = isnan(asfloat(_4.Load2(8)));
    bool2 _193 = isnan(asfloat(_4.Load2(56)));
    float2 _194 = max(asfloat(_4.Load2(8)), asfloat(_4.Load2(56)));
    float2 _195 = float2(_192.x ? asfloat(_4.Load2(56)).x : _194.x, _192.y ? asfloat(_4.Load2(56)).y : _194.y);
    float2 _190 = float2(_193.x ? asfloat(_4.Load2(8)).x : _195.x, _193.y ? asfloat(_4.Load2(8)).y : _195.y);
    bool2 _197 = isnan(_190);
    bool2 _198 = isnan(asfloat(_4.Load2(104)));
    float2 _199 = min(_190, asfloat(_4.Load2(104)));
    float2 _200 = float2(_197.x ? asfloat(_4.Load2(104)).x : _199.x, _197.y ? asfloat(_4.Load2(104)).y : _199.y);
    _4.Store2(8, asuint(float2(_198.x ? _190.x : _200.x, _198.y ? _190.y : _200.y)));
    bool3 _203 = isnan(asfloat(_4.Load3(16)));
    bool3 _204 = isnan(asfloat(_4.Load3(64)));
    float3 _205 = max(asfloat(_4.Load3(16)), asfloat(_4.Load3(64)));
    float3 _206 = float3(_203.x ? asfloat(_4.Load3(64)).x : _205.x, _203.y ? asfloat(_4.Load3(64)).y : _205.y, _203.z ? asfloat(_4.Load3(64)).z : _205.z);
    float3 _201 = float3(_204.x ? asfloat(_4.Load3(16)).x : _206.x, _204.y ? asfloat(_4.Load3(16)).y : _206.y, _204.z ? asfloat(_4.Load3(16)).z : _206.z);
    bool3 _208 = isnan(_201);
    bool3 _209 = isnan(asfloat(_4.Load3(112)));
    float3 _210 = min(_201, asfloat(_4.Load3(112)));
    float3 _211 = float3(_208.x ? asfloat(_4.Load3(112)).x : _210.x, _208.y ? asfloat(_4.Load3(112)).y : _210.y, _208.z ? asfloat(_4.Load3(112)).z : _210.z);
    _4.Store3(16, asuint(float3(_209.x ? _201.x : _211.x, _209.y ? _201.y : _211.y, _209.z ? _201.z : _211.z)));
    bool4 _214 = isnan(asfloat(_4.Load4(32)));
    bool4 _215 = isnan(asfloat(_4.Load4(80)));
    float4 _216 = max(asfloat(_4.Load4(32)), asfloat(_4.Load4(80)));
    float4 _217 = float4(_214.x ? asfloat(_4.Load4(80)).x : _216.x, _214.y ? asfloat(_4.Load4(80)).y : _216.y, _214.z ? asfloat(_4.Load4(80)).z : _216.z, _214.w ? asfloat(_4.Load4(80)).w : _216.w);
    float4 _212 = float4(_215.x ? asfloat(_4.Load4(32)).x : _217.x, _215.y ? asfloat(_4.Load4(32)).y : _217.y, _215.z ? asfloat(_4.Load4(32)).z : _217.z, _215.w ? asfloat(_4.Load4(32)).w : _217.w);
    bool4 _219 = isnan(_212);
    bool4 _220 = isnan(asfloat(_4.Load4(128)));
    float4 _221 = min(_212, asfloat(_4.Load4(128)));
    float4 _222 = float4(_219.x ? asfloat(_4.Load4(128)).x : _221.x, _219.y ? asfloat(_4.Load4(128)).y : _221.y, _219.z ? asfloat(_4.Load4(128)).z : _221.z, _219.w ? asfloat(_4.Load4(128)).w : _221.w);
    _4.Store4(32, asuint(float4(_220.x ? _212.x : _222.x, _220.y ? _212.y : _222.y, _220.z ? _212.z : _222.z, _220.w ? _212.w : _222.w)));
    float _223;
    for (int i = 0; i < 2; i++, _223 = isnan(asfloat(_4.Load(56))) ? asfloat(_4.Load(0)) : (isnan(asfloat(_4.Load(0))) ? asfloat(_4.Load(56)) : max(asfloat(_4.Load(0)), asfloat(_4.Load(56)))), _4.Store(0, asuint(isnan(asfloat(_4.Load(60))) ? _223 : (isnan(_223) ? asfloat(_4.Load(60)) : min(_223, asfloat(_4.Load(60)))))))
    {
        bool2 _235 = isnan(asfloat(_4.Load2(56)));
        bool2 _236 = isnan(asfloat(_4.Load2(104)));
        float2 _237 = min(asfloat(_4.Load2(56)), asfloat(_4.Load2(104)));
        float2 _238 = float2(_235.x ? asfloat(_4.Load2(104)).x : _237.x, _235.y ? asfloat(_4.Load2(104)).y : _237.y);
        _4.Store2(8, asuint(float2(_236.x ? asfloat(_4.Load2(56)).x : _238.x, _236.y ? asfloat(_4.Load2(56)).y : _238.y)));
    }
}

[numthreads(1, 1, 1)]
void main()
{
    comp_main();
}