Disable opts for loop on MSL as well.

This commit is contained in:
Hans-Kristian Arntzen 2017-11-22 14:51:28 +01:00
Родитель 65cd417630
Коммит 8e14eadb95
4 изменённых файлов: 107 добавлений и 169 удалений

Просмотреть файл

@ -1,169 +0,0 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO
{
float4x4 mvp;
float4 in_data[1];
};
struct SSBO2
{
float4 out_data[1];
};
constant float4 _189 = float4(0);
constant int _191 = int(0);
constant uint _196 = uint(0);
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device SSBO& _24 [[buffer(0)]], device SSBO2& _177 [[buffer(1)]])
{
int _33;
int _50;
uint _12;
uint _52;
uint _79;
uint _65;
float4 _98;
int _100;
int _129;
uint _127;
float4 _123;
uint _125;
int _145;
int _148;
int _154;
float4 _171;
int _185;
uint _186;
if (_24.in_data[gl_GlobalInvocationID.x].y == 20.0)
{
int _183;
uint _184;
_183 = 0;
_184 = 0u;
for (;;)
{
_50 = _183 * 2;
_52 = _184 + uint(1);
if (_52 < gl_GlobalInvocationID.x)
{
_183 = _50;
_184 = _52;
continue;
}
else
{
break;
}
}
_185 = _50;
_186 = _52;
}
else
{
_185 = 0;
_186 = 0u;
}
switch (_185)
{
case 10:
{
uint _187;
_187 = _186;
for (;;)
{
_65 = _187 + uint(1);
_187 = _65;
continue;
}
break;
}
default:
{
uint _188;
_188 = _186;
for (;;)
{
_79 = _188 + 2u;
_188 = _79;
continue;
}
break;
}
}
float4 _190;
_190 = _189;
int _192;
_192 = _191;
while (_192 < 10)
{
_98 = _190 * 2.0;
_100 = _192 + 1;
}
float4 _193;
_193 = _190;
int _194;
_194 = _192;
uint _195;
_195 = 0u;
uint _197;
_197 = _196;
for (; _195 < 16u; _127 = _195 + uint(1), _129 = _194 + 1, _193 = float4 _198, _194 = _129, _195 = _127, _197 = uint _199)
{
_198 = _193;
_199 = 0u;
for (; _199 < 30u; _125 = _199 + uint(1), _198 = _123, _199 = _125)
{
_123 = _24.mvp * _198;
}
}
int _200;
_200 = 0;
for (;;)
{
int _135 = _200 + 1;
if (_135 > 10)
{
}
else
{
_145 = _135 + 3;
int _201;
_201 = _145;
_200 = _201;
continue;
}
_148 = (_135 + 2) + 10;
_201 = _148;
_200 = _201;
continue;
}
int _202;
_202 = 0;
for (;;)
{
_154 = _202 + 1;
if (_154 > 10)
{
_202 = _154;
continue;
}
else
{
break;
}
}
float4 _203;
_203 = _189;
for (;;)
{
_171 = _203 + float4(1.0);
_203 = _171;
continue;
}
_177.out_data[_196] = _189;
}

Просмотреть файл

@ -0,0 +1,107 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO
{
float4x4 mvp;
float4 in_data[1];
};
struct SSBO2
{
float4 out_data[1];
};
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device SSBO& _24 [[buffer(0)]], device SSBO2& _177 [[buffer(1)]])
{
uint ident = gl_GlobalInvocationID.x;
float4 idat = _24.in_data[ident];
int k = 0;
uint i = 0u;
if (idat.y == 20.0)
{
do
{
k *= 2;
i++;
} while (i < ident);
}
switch (k)
{
case 10:
{
for (;;)
{
i++;
if (i > 10u)
{
break;
}
continue;
}
break;
}
default:
{
for (;;)
{
i += 2u;
if (i > 20u)
{
break;
}
continue;
}
break;
}
}
while (k < 10)
{
idat *= 2.0;
k++;
}
for (uint i_1 = 0u; i_1 < 16u; i_1++, k++)
{
for (uint j = 0u; j < 30u; j++)
{
idat = _24.mvp * idat;
}
}
k = 0;
for (;;)
{
k++;
if (k > 10)
{
k += 2;
}
else
{
k += 3;
continue;
}
k += 10;
continue;
}
k = 0;
do
{
k++;
} while (k > 10);
int l = 0;
for (;;)
{
if (l == 5)
{
l++;
continue;
}
idat += float4(1.0);
l++;
continue;
}
_177.out_data[ident] = idat;
}

Просмотреть файл