Update tests for latest SPIRV-Tools and glslang.

This commit is contained in:
Hans-Kristian Arntzen 2018-03-12 14:58:40 +01:00
parent e8e58844d4
commit 9fbd8b789e
165 changed files with 951 additions and 1525 deletions

View File

@ -11,6 +11,8 @@ struct SPIRV_Cross_Input
uint3 gl_WorkGroupID : SV_GroupID; uint3 gl_WorkGroupID : SV_GroupID;
}; };
static uint3 _22 = gl_WorkGroupSize;
void comp_main() void comp_main()
{ {
_8.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_9.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_8.Load(gl_WorkGroupID.x * 4 + 0)))); _8.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_9.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_8.Load(gl_WorkGroupID.x * 4 + 0))));

View File

@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
void frag_main() void frag_main()
{ {
FragColor = (((1.0f.xxxx + 1.0f.xxxx) + (1.0f.xxx.xyzz + 1.0f.xxxx)) + (1.0f.xxxx + 2.0f.xxxx)) + (1.0f.xx.xyxy + 2.0f.xxxx); FragColor = 10.0f.xxxx;
} }
SPIRV_Cross_Output main() SPIRV_Cross_Output main()

View File

@ -11,25 +11,23 @@ struct SPIRV_Cross_Output
float4 FragColor : SV_Target0; float4 FragColor : SV_Target0;
}; };
float4 _21;
void frag_main() void frag_main()
{ {
float4 _33; bool _29;
do for (;;)
{ {
if (counter == 10) _29 = counter == 10;
if (_29)
{ {
_33 = 10.0f.xxxx;
break; break;
} }
else else
{ {
_33 = 30.0f.xxxx;
break; break;
} }
} while (false); }
FragColor = _33; bool4 _35 = _29.xxxx;
FragColor = float4(_35.x ? 10.0f.xxxx.x : 30.0f.xxxx.x, _35.y ? 10.0f.xxxx.y : 30.0f.xxxx.y, _35.z ? 10.0f.xxxx.z : 30.0f.xxxx.z, _35.w ? 10.0f.xxxx.w : 30.0f.xxxx.w);
} }
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -1,5 +1,3 @@
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
void comp_main() void comp_main()
{ {
GroupMemoryBarrier(); GroupMemoryBarrier();

View File

@ -34,24 +34,26 @@ struct SPIRV_Cross_Input
void comp_main() void comp_main()
{ {
uImageOutF[int2(gl_GlobalInvocationID.xy)] = uImageInF[int2(gl_GlobalInvocationID.xy)].x; int2 _23 = int2(gl_GlobalInvocationID.xy);
uImageOutI[int2(gl_GlobalInvocationID.xy)] = uImageInI[int2(gl_GlobalInvocationID.xy)].x; uImageOutF[_23] = uImageInF[_23].x;
uImageOutU[int2(gl_GlobalInvocationID.xy)] = uImageInU[int2(gl_GlobalInvocationID.xy)].x; uImageOutI[_23] = uImageInI[_23].x;
uImageOutBuffer[int(gl_GlobalInvocationID.x)] = uImageInBuffer[int(gl_GlobalInvocationID.x)].x; uImageOutU[_23] = uImageInU[_23].x;
uImageOutF2[int2(gl_GlobalInvocationID.xy)] = uImageInF2[int2(gl_GlobalInvocationID.xy)].xy; int _74 = int(gl_GlobalInvocationID.x);
uImageOutI2[int2(gl_GlobalInvocationID.xy)] = uImageInI2[int2(gl_GlobalInvocationID.xy)].xy; uImageOutBuffer[_74] = uImageInBuffer[_74].x;
uImageOutU2[int2(gl_GlobalInvocationID.xy)] = uImageInU2[int2(gl_GlobalInvocationID.xy)].xy; uImageOutF2[_23] = uImageInF2[_23].xy;
float4 _135 = uImageInBuffer2[int(gl_GlobalInvocationID.x)].xyyy; uImageOutI2[_23] = uImageInI2[_23].xy;
uImageOutBuffer2[int(gl_GlobalInvocationID.x)] = _135.xy; uImageOutU2[_23] = uImageInU2[_23].xy;
uImageOutF4[int2(gl_GlobalInvocationID.xy)] = uImageInF4[int2(gl_GlobalInvocationID.xy)]; float4 _135 = uImageInBuffer2[_74].xyyy;
int4 _165 = uImageInI4[int2(gl_GlobalInvocationID.xy)]; uImageOutBuffer2[_74] = _135.xy;
uImageOutI4[int2(gl_GlobalInvocationID.xy)] = _165; uImageOutF4[_23] = uImageInF4[_23];
uint4 _180 = uImageInU4[int2(gl_GlobalInvocationID.xy)]; int4 _165 = uImageInI4[_23];
uImageOutU4[int2(gl_GlobalInvocationID.xy)] = _180; uImageOutI4[_23] = _165;
uImageOutBuffer4[int(gl_GlobalInvocationID.x)] = uImageInBuffer4[int(gl_GlobalInvocationID.x)]; uint4 _180 = uImageInU4[_23];
uImageNoFmtF[int2(gl_GlobalInvocationID.xy)] = _135; uImageOutU4[_23] = _180;
uImageNoFmtU[int2(gl_GlobalInvocationID.xy)] = _180; uImageOutBuffer4[_74] = uImageInBuffer4[_74];
uImageNoFmtI[int2(gl_GlobalInvocationID.xy)] = _165; uImageNoFmtF[_23] = _135;
uImageNoFmtU[_23] = _180;
uImageNoFmtI[_23] = _165;
} }
[numthreads(1, 1, 1)] [numthreads(1, 1, 1)]

View File

@ -1,5 +1,3 @@
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
ByteAddressBuffer _22 : register(t0); ByteAddressBuffer _22 : register(t0);
RWByteAddressBuffer _44 : register(u1); RWByteAddressBuffer _44 : register(u1);
@ -17,7 +15,7 @@ void comp_main()
{ {
sShared[gl_LocalInvocationIndex] = asfloat(_22.Load(gl_GlobalInvocationID.x * 4 + 0)); sShared[gl_LocalInvocationIndex] = asfloat(_22.Load(gl_GlobalInvocationID.x * 4 + 0));
GroupMemoryBarrierWithGroupSync(); GroupMemoryBarrierWithGroupSync();
_44.Store(gl_GlobalInvocationID.x * 4 + 0, asuint(sShared[(4u - gl_LocalInvocationIndex) - 1u])); _44.Store(gl_GlobalInvocationID.x * 4 + 0, asuint(sShared[3u - gl_LocalInvocationIndex]));
} }
[numthreads(4, 1, 1)] [numthreads(4, 1, 1)]

View File

@ -16,9 +16,12 @@ struct SPIRV_Cross_Output
void frag_main() void frag_main()
{ {
float lut[5] = _17; float lut[5] = _17;
int _33; for (int _46 = 0; _46 < 4; )
for (int _46 = 0; _46 < 4; _33 = _46 + 1, FragColor += lut[_33].xxxx, _46 = _33)
{ {
int _33 = _46 + 1;
FragColor += lut[_33].xxxx;
_46 = _33;
continue;
} }
} }

View File

@ -2,6 +2,30 @@ Texture1D<uint4> uSampler1DUint : register(t0);
SamplerState _uSampler1DUint_sampler : register(s0); SamplerState _uSampler1DUint_sampler : register(s0);
Texture1D<int4> uSampler1DInt : register(t0); Texture1D<int4> uSampler1DInt : register(t0);
SamplerState _uSampler1DInt_sampler : register(s0); SamplerState _uSampler1DInt_sampler : register(s0);
Texture1D<float4> uSampler1DFloat : register(t0);
SamplerState _uSampler1DFloat_sampler : register(s0);
Texture2DArray<int4> uSampler2DArray : register(t2);
SamplerState _uSampler2DArray_sampler : register(s2);
Texture3D<float4> uSampler3D : register(t3);
SamplerState _uSampler3D_sampler : register(s3);
TextureCube<float4> uSamplerCube : register(t4);
SamplerState _uSamplerCube_sampler : register(s4);
TextureCubeArray<uint4> uSamplerCubeArray : register(t5);
SamplerState _uSamplerCubeArray_sampler : register(s5);
Buffer<float4> uSamplerBuffer : register(t6);
Texture2DMS<int4> uSamplerMS : register(t7);
SamplerState _uSamplerMS_sampler : register(s7);
Texture2DMSArray<float4> uSamplerMSArray : register(t8);
SamplerState _uSamplerMSArray_sampler : register(s8);
Texture2D<float4> uSampler2D : register(t1);
SamplerState _uSampler2D_sampler : register(s1);
uint SPIRV_Cross_textureSize(Texture1D<float4> Tex, uint Level, out uint Param)
{
uint ret;
Tex.GetDimensions(Level, ret.x, Param);
return ret;
}
uint SPIRV_Cross_textureSize(Texture1D<int4> Tex, uint Level, out uint Param) uint SPIRV_Cross_textureSize(Texture1D<int4> Tex, uint Level, out uint Param)
{ {
@ -17,10 +41,87 @@ uint SPIRV_Cross_textureSize(Texture1D<uint4> Tex, uint Level, out uint Param)
return ret; return ret;
} }
uint2 SPIRV_Cross_textureSize(Texture2D<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(Texture2DArray<int4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(Texture3D<float4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
return ret;
}
uint SPIRV_Cross_textureSize(Buffer<float4> Tex, uint Level, out uint Param)
{
uint ret;
Tex.GetDimensions(ret.x);
Param = 0u;
return ret;
}
uint2 SPIRV_Cross_textureSize(TextureCube<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(TextureCubeArray<uint4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
return ret;
}
uint2 SPIRV_Cross_textureSize(Texture2DMS<int4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(ret.x, ret.y, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(Texture2DMSArray<float4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(ret.x, ret.y, ret.z, Param);
return ret;
}
void frag_main() void frag_main()
{ {
uint _17_dummy_parameter; uint _17_dummy_parameter;
uint _24_dummy_parameter; uint _24_dummy_parameter;
uint _32_dummy_parameter;
uint _42_dummy_parameter;
uint _50_dummy_parameter;
uint _60_dummy_parameter;
uint _68_dummy_parameter;
uint _76_dummy_parameter;
uint _84_dummy_parameter;
uint _92_dummy_parameter;
int _100;
SPIRV_Cross_textureSize(uSampler2D, 0u, _100);
int _104;
SPIRV_Cross_textureSize(uSampler2DArray, 0u, _104);
int _108;
SPIRV_Cross_textureSize(uSampler3D, 0u, _108);
int _112;
SPIRV_Cross_textureSize(uSamplerCube, 0u, _112);
int _116;
SPIRV_Cross_textureSize(uSamplerMS, 0u, _116);
int _120;
SPIRV_Cross_textureSize(uSamplerMSArray, 0u, _120);
} }
void main() void main()

View File

@ -1,5 +1,112 @@
Texture1D<float4> uSampler1D : register(t0);
SamplerState _uSampler1D_sampler : register(s0);
Texture2D<float4> uSampler2D : register(t1);
SamplerState _uSampler2D_sampler : register(s1);
Texture2DArray<float4> uSampler2DArray : register(t2);
SamplerState _uSampler2DArray_sampler : register(s2);
Texture3D<float4> uSampler3D : register(t3);
SamplerState _uSampler3D_sampler : register(s3);
TextureCube<float4> uSamplerCube : register(t4);
SamplerState _uSamplerCube_sampler : register(s4);
TextureCubeArray<float4> uSamplerCubeArray : register(t5);
SamplerState _uSamplerCubeArray_sampler : register(s5);
Buffer<float4> uSamplerBuffer : register(t6);
Texture2DMS<float4> uSamplerMS : register(t7);
SamplerState _uSamplerMS_sampler : register(s7);
Texture2DMSArray<float4> uSamplerMSArray : register(t8);
SamplerState _uSamplerMSArray_sampler : register(s8);
uint SPIRV_Cross_textureSize(Texture1D<float4> Tex, uint Level, out uint Param)
{
uint ret;
Tex.GetDimensions(Level, ret.x, Param);
return ret;
}
uint2 SPIRV_Cross_textureSize(Texture2D<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(Texture2DArray<float4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(Texture3D<float4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
return ret;
}
uint SPIRV_Cross_textureSize(Buffer<float4> Tex, uint Level, out uint Param)
{
uint ret;
Tex.GetDimensions(ret.x);
Param = 0u;
return ret;
}
uint2 SPIRV_Cross_textureSize(TextureCube<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(TextureCubeArray<float4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(Level, ret.x, ret.y, ret.z, Param);
return ret;
}
uint2 SPIRV_Cross_textureSize(Texture2DMS<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(ret.x, ret.y, Param);
return ret;
}
uint3 SPIRV_Cross_textureSize(Texture2DMSArray<float4> Tex, uint Level, out uint Param)
{
uint3 ret;
Tex.GetDimensions(ret.x, ret.y, ret.z, Param);
return ret;
}
void frag_main() void frag_main()
{ {
uint _17_dummy_parameter;
uint _27_dummy_parameter;
uint _37_dummy_parameter;
uint _45_dummy_parameter;
uint _53_dummy_parameter;
uint _61_dummy_parameter;
uint _69_dummy_parameter;
uint _77_dummy_parameter;
uint _85_dummy_parameter;
int _89;
SPIRV_Cross_textureSize(uSampler1D, 0u, _89);
int _93;
SPIRV_Cross_textureSize(uSampler2D, 0u, _93);
int _97;
SPIRV_Cross_textureSize(uSampler2DArray, 0u, _97);
int _101;
SPIRV_Cross_textureSize(uSampler3D, 0u, _101);
int _105;
SPIRV_Cross_textureSize(uSamplerCube, 0u, _105);
int _109;
SPIRV_Cross_textureSize(uSamplerCubeArray, 0u, _109);
int _113;
SPIRV_Cross_textureSize(uSamplerMS, 0u, _113);
int _117;
SPIRV_Cross_textureSize(uSamplerMSArray, 0u, _117);
} }
void main() void main()

View File

@ -1,9 +1,3 @@
struct B
{
float a;
float b;
};
void frag_main() void frag_main()
{ {
} }

View File

@ -4,7 +4,7 @@ cbuffer cbuf : register(b3)
}; };
cbuffer registers cbuffer registers
{ {
float4 registers_d : packoffset(c0); float4 registers_a : packoffset(c0);
}; };
Texture2D<float4> uSampledImage : register(t4); Texture2D<float4> uSampledImage : register(t4);
SamplerState _uSampledImage_sampler : register(s4); SamplerState _uSampledImage_sampler : register(s4);
@ -26,7 +26,7 @@ struct SPIRV_Cross_Output
void frag_main() void frag_main()
{ {
FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_d); FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_a);
} }
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -41,9 +41,7 @@ void frag_main()
{ {
float4 _80 = vDirRef; float4 _80 = vDirRef;
_80.z = vDirRef.w; _80.z = vDirRef.w;
float4 _87 = vDirRef; FragColor = (((((((uSampler2D.SampleCmp(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1)) + uSampler2DArray.SampleCmp(_uSampler2DArray_sampler, vDirRef.xyz, vDirRef.w, int2(-1, -1))) + uSamplerCube.SampleCmp(_uSamplerCube_sampler, vDirRef.xyz, vDirRef.w)) + uSamplerCubeArray.SampleCmp(_uSamplerCubeArray_sampler, vDirRef, 0.5f)) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1))) + uSampler2DArray.SampleCmpLevelZero(_uSampler2DArray_sampler, vDirRef.xyz, vDirRef.w, int2(-1, -1))) + uSamplerCube.SampleCmpLevelZero(_uSamplerCube_sampler, vDirRef.xyz, vDirRef.w)) + uSampler2D.SampleCmp(_uSampler2D_sampler, SPIRV_Cross_projectTextureCoordinate(_80.xyz), vDirRef.z, int2(1, 1))) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, SPIRV_Cross_projectTextureCoordinate(_80.xyz), vDirRef.z, int2(1, 1));
_87.z = vDirRef.w;
FragColor = (((((((uSampler2D.SampleCmp(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1)) + uSampler2DArray.SampleCmp(_uSampler2DArray_sampler, vDirRef.xyz, vDirRef.w, int2(-1, -1))) + uSamplerCube.SampleCmp(_uSamplerCube_sampler, vDirRef.xyz, vDirRef.w)) + uSamplerCubeArray.SampleCmp(_uSamplerCubeArray_sampler, vDirRef, 0.5f)) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, vUVRef.xy, vUVRef.z, int2(-1, -1))) + uSampler2DArray.SampleCmpLevelZero(_uSampler2DArray_sampler, vDirRef.xyz, vDirRef.w, int2(-1, -1))) + uSamplerCube.SampleCmpLevelZero(_uSamplerCube_sampler, vDirRef.xyz, vDirRef.w)) + uSampler2D.SampleCmp(_uSampler2D_sampler, SPIRV_Cross_projectTextureCoordinate(_80.xyz), vDirRef.z, int2(1, 1))) + uSampler2D.SampleCmpLevelZero(_uSampler2D_sampler, SPIRV_Cross_projectTextureCoordinate(_87.xyz), vDirRef.z, int2(1, 1));
} }
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -17,7 +17,8 @@ struct SPIRV_Cross_Input
void frag_main() void frag_main()
{ {
uImage[vIndex][int2(gl_FragCoord.xy)] = ((uCombined[vIndex].Sample(_uCombined_sampler[vIndex], vTex) + uTex[vIndex].Sample(uSampler[vIndex], vTex)) + (uCombined[vIndex + 1].Sample(_uCombined_sampler[vIndex + 1], vTex))) + (uTex[vIndex + 1].Sample(uSampler[vIndex + 1], vTex)); int _72 = vIndex + 1;
uImage[vIndex][int2(gl_FragCoord.xy)] = ((uCombined[vIndex].Sample(_uCombined_sampler[vIndex], vTex) + uTex[vIndex].Sample(uSampler[vIndex], vTex)) + uCombined[_72].Sample(_uCombined_sampler[_72], vTex)) + uTex[_72].Sample(uSampler[_72], vTex);
} }
void main(SPIRV_Cross_Input stage_input) void main(SPIRV_Cross_Input stage_input)

View File

@ -17,11 +17,9 @@ struct SPIRV_Cross_Output
void frag_main() void frag_main()
{ {
float vec0[(c + 3)][8];
vec0[0][0] = 10.0f;
Foo foo; Foo foo;
foo.elems[c] = 10.0f; foo.elems[c] = 10.0f;
FragColor = (((a + b).xxxx + vec0[0][0].xxxx) + 20.0f.xxxx) + foo.elems[c].xxxx; FragColor = ((a + b).xxxx + 30.0f.xxxx) + foo.elems[c].xxxx;
} }
SPIRV_Cross_Output main() SPIRV_Cross_Output main()

View File

@ -1,27 +1,27 @@
Texture1D<float4> tex1d; Texture1D<float4> tex1d : register(t0);
SamplerState _tex1d_sampler; SamplerState _tex1d_sampler : register(s0);
Texture2D<float4> tex2d; Texture2D<float4> tex2d : register(t1);
SamplerState _tex2d_sampler; SamplerState _tex2d_sampler : register(s1);
Texture3D<float4> tex3d; Texture3D<float4> tex3d : register(t2);
SamplerState _tex3d_sampler; SamplerState _tex3d_sampler : register(s2);
TextureCube<float4> texCube; TextureCube<float4> texCube : register(t3);
SamplerState _texCube_sampler; SamplerState _texCube_sampler : register(s3);
Texture1D<float4> tex1dShadow; Texture1D<float4> tex1dShadow : register(t4);
SamplerComparisonState _tex1dShadow_sampler; SamplerComparisonState _tex1dShadow_sampler : register(s4);
Texture2D<float4> tex2dShadow; Texture2D<float4> tex2dShadow : register(t5);
SamplerComparisonState _tex2dShadow_sampler; SamplerComparisonState _tex2dShadow_sampler : register(s5);
TextureCube<float4> texCubeShadow; TextureCube<float4> texCubeShadow : register(t6);
SamplerComparisonState _texCubeShadow_sampler; SamplerComparisonState _texCubeShadow_sampler : register(s6);
Texture1DArray<float4> tex1dArray; Texture1DArray<float4> tex1dArray : register(t7);
SamplerState _tex1dArray_sampler; SamplerState _tex1dArray_sampler : register(s7);
Texture2DArray<float4> tex2dArray; Texture2DArray<float4> tex2dArray : register(t8);
SamplerState _tex2dArray_sampler; SamplerState _tex2dArray_sampler : register(s8);
TextureCubeArray<float4> texCubeArray; TextureCubeArray<float4> texCubeArray : register(t9);
SamplerState _texCubeArray_sampler; SamplerState _texCubeArray_sampler : register(s9);
Texture2D<float4> separateTex2d; Texture2D<float4> separateTex2d : register(t12);
SamplerState samplerNonDepth; SamplerState samplerNonDepth : register(s11);
Texture2D<float4> separateTex2dDepth; Texture2D<float4> separateTex2dDepth : register(t13);
SamplerComparisonState samplerDepth; SamplerComparisonState samplerDepth : register(s10);
static float texCoord1d; static float texCoord1d;
static float2 texCoord2d; static float2 texCoord2d;
@ -60,14 +60,8 @@ float3 SPIRV_Cross_projectTextureCoordinate(float4 coord)
void frag_main() void frag_main()
{ {
float4 _162 = (((((((((((((((((((tex1d.Sample(_tex1d_sampler, texCoord1d) + tex1d.Sample(_tex1d_sampler, texCoord1d, 1)) + tex1d.SampleLevel(_tex1d_sampler, texCoord1d, 2.0f)) + tex1d.SampleGrad(_tex1d_sampler, texCoord1d, 1.0f, 2.0f)) + tex1d.Sample(_tex1d_sampler, SPIRV_Cross_projectTextureCoordinate(float2(texCoord1d, 2.0f)))) + tex1d.SampleBias(_tex1d_sampler, texCoord1d, 1.0f)) + tex2d.Sample(_tex2d_sampler, texCoord2d)) + tex2d.Sample(_tex2d_sampler, texCoord2d, int2(1, 2))) + tex2d.SampleLevel(_tex2d_sampler, texCoord2d, 2.0f)) + tex2d.SampleGrad(_tex2d_sampler, texCoord2d, float2(1.0f, 2.0f), float2(3.0f, 4.0f))) + tex2d.Sample(_tex2d_sampler, SPIRV_Cross_projectTextureCoordinate(float3(texCoord2d, 2.0f)))) + tex2d.SampleBias(_tex2d_sampler, texCoord2d, 1.0f)) + tex3d.Sample(_tex3d_sampler, texCoord3d)) + tex3d.Sample(_tex3d_sampler, texCoord3d, int3(1, 2, 3))) + tex3d.SampleLevel(_tex3d_sampler, texCoord3d, 2.0f)) + tex3d.SampleGrad(_tex3d_sampler, texCoord3d, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f))) + tex3d.Sample(_tex3d_sampler, SPIRV_Cross_projectTextureCoordinate(float4(texCoord3d, 2.0f)))) + tex3d.SampleBias(_tex3d_sampler, texCoord3d, 1.0f)) + texCube.Sample(_texCube_sampler, texCoord3d)) + texCube.SampleLevel(_texCube_sampler, texCoord3d, 2.0f)) + texCube.SampleBias(_texCube_sampler, texCoord3d, 1.0f); float4 _162 = (((((((((((((((((((tex1d.Sample(_tex1d_sampler, texCoord1d) + tex1d.Sample(_tex1d_sampler, texCoord1d, 1)) + tex1d.SampleLevel(_tex1d_sampler, texCoord1d, 2.0f)) + tex1d.SampleGrad(_tex1d_sampler, texCoord1d, 1.0f, 2.0f)) + tex1d.Sample(_tex1d_sampler, SPIRV_Cross_projectTextureCoordinate(float2(texCoord1d, 2.0f)))) + tex1d.SampleBias(_tex1d_sampler, texCoord1d, 1.0f)) + tex2d.Sample(_tex2d_sampler, texCoord2d)) + tex2d.Sample(_tex2d_sampler, texCoord2d, int2(1, 2))) + tex2d.SampleLevel(_tex2d_sampler, texCoord2d, 2.0f)) + tex2d.SampleGrad(_tex2d_sampler, texCoord2d, float2(1.0f, 2.0f), float2(3.0f, 4.0f))) + tex2d.Sample(_tex2d_sampler, SPIRV_Cross_projectTextureCoordinate(float3(texCoord2d, 2.0f)))) + tex2d.SampleBias(_tex2d_sampler, texCoord2d, 1.0f)) + tex3d.Sample(_tex3d_sampler, texCoord3d)) + tex3d.Sample(_tex3d_sampler, texCoord3d, int3(1, 2, 3))) + tex3d.SampleLevel(_tex3d_sampler, texCoord3d, 2.0f)) + tex3d.SampleGrad(_tex3d_sampler, texCoord3d, float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f))) + tex3d.Sample(_tex3d_sampler, SPIRV_Cross_projectTextureCoordinate(float4(texCoord3d, 2.0f)))) + tex3d.SampleBias(_tex3d_sampler, texCoord3d, 1.0f)) + texCube.Sample(_texCube_sampler, texCoord3d)) + texCube.SampleLevel(_texCube_sampler, texCoord3d, 2.0f)) + texCube.SampleBias(_texCube_sampler, texCoord3d, 1.0f);
float _178 = _162.w + tex1dShadow.SampleCmp(_tex1dShadow_sampler, float3(texCoord1d, 0.0f, 0.0f).x, 0.0f); float4 _335 = _162;
float4 _327 = _162; _335.w = ((_162.w + tex1dShadow.SampleCmp(_tex1dShadow_sampler, float3(texCoord1d, 0.0f, 0.0f).x, 0.0f)) + tex2dShadow.SampleCmp(_tex2dShadow_sampler, float3(texCoord2d, 0.0f).xy, 0.0f)) + texCubeShadow.SampleCmp(_texCubeShadow_sampler, float4(texCoord3d, 0.0f).xyz, 0.0f);
_327.w = _178;
float _193 = _178 + tex2dShadow.SampleCmp(_tex2dShadow_sampler, float3(texCoord2d, 0.0f).xy, 0.0f);
float4 _331 = _327;
_331.w = _193;
float4 _335 = _331;
_335.w = _193 + texCubeShadow.SampleCmp(_texCubeShadow_sampler, float4(texCoord3d, 0.0f).xyz, 0.0f);
float4 _308 = ((((((((((((((_335 + tex1dArray.Sample(_tex1dArray_sampler, texCoord2d)) + tex2dArray.Sample(_tex2dArray_sampler, texCoord3d)) + texCubeArray.Sample(_texCubeArray_sampler, texCoord4d)) + tex2d.GatherRed(_tex2d_sampler, texCoord2d)) + tex2d.GatherRed(_tex2d_sampler, texCoord2d)) + tex2d.GatherGreen(_tex2d_sampler, texCoord2d)) + tex2d.GatherBlue(_tex2d_sampler, texCoord2d)) + tex2d.GatherAlpha(_tex2d_sampler, texCoord2d)) + tex2d.GatherRed(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherRed(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherGreen(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherBlue(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherAlpha(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.Load(int3(int2(1, 2), 0))) + separateTex2d.Sample(samplerNonDepth, texCoord2d); float4 _308 = ((((((((((((((_335 + tex1dArray.Sample(_tex1dArray_sampler, texCoord2d)) + tex2dArray.Sample(_tex2dArray_sampler, texCoord3d)) + texCubeArray.Sample(_texCubeArray_sampler, texCoord4d)) + tex2d.GatherRed(_tex2d_sampler, texCoord2d)) + tex2d.GatherRed(_tex2d_sampler, texCoord2d)) + tex2d.GatherGreen(_tex2d_sampler, texCoord2d)) + tex2d.GatherBlue(_tex2d_sampler, texCoord2d)) + tex2d.GatherAlpha(_tex2d_sampler, texCoord2d)) + tex2d.GatherRed(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherRed(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherGreen(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherBlue(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.GatherAlpha(_tex2d_sampler, texCoord2d, int2(1, 1))) + tex2d.Load(int3(int2(1, 2), 0))) + separateTex2d.Sample(samplerNonDepth, texCoord2d);
float4 _339 = _308; float4 _339 = _308;
_339.w = _308.w + separateTex2dDepth.SampleCmp(samplerDepth, texCoord3d.xy, texCoord3d.z); _339.w = _308.w + separateTex2dDepth.SampleCmp(samplerDepth, texCoord3d.xy, texCoord3d.z);

View File

@ -15,7 +15,7 @@ struct SPIRV_Cross_Output
void frag_main() void frag_main()
{ {
FragColor = -(-vIn); FragColor = vIn;
} }
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)

View File

@ -5,6 +5,8 @@ struct Foo
float3 c; float3 c;
}; };
static const Foo _71 = { 1.0f.xxx, 1.0f.xxx, 1.0f.xxx };
static float4 gl_Position; static float4 gl_Position;
static float4 Input2; static float4 Input2;
static float4 Input4; static float4 Input4;
@ -40,8 +42,6 @@ struct SPIRV_Cross_Output
float4 gl_Position : SV_Position; float4 gl_Position : SV_Position;
}; };
Foo _70;
void vert_main() void vert_main()
{ {
gl_Position = ((1.0f.xxxx + Input2) + Input4) + Input0; gl_Position = ((1.0f.xxxx + Input2) + Input4) + Input0;
@ -49,13 +49,7 @@ void vert_main()
vLocation1 = 1.0f; vLocation1 = 1.0f;
vLocation2[0] = 2.0f; vLocation2[0] = 2.0f;
vLocation2[1] = 2.0f; vLocation2[1] = 2.0f;
Foo _65 = _70; vLocation4 = _71;
_65.a = 1.0f.xxx;
Foo _67 = _65;
_67.b = 1.0f.xxx;
Foo _69 = _67;
_69.c = 1.0f.xxx;
vLocation4 = _69;
vLocation9 = 9.0f; vLocation9 = 9.0f;
vout.color = 2.0f.xxx; vout.color = 2.0f.xxx;
vout.foo = 4.0f.xxx; vout.foo = 4.0f.xxx;

View File

@ -1,5 +1,3 @@
static const float4 _20[2] = { 10.0f.xxxx, 20.0f.xxxx };
static float4 gl_Position; static float4 gl_Position;
static float4 vInput0; static float4 vInput0;
static float4 vInput1; static float4 vInput1;

View File

@ -3,12 +3,6 @@
using namespace metal; using namespace metal;
constant uint _5_tmp [[function_constant(10)]];
constant uint _5 = is_function_constant_defined(_5_tmp) ? _5_tmp : 9u;
constant uint _6_tmp [[function_constant(12)]];
constant uint _6 = is_function_constant_defined(_6_tmp) ? _6_tmp : 4u;
constant uint3 gl_WorkGroupSize = uint3(_5, 20u, _6);
struct SSBO struct SSBO
{ {
float a; float a;

View File

@ -16,6 +16,7 @@ struct _6
kernel void main0(device _6& _8 [[buffer(0)]], device _6& _9 [[buffer(1)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]]) kernel void main0(device _6& _8 [[buffer(0)]], device _6& _9 [[buffer(1)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]])
{ {
uint3 _23 = gl_WorkGroupSize;
_8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x]; _8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x];
} }

View File

@ -3,29 +3,7 @@
using namespace metal; using namespace metal;
struct _9 constant float _57 = {};
{
float _m0;
};
struct _10
{
float _m0;
float _m1;
float _m2;
float _m3;
float _m4;
float _m5;
float _m6;
float _m7;
float _m8;
float _m9;
float _m10;
float _m11;
_9 _m12;
};
constant _10 _51 = {};
struct main0_out struct main0_out
{ {
@ -35,7 +13,7 @@ struct main0_out
fragment main0_out main0() fragment main0_out main0()
{ {
main0_out out = {}; main0_out out = {};
out.m_3 = float4(_51._m0, _51._m1, _51._m2, _51._m3); out.m_3 = float4(_57);
return out; return out;
} }

View File

@ -11,7 +11,7 @@ struct main0_out
fragment main0_out main0() fragment main0_out main0()
{ {
main0_out out = {}; main0_out out = {};
out.FragColor = (((float4(1.0) + float4(1.0)) + (float3(1.0).xyzz + float4(1.0))) + (float4(1.0) + float4(2.0))) + (float2(1.0).xyxy + float4(2.0)); out.FragColor = float4(10.0);
return out; return out;
} }

View File

@ -3,12 +3,6 @@
using namespace metal; using namespace metal;
struct D
{
float4 a;
float b;
};
struct main0_out struct main0_out
{ {
float FragColor [[color(0)]]; float FragColor [[color(0)]];

View File

@ -5,8 +5,5 @@ using namespace metal;
fragment void main0() fragment void main0()
{ {
for (int _22 = 35; _22 >= 0; _22--)
{
}
} }

View File

@ -3,9 +3,6 @@
using namespace metal; using namespace metal;
constant float4 _38 = {};
constant float4 _50 = {};
struct main0_out struct main0_out
{ {
float4 _entryPointOutput [[color(0)]]; float4 _entryPointOutput [[color(0)]];
@ -14,25 +11,7 @@ struct main0_out
fragment main0_out main0() fragment main0_out main0()
{ {
main0_out out = {}; main0_out out = {};
float4 _51; out._entryPointOutput = float4(1.0, 1.0, 0.0, 1.0);
_51 = _50;
float4 _52;
for (;;)
{
if (0.0 != 0.0)
{
_52 = float4(1.0, 0.0, 0.0, 1.0);
break;
}
else
{
_52 = float4(1.0, 1.0, 0.0, 1.0);
break;
}
_52 = _38;
break;
}
out._entryPointOutput = _52;
return out; return out;
} }

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant float4 _21 = {};
struct main0_in struct main0_in
{ {
int counter [[user(locn0)]]; int counter [[user(locn0)]];
@ -18,21 +16,21 @@ struct main0_out
fragment main0_out main0(main0_in in [[stage_in]]) fragment main0_out main0(main0_in in [[stage_in]])
{ {
main0_out out = {}; main0_out out = {};
float4 _33; bool _29;
do for (;;)
{ {
if (in.counter == 10) _29 = in.counter == 10;
if (_29)
{ {
_33 = float4(10.0);
break; break;
} }
else else
{ {
_33 = float4(30.0);
break; break;
} }
} while (false); }
out.FragColor = _33; bool4 _35 = bool4(_29);
out.FragColor = float4(_35.x ? float4(10.0).x : float4(30.0).x, _35.y ? float4(10.0).y : float4(30.0).y, _35.z ? float4(10.0).z : float4(30.0).z, _35.w ? float4(10.0).w : float4(30.0).w);
return out; return out;
} }

View File

@ -98,34 +98,33 @@ struct main0_out
fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buffer(1)]], constant _18& _19 [[buffer(2)]], texture2d<float> _8 [[texture(0)]], texture2d<float> _12 [[texture(1)]], texture2d<float> _14 [[texture(2)]], sampler _9 [[sampler(0)]], sampler _13 [[sampler(1)]], sampler _15 [[sampler(2)]], float4 gl_FragCoord [[position]]) fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buffer(1)]], constant _18& _19 [[buffer(2)]], texture2d<float> _8 [[texture(0)]], texture2d<float> _12 [[texture(1)]], texture2d<float> _14 [[texture(2)]], sampler _9 [[sampler(0)]], sampler _13 [[sampler(1)]], sampler _15 [[sampler(2)]], float4 gl_FragCoord [[position]])
{ {
main0_out out = {}; main0_out out = {};
_28 _77 = _74;
_77._m0 = float4(0.0);
float2 _82 = gl_FragCoord.xy * _19._m23.xy; float2 _82 = gl_FragCoord.xy * _19._m23.xy;
float4 _88 = _7._m2 * _7._m0.xyxy; float4 _88 = _7._m2 * _7._m0.xyxy;
float2 _97 = clamp(_82 + (float3(0.0, -2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); float2 _95 = _88.xy;
float2 _96 = _88.zw;
float2 _97 = clamp(_82 + (float2(0.0, -2.0) * _7._m0.xy), _95, _96);
float3 _109 = _11._m5 * clamp(_8.sample(_9, _97, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _109 = _11._m5 * clamp(_8.sample(_9, _97, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _113 = _12.sample(_13, _97, level(0.0)); float4 _113 = _12.sample(_13, _97, level(0.0));
float _114 = _113.y;
float3 _129; float3 _129;
if (_113.y > 0.0) if (_114 > 0.0)
{ {
_129 = _109 + (_14.sample(_15, _97, level(0.0)).xyz * clamp(_113.y * _113.z, 0.0, 1.0)); _129 = _109 + (_14.sample(_15, _97, level(0.0)).xyz * clamp(_114 * _113.z, 0.0, 1.0));
} }
else else
{ {
_129 = _109; _129 = _109;
} }
float3 _130 = _129 * 0.5; float3 _130 = _129 * 0.5;
float3 _133 = float4(0.0).xyz + _130; float4 _134 = float4(_130.x, _130.y, _130.z, float4(0.0).w);
float4 _134 = float4(_133.x, _133.y, _133.z, float4(0.0).w); float2 _144 = clamp(_82 + (float2(-1.0) * _7._m0.xy), _95, _96);
_28 _135 = _77;
_135._m0 = _134;
float2 _144 = clamp(_82 + (float3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _156 = _11._m5 * clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _156 = _11._m5 * clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _160 = _12.sample(_13, _144, level(0.0)); float4 _160 = _12.sample(_13, _144, level(0.0));
float _161 = _160.y;
float3 _176; float3 _176;
if (_160.y > 0.0) if (_161 > 0.0)
{ {
_176 = _156 + (_14.sample(_15, _144, level(0.0)).xyz * clamp(_160.y * _160.z, 0.0, 1.0)); _176 = _156 + (_14.sample(_15, _144, level(0.0)).xyz * clamp(_161 * _160.z, 0.0, 1.0));
} }
else else
{ {
@ -134,15 +133,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _177 = _176 * 0.5; float3 _177 = _176 * 0.5;
float3 _180 = _134.xyz + _177; float3 _180 = _134.xyz + _177;
float4 _181 = float4(_180.x, _180.y, _180.z, _134.w); float4 _181 = float4(_180.x, _180.y, _180.z, _134.w);
_28 _182 = _135; float2 _191 = clamp(_82 + (float2(0.0, -1.0) * _7._m0.xy), _95, _96);
_182._m0 = _181;
float2 _191 = clamp(_82 + (float3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _203 = _11._m5 * clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _203 = _11._m5 * clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _207 = _12.sample(_13, _191, level(0.0)); float4 _207 = _12.sample(_13, _191, level(0.0));
float _208 = _207.y;
float3 _223; float3 _223;
if (_207.y > 0.0) if (_208 > 0.0)
{ {
_223 = _203 + (_14.sample(_15, _191, level(0.0)).xyz * clamp(_207.y * _207.z, 0.0, 1.0)); _223 = _203 + (_14.sample(_15, _191, level(0.0)).xyz * clamp(_208 * _207.z, 0.0, 1.0));
} }
else else
{ {
@ -151,15 +149,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _224 = _223 * 0.75; float3 _224 = _223 * 0.75;
float3 _227 = _181.xyz + _224; float3 _227 = _181.xyz + _224;
float4 _228 = float4(_227.x, _227.y, _227.z, _181.w); float4 _228 = float4(_227.x, _227.y, _227.z, _181.w);
_28 _229 = _182; float2 _238 = clamp(_82 + (float2(1.0, -1.0) * _7._m0.xy), _95, _96);
_229._m0 = _228;
float2 _238 = clamp(_82 + (float3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _250 = _11._m5 * clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _250 = _11._m5 * clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _254 = _12.sample(_13, _238, level(0.0)); float4 _254 = _12.sample(_13, _238, level(0.0));
float _255 = _254.y;
float3 _270; float3 _270;
if (_254.y > 0.0) if (_255 > 0.0)
{ {
_270 = _250 + (_14.sample(_15, _238, level(0.0)).xyz * clamp(_254.y * _254.z, 0.0, 1.0)); _270 = _250 + (_14.sample(_15, _238, level(0.0)).xyz * clamp(_255 * _254.z, 0.0, 1.0));
} }
else else
{ {
@ -168,15 +165,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _271 = _270 * 0.5; float3 _271 = _270 * 0.5;
float3 _274 = _228.xyz + _271; float3 _274 = _228.xyz + _271;
float4 _275 = float4(_274.x, _274.y, _274.z, _228.w); float4 _275 = float4(_274.x, _274.y, _274.z, _228.w);
_28 _276 = _229; float2 _285 = clamp(_82 + (float2(-2.0, 0.0) * _7._m0.xy), _95, _96);
_276._m0 = _275;
float2 _285 = clamp(_82 + (float3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _297 = _11._m5 * clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _297 = _11._m5 * clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _301 = _12.sample(_13, _285, level(0.0)); float4 _301 = _12.sample(_13, _285, level(0.0));
float _302 = _301.y;
float3 _317; float3 _317;
if (_301.y > 0.0) if (_302 > 0.0)
{ {
_317 = _297 + (_14.sample(_15, _285, level(0.0)).xyz * clamp(_301.y * _301.z, 0.0, 1.0)); _317 = _297 + (_14.sample(_15, _285, level(0.0)).xyz * clamp(_302 * _301.z, 0.0, 1.0));
} }
else else
{ {
@ -185,15 +181,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _318 = _317 * 0.5; float3 _318 = _317 * 0.5;
float3 _321 = _275.xyz + _318; float3 _321 = _275.xyz + _318;
float4 _322 = float4(_321.x, _321.y, _321.z, _275.w); float4 _322 = float4(_321.x, _321.y, _321.z, _275.w);
_28 _323 = _276; float2 _332 = clamp(_82 + (float2(-1.0, 0.0) * _7._m0.xy), _95, _96);
_323._m0 = _322;
float2 _332 = clamp(_82 + (float3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _344 = _11._m5 * clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _344 = _11._m5 * clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _348 = _12.sample(_13, _332, level(0.0)); float4 _348 = _12.sample(_13, _332, level(0.0));
float _349 = _348.y;
float3 _364; float3 _364;
if (_348.y > 0.0) if (_349 > 0.0)
{ {
_364 = _344 + (_14.sample(_15, _332, level(0.0)).xyz * clamp(_348.y * _348.z, 0.0, 1.0)); _364 = _344 + (_14.sample(_15, _332, level(0.0)).xyz * clamp(_349 * _348.z, 0.0, 1.0));
} }
else else
{ {
@ -202,15 +197,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _365 = _364 * 0.75; float3 _365 = _364 * 0.75;
float3 _368 = _322.xyz + _365; float3 _368 = _322.xyz + _365;
float4 _369 = float4(_368.x, _368.y, _368.z, _322.w); float4 _369 = float4(_368.x, _368.y, _368.z, _322.w);
_28 _370 = _323; float2 _379 = clamp(_82, _95, _96);
_370._m0 = _369;
float2 _379 = clamp(_82 + (float3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _391 = _11._m5 * clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _391 = _11._m5 * clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _395 = _12.sample(_13, _379, level(0.0)); float4 _395 = _12.sample(_13, _379, level(0.0));
float _396 = _395.y;
float3 _411; float3 _411;
if (_395.y > 0.0) if (_396 > 0.0)
{ {
_411 = _391 + (_14.sample(_15, _379, level(0.0)).xyz * clamp(_395.y * _395.z, 0.0, 1.0)); _411 = _391 + (_14.sample(_15, _379, level(0.0)).xyz * clamp(_396 * _395.z, 0.0, 1.0));
} }
else else
{ {
@ -219,15 +213,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _412 = _411 * 1.0; float3 _412 = _411 * 1.0;
float3 _415 = _369.xyz + _412; float3 _415 = _369.xyz + _412;
float4 _416 = float4(_415.x, _415.y, _415.z, _369.w); float4 _416 = float4(_415.x, _415.y, _415.z, _369.w);
_28 _417 = _370; float2 _426 = clamp(_82 + (float2(1.0, 0.0) * _7._m0.xy), _95, _96);
_417._m0 = _416;
float2 _426 = clamp(_82 + (float3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _438 = _11._m5 * clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _438 = _11._m5 * clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _442 = _12.sample(_13, _426, level(0.0)); float4 _442 = _12.sample(_13, _426, level(0.0));
float _443 = _442.y;
float3 _458; float3 _458;
if (_442.y > 0.0) if (_443 > 0.0)
{ {
_458 = _438 + (_14.sample(_15, _426, level(0.0)).xyz * clamp(_442.y * _442.z, 0.0, 1.0)); _458 = _438 + (_14.sample(_15, _426, level(0.0)).xyz * clamp(_443 * _442.z, 0.0, 1.0));
} }
else else
{ {
@ -236,15 +229,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _459 = _458 * 0.75; float3 _459 = _458 * 0.75;
float3 _462 = _416.xyz + _459; float3 _462 = _416.xyz + _459;
float4 _463 = float4(_462.x, _462.y, _462.z, _416.w); float4 _463 = float4(_462.x, _462.y, _462.z, _416.w);
_28 _464 = _417; float2 _473 = clamp(_82 + (float2(2.0, 0.0) * _7._m0.xy), _95, _96);
_464._m0 = _463;
float2 _473 = clamp(_82 + (float3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _485 = _11._m5 * clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _485 = _11._m5 * clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _489 = _12.sample(_13, _473, level(0.0)); float4 _489 = _12.sample(_13, _473, level(0.0));
float _490 = _489.y;
float3 _505; float3 _505;
if (_489.y > 0.0) if (_490 > 0.0)
{ {
_505 = _485 + (_14.sample(_15, _473, level(0.0)).xyz * clamp(_489.y * _489.z, 0.0, 1.0)); _505 = _485 + (_14.sample(_15, _473, level(0.0)).xyz * clamp(_490 * _489.z, 0.0, 1.0));
} }
else else
{ {
@ -253,15 +245,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _506 = _505 * 0.5; float3 _506 = _505 * 0.5;
float3 _509 = _463.xyz + _506; float3 _509 = _463.xyz + _506;
float4 _510 = float4(_509.x, _509.y, _509.z, _463.w); float4 _510 = float4(_509.x, _509.y, _509.z, _463.w);
_28 _511 = _464; float2 _520 = clamp(_82 + (float2(-1.0, 1.0) * _7._m0.xy), _95, _96);
_511._m0 = _510;
float2 _520 = clamp(_82 + (float3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _532 = _11._m5 * clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _532 = _11._m5 * clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _536 = _12.sample(_13, _520, level(0.0)); float4 _536 = _12.sample(_13, _520, level(0.0));
float _537 = _536.y;
float3 _552; float3 _552;
if (_536.y > 0.0) if (_537 > 0.0)
{ {
_552 = _532 + (_14.sample(_15, _520, level(0.0)).xyz * clamp(_536.y * _536.z, 0.0, 1.0)); _552 = _532 + (_14.sample(_15, _520, level(0.0)).xyz * clamp(_537 * _536.z, 0.0, 1.0));
} }
else else
{ {
@ -270,15 +261,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _553 = _552 * 0.5; float3 _553 = _552 * 0.5;
float3 _556 = _510.xyz + _553; float3 _556 = _510.xyz + _553;
float4 _557 = float4(_556.x, _556.y, _556.z, _510.w); float4 _557 = float4(_556.x, _556.y, _556.z, _510.w);
_28 _558 = _511; float2 _567 = clamp(_82 + (float2(0.0, 1.0) * _7._m0.xy), _95, _96);
_558._m0 = _557;
float2 _567 = clamp(_82 + (float3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _579 = _11._m5 * clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _579 = _11._m5 * clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _583 = _12.sample(_13, _567, level(0.0)); float4 _583 = _12.sample(_13, _567, level(0.0));
float _584 = _583.y;
float3 _599; float3 _599;
if (_583.y > 0.0) if (_584 > 0.0)
{ {
_599 = _579 + (_14.sample(_15, _567, level(0.0)).xyz * clamp(_583.y * _583.z, 0.0, 1.0)); _599 = _579 + (_14.sample(_15, _567, level(0.0)).xyz * clamp(_584 * _583.z, 0.0, 1.0));
} }
else else
{ {
@ -287,15 +277,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _600 = _599 * 0.75; float3 _600 = _599 * 0.75;
float3 _603 = _557.xyz + _600; float3 _603 = _557.xyz + _600;
float4 _604 = float4(_603.x, _603.y, _603.z, _557.w); float4 _604 = float4(_603.x, _603.y, _603.z, _557.w);
_28 _605 = _558; float2 _614 = clamp(_82 + _7._m0.xy, _95, _96);
_605._m0 = _604;
float2 _614 = clamp(_82 + (float3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _626 = _11._m5 * clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _626 = _11._m5 * clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _630 = _12.sample(_13, _614, level(0.0)); float4 _630 = _12.sample(_13, _614, level(0.0));
float _631 = _630.y;
float3 _646; float3 _646;
if (_630.y > 0.0) if (_631 > 0.0)
{ {
_646 = _626 + (_14.sample(_15, _614, level(0.0)).xyz * clamp(_630.y * _630.z, 0.0, 1.0)); _646 = _626 + (_14.sample(_15, _614, level(0.0)).xyz * clamp(_631 * _630.z, 0.0, 1.0));
} }
else else
{ {
@ -304,15 +293,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
float3 _647 = _646 * 0.5; float3 _647 = _646 * 0.5;
float3 _650 = _604.xyz + _647; float3 _650 = _604.xyz + _647;
float4 _651 = float4(_650.x, _650.y, _650.z, _604.w); float4 _651 = float4(_650.x, _650.y, _650.z, _604.w);
_28 _652 = _605; float2 _661 = clamp(_82 + (float2(0.0, 2.0) * _7._m0.xy), _95, _96);
_652._m0 = _651;
float2 _661 = clamp(_82 + (float3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
float3 _673 = _11._m5 * clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0); float3 _673 = _11._m5 * clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0);
float4 _677 = _12.sample(_13, _661, level(0.0)); float4 _677 = _12.sample(_13, _661, level(0.0));
float _678 = _677.y;
float3 _693; float3 _693;
if (_677.y > 0.0) if (_678 > 0.0)
{ {
_693 = _673 + (_14.sample(_15, _661, level(0.0)).xyz * clamp(_677.y * _677.z, 0.0, 1.0)); _693 = _673 + (_14.sample(_15, _661, level(0.0)).xyz * clamp(_678 * _677.z, 0.0, 1.0));
} }
else else
{ {
@ -320,10 +308,8 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
} }
float3 _697 = _651.xyz + (_693 * 0.5); float3 _697 = _651.xyz + (_693 * 0.5);
float4 _698 = float4(_697.x, _697.y, _697.z, _651.w); float4 _698 = float4(_697.x, _697.y, _697.z, _651.w);
_28 _699 = _652; float3 _702 = _698.xyz * float3(0.125);
_699._m0 = _698; _28 _704 = _74;
float3 _702 = _698.xyz / float3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5);
_28 _704 = _699;
_704._m0 = float4(_702.x, _702.y, _702.z, _698.w); _704._m0 = float4(_702.x, _702.y, _702.z, _698.w);
_28 _705 = _704; _28 _705 = _704;
_705._m0.w = 1.0; _705._m0.w = 1.0;

View File

@ -3,16 +3,6 @@
using namespace metal; using namespace metal;
struct TestStruct
{
float4x4 transforms[6];
};
struct CB0
{
TestStruct CB0[16];
};
vertex void main0() vertex void main0()
{ {
} }

View File

@ -1,22 +0,0 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(8u, 8u, 1u);
struct UBO
{
float4 uInvSize;
float4 uScale;
};
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], constant UBO& _46 [[buffer(0)]], texture2d<float> uHeight [[texture(0)]], sampler uHeightSmplr [[sampler(0)]], texture2d<float> uDisplacement [[texture(1)]], sampler uDisplacementSmplr [[sampler(1)]], texture2d<float, access::write> iHeightDisplacement [[texture(2)]], texture2d<float, access::write> iGradJacobian [[texture(3)]])
{
float4 _59 = (float2(gl_GlobalInvocationID.xy) * _46.uInvSize.xy).xyxy + (_46.uInvSize * 0.5);
float2 _157 = ((uDisplacement.sample(uDisplacementSmplr, _59.zw, level(0.0), int2(1, 0)).xy - uDisplacement.sample(uDisplacementSmplr, _59.zw, level(0.0), int2(-1, 0)).xy) * 0.60000002384185791015625) * _46.uScale.z;
float2 _161 = ((uDisplacement.sample(uDisplacementSmplr, _59.zw, level(0.0), int2(0, 1)).xy - uDisplacement.sample(uDisplacementSmplr, _59.zw, level(0.0), int2(0, -1)).xy) * 0.60000002384185791015625) * _46.uScale.z;
iHeightDisplacement.write(float4(uHeight.sample(uHeightSmplr, _59.xy, level(0.0)).x, 0.0, 0.0, 0.0), uint2(int2(gl_GlobalInvocationID.xy)));
iGradJacobian.write(float4((_46.uScale.xy * 0.5) * float2(uHeight.sample(uHeightSmplr, _59.xy, level(0.0), int2(1, 0)).x - uHeight.sample(uHeightSmplr, _59.xy, level(0.0), int2(-1, 0)).x, uHeight.sample(uHeightSmplr, _59.xy, level(0.0), int2(0, 1)).x - uHeight.sample(uHeightSmplr, _59.xy, level(0.0), int2(0, -1)).x), ((1.0 + _157.x) * (1.0 + _161.y)) - (_157.y * _161.x), 0.0), uint2(int2(gl_GlobalInvocationID.xy)));
}

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
kernel void main0() kernel void main0()
{ {
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);

View File

@ -6,8 +6,6 @@
using namespace metal; using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
struct SSBO struct SSBO
{ {
float in_data[1]; float in_data[1];

View File

@ -12,10 +12,11 @@ struct SSBO
kernel void main0(device SSBO& _13 [[buffer(0)]]) kernel void main0(device SSBO& _13 [[buffer(0)]])
{ {
float4 _17 = _13.data; float4 _17 = _13.data;
_13.data = float4(_17.x, _17.yz + float2(10.0), _17.w); float2 _28 = _17.yz + float2(10.0);
_13.data = float4(_17.x, _28, _17.w);
_13.data = (_17 + _17) + _17; _13.data = (_17 + _17) + _17;
_13.data = (_17.yz + float2(10.0)).xxyy; _13.data = _28.xxyy;
_13.data = float4((_17.yz + float2(10.0)).y); _13.data = float4(_28.y);
_13.data = float4((_17.zw + float2(10.0))[_13.index]); _13.data = float4((_17.zw + float2(10.0))[_13.index]);
} }

View File

@ -27,7 +27,6 @@ kernel void main0(device SSBO& _28 [[buffer(0)]], device SSBO2& _52 [[buffer(1)]
if (i < 16) if (i < 16)
{ {
_56 = _42; _56 = _42;
continue;
} }
else else
{ {

View File

@ -5,6 +5,7 @@ using namespace metal;
kernel void main0(texture2d<float> uImageIn [[texture(0)]], texture2d<float, access::write> uImageOut [[texture(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) kernel void main0(texture2d<float> uImageIn [[texture(0)]], texture2d<float, access::write> uImageOut [[texture(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{ {
uImageOut.write(uImageIn.read(uint2((int2(gl_GlobalInvocationID.xy) + int2(uImageIn.get_width(), uImageIn.get_height())))), uint2(int2(gl_GlobalInvocationID.xy))); int2 _23 = int2(gl_GlobalInvocationID.xy);
uImageOut.write(uImageIn.read(uint2((_23 + int2(uImageIn.get_width(), uImageIn.get_height())))), uint2(_23));
} }

View File

@ -3,15 +3,7 @@
using namespace metal; using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(32u, 1u, 1u);
struct T1 struct T1
{
float3 a;
float b;
};
struct T1_1
{ {
packed_float3 a; packed_float3 a;
float b; float b;
@ -19,7 +11,7 @@ struct T1_1
struct Buffer0 struct Buffer0
{ {
T1_1 buf0[1]; T1 buf0[1];
}; };
struct Buffer1 struct Buffer1

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(32u, 1u, 1u);
struct T1 struct T1
{ {
packed_float3 a; packed_float3 a;

View File

@ -1,33 +0,0 @@
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO2
{
float4 out_data[1];
};
constant int _69 = {};
kernel void main0(device SSBO2& _27 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{
if (gl_GlobalInvocationID.x == 2u)
{
_27.out_data[gl_GlobalInvocationID.x] = float4(20.0);
}
else
{
if (gl_GlobalInvocationID.x == 4u)
{
_27.out_data[gl_GlobalInvocationID.x] = float4(10.0);
return;
}
}
for (int _68 = 0; _68 < 20; _68 = _69 + 1)
{
return;
}
_27.out_data[gl_GlobalInvocationID.x] = float4(10.0);
}

View File

@ -20,7 +20,6 @@ kernel void main0(device SSBO& _9 [[buffer(0)]])
_9.a ^= 10; _9.a ^= 10;
_9.a %= 40; _9.a %= 40;
_9.a |= 1; _9.a |= 1;
bool _65 = false && true; _9.a = 0;
_9.a = int(_65 && (true || _65));
} }

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(4u, 4u, 1u);
struct SSBO struct SSBO
{ {
float out_data[1]; float out_data[1];
@ -15,6 +13,6 @@ kernel void main0(device SSBO& _67 [[buffer(0)]], uint3 gl_LocalInvocationID [[t
threadgroup float foo[4][4]; threadgroup float foo[4][4];
foo[gl_LocalInvocationID.x][gl_LocalInvocationID.y] = float(gl_LocalInvocationIndex); foo[gl_LocalInvocationID.x][gl_LocalInvocationID.y] = float(gl_LocalInvocationIndex);
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
_67.out_data[gl_GlobalInvocationID.x] = (((0.0 + foo[gl_LocalInvocationID.x][0]) + foo[gl_LocalInvocationID.x][1]) + foo[gl_LocalInvocationID.x][2]) + foo[gl_LocalInvocationID.x][3]; _67.out_data[gl_GlobalInvocationID.x] = ((foo[gl_LocalInvocationID.x][0] + foo[gl_LocalInvocationID.x][1]) + foo[gl_LocalInvocationID.x][2]) + foo[gl_LocalInvocationID.x][3];
} }

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
struct SSBO struct SSBO
{ {
float in_data[1]; float in_data[1];
@ -20,6 +18,6 @@ kernel void main0(device SSBO& _22 [[buffer(0)]], device SSBO2& _44 [[buffer(1)]
threadgroup float sShared[4]; threadgroup float sShared[4];
sShared[gl_LocalInvocationIndex] = _22.in_data[gl_GlobalInvocationID.x]; sShared[gl_LocalInvocationIndex] = _22.in_data[gl_GlobalInvocationID.x];
threadgroup_barrier(mem_flags::mem_threadgroup); threadgroup_barrier(mem_flags::mem_threadgroup);
_44.out_data[gl_GlobalInvocationID.x] = sShared[(4u - gl_LocalInvocationIndex) - 1u]; _44.out_data[gl_GlobalInvocationID.x] = sShared[3u - gl_LocalInvocationIndex];
} }

View File

@ -13,27 +13,13 @@ struct s2
s1 b; s1 b;
}; };
struct s1_1
{
int a;
};
struct s2_1
{
s1_1 b;
};
struct dstbuffer struct dstbuffer
{ {
s2_1 test[1]; s2 test[1];
}; };
constant s2 _31 = {};
kernel void main0(device dstbuffer& _19 [[buffer(0)]]) kernel void main0(device dstbuffer& _19 [[buffer(0)]])
{ {
s2 _30 = _31; _19.test[0].b.a = 0;
_30.b.a = 0;
_19.test[0].b.a = _30.b.a;
} }

View File

@ -73,41 +73,18 @@ struct S0_1
float b; float b;
}; };
struct S1_1
{
packed_float3 a;
float b;
};
struct S2_1
{
float3 a[1];
float b;
};
struct S3_1
{
float2 a;
float b;
};
struct S4_1
{
float2 c;
};
struct Content_1 struct Content_1
{ {
S0_1 m0s[1]; S0_1 m0s[1];
S1_1 m1s[1]; S1 m1s[1];
S2_1 m2s[1]; S2 m2s[1];
S0_1 m0; S0_1 m0;
S1_1 m1; S1 m1;
S2_1 m2; S2 m2;
S3_1 m3; S3 m3;
char pad7[4]; char pad7[4];
float m4; float m4;
S4_1 m3s[8]; S4 m3s[8];
}; };
struct SSBO0 struct SSBO0

View File

@ -14,65 +14,28 @@ struct SSBO2
float4 out_data[1]; float4 out_data[1];
}; };
constant uint _98 = {};
kernel void main0(device SSBO& _24 [[buffer(0)]], device SSBO2& _89 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) kernel void main0(device SSBO& _24 [[buffer(0)]], device SSBO2& _89 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{ {
float4 _93; float4 _93;
int _94;
_93 = _24.in_data[gl_GlobalInvocationID.x]; _93 = _24.in_data[gl_GlobalInvocationID.x];
_94 = 0; for (int _94 = 0; (_94 + 1) < 10; )
int _40;
float4 _46;
int _48;
for (;;)
{ {
_40 = _94 + 1; _93 *= 2.0;
if (_40 < 10) _94 += 2;
{
_46 = _93 * 2.0;
_48 = _40 + 1;
_93 = _46;
_94 = _48;
continue; continue;
} }
else
{
break;
}
}
float4 _95; float4 _95;
int _96;
_95 = _93; _95 = _93;
_96 = _40;
float4 _100; float4 _100;
uint _101; for (uint _97 = 0u; _97 < 16u; _95 = _100, _97++)
uint _99;
for (uint _97 = 0u; _97 < 16u; _95 = _100, _96++, _97++, _99 = _101)
{ {
_100 = _95; _100 = _95;
_101 = 0u; for (uint _101 = 0u; _101 < 30u; )
float4 _71;
for (; _101 < 30u; _100 = _71, _101++)
{ {
_71 = _24.mvp * _100; _100 = _24.mvp * _100;
} _101++;
}
int _102;
_102 = _96;
int _83;
for (;;)
{
_83 = _102 + 1;
if (_83 > 10)
{
_102 = _83;
continue; continue;
} }
else
{
break;
}
} }
_89.out_data[gl_GlobalInvocationID.x] = _95; _89.out_data[gl_GlobalInvocationID.x] = _95;
} }

View File

@ -8,29 +8,9 @@ struct S0
float4 a; float4 a;
}; };
struct S1
{
float4 a;
};
struct S0_1
{
float4 a;
};
struct SSBO0 struct SSBO0
{ {
S0_1 s0s[1]; S0 s0s[1];
};
struct S1_1
{
float4 a;
};
struct SSBO1
{
S1_1 s1s[1];
}; };
struct SSBO2 struct SSBO2
@ -38,8 +18,8 @@ struct SSBO2
float4 outputs[1]; float4 outputs[1];
}; };
kernel void main0(device SSBO0& _36 [[buffer(0)]], device SSBO1& _55 [[buffer(1)]], device SSBO2& _66 [[buffer(2)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) kernel void main0(device SSBO0& _36 [[buffer(0)]], device SSBO0& _55 [[buffer(1)]], device SSBO2& _66 [[buffer(2)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{ {
_66.outputs[gl_GlobalInvocationID.x] = _36.s0s[gl_GlobalInvocationID.x].a + _55.s1s[gl_GlobalInvocationID.x].a; _66.outputs[gl_GlobalInvocationID.x] = _36.s0s[gl_GlobalInvocationID.x].a + _55.s0s[gl_GlobalInvocationID.x].a;
} }

View File

@ -8,13 +8,8 @@ struct SSBO2
uint outputs[1]; uint outputs[1];
}; };
struct SSBO kernel void main0(device SSBO2& _10 [[buffer(0)]], device SSBO2& _23 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{ {
uint inputs[1]; _10.outputs[gl_GlobalInvocationID.x] = _23.outputs[gl_GlobalInvocationID.x] / 29u;
};
kernel void main0(device SSBO2& _10 [[buffer(0)]], device SSBO& _23 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{
_10.outputs[gl_GlobalInvocationID.x] = _23.inputs[gl_GlobalInvocationID.x] / 29u;
} }

View File

@ -39,7 +39,7 @@ vertex main0_out main0(constant UBO& _22 [[buffer(0)]])
out.oA = _22.A; out.oA = _22.A;
out.oB = float4(_22.B0, _22.B1); out.oB = float4(_22.B0, _22.B1);
out.oC = float4(_22.C0, _22.C1) + float4(_22.C1.xy, _22.C1.z, _22.C0); out.oC = float4(_22.C0, _22.C1) + float4(_22.C1.xy, _22.C1.z, _22.C0);
out.oD = float4(_22.D0, _22.D1) + float4(float3(_22.D0).xy, float3(_22.D0).z, _22.D1); out.oD = float4(_22.D0, _22.D1) + float4(_22.D0.xy, float3(_22.D0).z, _22.D1);
out.oE = float4(_22.E0, _22.E1, _22.E2, _22.E3); out.oE = float4(_22.E0, _22.E1, _22.E2, _22.E3);
out.oF = float4(_22.F0, _22.F1, _22.F2); out.oF = float4(_22.F0, _22.F1, _22.F2);
return out; return out;

View File

@ -30,9 +30,12 @@ fragment main0_out main0()
{ {
main0_out out = {}; main0_out out = {};
float lut[5] = {1.0, 2.0, 3.0, 4.0, 5.0}; float lut[5] = {1.0, 2.0, 3.0, 4.0, 5.0};
int _33; for (int _46 = 0; _46 < 4; )
for (int _46 = 0; _46 < 4; _33 = _46 + 1, out.FragColor += float4(lut[_33]), _46 = _33)
{ {
int _33 = _46 + 1;
out.FragColor += float4(lut[_33]);
_46 = _33;
continue;
} }
return out; return out;
} }

View File

@ -47,7 +47,7 @@ fragment main0_out main0(main0_in in [[stage_in]])
float4 indexable[3] = {float4(1.0), float4(2.0), float4(3.0)}; float4 indexable[3] = {float4(1.0), float4(2.0), float4(3.0)};
float4 indexable_1[2][2] = {{float4(1.0), float4(2.0)}, {float4(8.0), float4(10.0)}}; float4 indexable_1[2][2] = {{float4(1.0), float4(2.0)}, {float4(8.0), float4(10.0)}};
Foobar indexable_2[2] = {{10.0, 40.0}, {90.0, 70.0}}; Foobar indexable_2[2] = {{10.0, 40.0}, {90.0, 70.0}};
out.FragColor = ((indexable[in.index] + (indexable_1[in.index][in.index + 1])) + float4(10.0 + 20.0)) + float4(indexable_2[in.index].a + indexable_2[in.index].b); out.FragColor = ((indexable[in.index] + (indexable_1[in.index][in.index + 1])) + float4(30.0)) + float4(indexable_2[in.index].a + indexable_2[in.index].b);
return out; return out;
} }

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant uint _49 = {};
struct main0_in struct main0_in
{ {
float4 accum [[user(locn0)]]; float4 accum [[user(locn0)]];
@ -19,19 +17,11 @@ fragment main0_out main0(main0_in in [[stage_in]])
{ {
main0_out out = {}; main0_out out = {};
out.result = float4(0.0); out.result = float4(0.0);
uint _51; for (int _48 = 0; _48 < 4; )
uint _50;
for (int _48 = 0; _48 < 4; _48 += int(_51), _50 = _51)
{ {
if (in.accum.y > 10.0)
{
_51 = 40u;
}
else
{
_51 = 30u;
}
out.result += in.accum; out.result += in.accum;
_48 += int((in.accum.y > 10.0) ? 40u : 30u);
continue;
} }
return out; return out;
} }

View File

@ -3,11 +3,6 @@
using namespace metal; using namespace metal;
struct Structy
{
float4 c;
};
struct main0_out struct main0_out
{ {
float4 FragColor [[color(0)]]; float4 FragColor [[color(0)]];

View File

@ -12,44 +12,54 @@ fragment main0_out main0()
{ {
main0_out out = {}; main0_out out = {};
out.FragColor = 16; out.FragColor = 16;
for (int _140 = 0; _140 < 25; _140++) for (int _140 = 0; _140 < 25; )
{ {
out.FragColor += 10; out.FragColor += 10;
_140++;
continue;
} }
for (int _141 = 1; _141 < 30; _141++) for (int _141 = 1; _141 < 30; )
{ {
out.FragColor += 11; out.FragColor += 11;
_141++;
continue;
} }
int _142; int _142;
_142 = 0; _142 = 0;
for (; _142 < 20; _142++) for (; _142 < 20; )
{ {
out.FragColor += 12; out.FragColor += 12;
_142++;
continue;
} }
int _62 = _142 + 3; int _62 = _142 + 3;
out.FragColor += _62; out.FragColor += _62;
if (_62 == 40) if (_62 == 40)
{ {
for (int _143 = 0; _143 < 40; _143++) for (int _143 = 0; _143 < 40; )
{ {
out.FragColor += 13; out.FragColor += 13;
_143++;
continue;
} }
return out; return out;
} }
else
{
out.FragColor += _62; out.FragColor += _62;
}
int2 _144; int2 _144;
_144 = int2(0); _144 = int2(0);
int2 _139; for (; _144.x < 10; )
for (; _144.x < 10; _139 = _144, _139.x = _144.x + 4, _144 = _139)
{ {
out.FragColor += _144.y; out.FragColor += _144.y;
int2 _139 = _144;
_139.x = _144.x + 4;
_144 = _139;
continue;
} }
for (int _145 = _62; _145 < 40; _145++) for (int _145 = _62; _145 < 40; )
{ {
out.FragColor += _145; out.FragColor += _145;
_145++;
continue;
} }
out.FragColor += _62; out.FragColor += _62;
return out; return out;

View File

@ -3,12 +3,6 @@
using namespace metal; using namespace metal;
struct ResType
{
half4 _m0;
int4 _m1;
};
struct main0_in struct main0_in
{ {
half4 v4 [[user(locn3)]]; half4 v4 [[user(locn3)]];

View File

@ -19,11 +19,10 @@ struct main0_out
fragment main0_out main0(main0_in in [[stage_in]]) fragment main0_out main0(main0_in in [[stage_in]])
{ {
main0_out out = {}; main0_out out = {};
out.FragColor = float4(bool4(false, true, false, false).x ? in.vIn1.x : in.vIn0.x, bool4(false, true, false, false).y ? in.vIn1.y : in.vIn0.y, bool4(false, true, false, false).z ? in.vIn1.z : in.vIn0.z, bool4(false, true, false, false).w ? in.vIn1.w : in.vIn0.w); out.FragColor = float4(in.vIn0.x, in.vIn1.y, in.vIn0.z, in.vIn0.w);
out.FragColor = float4(true ? in.vIn3 : in.vIn2); out.FragColor = float4(in.vIn3);
bool4 _37 = bool4(true); out.FragColor = in.vIn0.xyzw;
out.FragColor = float4(_37.x ? in.vIn0.x : in.vIn1.x, _37.y ? in.vIn0.y : in.vIn1.y, _37.z ? in.vIn0.z : in.vIn1.z, _37.w ? in.vIn0.w : in.vIn1.w); out.FragColor = float4(in.vIn2);
out.FragColor = float4(true ? in.vIn2 : in.vIn3);
return out; return out;
} }

View File

@ -3,18 +3,7 @@
using namespace metal; using namespace metal;
struct VertexOutput
{
float4 HPosition;
};
struct TestStruct struct TestStruct
{
float3 position;
float radius;
};
struct TestStruct_1
{ {
packed_float3 position; packed_float3 position;
float radius; float radius;
@ -22,7 +11,7 @@ struct TestStruct_1
struct CB0 struct CB0
{ {
TestStruct_1 CB0[16]; TestStruct CB0[16];
}; };
struct main0_out struct main0_out

View File

@ -16,7 +16,7 @@ struct main0_out
fragment main0_out main0(main0_in in [[stage_in]]) fragment main0_out main0(main0_in in [[stage_in]])
{ {
main0_out out = {}; main0_out out = {};
out.FragColor = -(-in.vIn); out.FragColor = in.vIn;
return out; return out;
} }

View File

@ -16,13 +16,6 @@ struct UBO
Light lights[4]; Light lights[4];
}; };
struct Light_1
{
float3 Position;
float Radius;
float4 Color;
};
struct main0_in struct main0_in
{ {
float3 aNormal [[attribute(1)]]; float3 aNormal [[attribute(1)]];
@ -40,10 +33,12 @@ vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _21 [[buffer(0)]]
main0_out out = {}; main0_out out = {};
out.gl_Position = _21.uMVP * in.aVertex; out.gl_Position = _21.uMVP * in.aVertex;
out.vColor = float4(0.0); out.vColor = float4(0.0);
for (int _103 = 0; _103 < 4; _103++) for (int _96 = 0; _96 < 4; )
{ {
float3 _68 = in.aVertex.xyz - _21.lights[_103].Position; float3 _68 = in.aVertex.xyz - _21.lights[_96].Position;
out.vColor += ((_21.lights[_103].Color * clamp(1.0 - (length(_68) / _21.lights[_103].Radius), 0.0, 1.0)) * dot(in.aNormal, normalize(_68))); out.vColor += ((_21.lights[_96].Color * clamp(1.0 - (length(_68) / _21.lights[_96].Radius), 0.0, 1.0)) * dot(in.aNormal, normalize(_68)));
_96++;
continue;
} }
return out; return out;
} }

View File

@ -33,10 +33,12 @@ vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _21 [[buffer(0)]]
main0_out out = {}; main0_out out = {};
out.gl_Position = _21.uMVP * in.aVertex; out.gl_Position = _21.uMVP * in.aVertex;
out.vColor = float4(0.0); out.vColor = float4(0.0);
for (int _82 = 0; _82 < 4; _82++) for (int _82 = 0; _82 < 4; )
{ {
float3 _54 = in.aVertex.xyz - _21.lights[_82].Position; float3 _54 = in.aVertex.xyz - _21.lights[_82].Position;
out.vColor += ((_21.lights[_82].Color * clamp(1.0 - (length(_54) / _21.lights[_82].Radius), 0.0, 1.0)) * dot(in.aNormal, normalize(_54))); out.vColor += ((_21.lights[_82].Color * clamp(1.0 - (length(_54) / _21.lights[_82].Radius), 0.0, 1.0)) * dot(in.aNormal, normalize(_54)));
_82++;
continue;
} }
return out; return out;
} }

View File

@ -40,14 +40,8 @@ struct main0_out
vertex main0_out main0(main0_in in [[stage_in]], constant _15& _17 [[buffer(0)]], constant _42& _44 [[buffer(1)]]) vertex main0_out main0(main0_in in [[stage_in]], constant _15& _17 [[buffer(0)]], constant _42& _44 [[buffer(1)]])
{ {
main0_out out = {}; main0_out out = {};
float3 _34;
do
{
_34 = normalize(float4(in.m_25.xyz, 0.0) * _17._m1);
break;
} while (false);
float4 _70 = _44._m0 * float4(_44._m3 + (in.m_25.xyz * (_44._m6 + _44._m7)), 1.0); float4 _70 = _44._m0 * float4(_44._m3 + (in.m_25.xyz * (_44._m6 + _44._m7)), 1.0);
out.m_72 = _34; out.m_72 = normalize(float4(in.m_25.xyz, 0.0) * _17._m1);
float4 _95 = _70; float4 _95 = _70;
_95.y = -_70.y; _95.y = -_70.y;
out.gl_Position = _95; out.gl_Position = _95;

View File

@ -3,8 +3,6 @@
using namespace metal; using namespace metal;
constant float4 _20[2] = {float4(10.0), float4(20.0)};
struct main0_in struct main0_in
{ {
float4 vInput1 [[attribute(1)]]; float4 vInput1 [[attribute(1)]];

View File

@ -2,9 +2,9 @@
#extension GL_AMD_shader_fragment_mask : require #extension GL_AMD_shader_fragment_mask : require
#extension GL_AMD_shader_explicit_vertex_parameter : require #extension GL_AMD_shader_explicit_vertex_parameter : require
uniform sampler2DMS texture1; layout(binding = 0) uniform sampler2DMS texture1;
layout(location = 0) in vec4 vary; layout(location = 0) __explicitInterpAMD in vec4 vary;
void main() void main()
{ {

View File

@ -1,5 +1,6 @@
#version 450 #version 450
#extension GL_ARB_gpu_shader_int64 : require #extension GL_ARB_gpu_shader_int64 : require
#extension GL_AMD_gcn_shader : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
void main() void main()

View File

@ -9,9 +9,9 @@ layout(binding = 0, std430) buffer inputData
float inputDataArray[]; float inputDataArray[];
} _12; } _12;
layout(binding = 1, std430) buffer outputData layout(binding = 1, std430) buffer _10_74
{ {
float outputDataArray[]; float inputDataArray[];
} _74; } _74;
void main() void main()
@ -20,7 +20,7 @@ void main()
bool _31 = _25 > 0.0; bool _31 = _25 > 0.0;
if (_31) if (_31)
{ {
_74.outputDataArray[mbcntAMD(packUint2x32(uvec2(unpackUint2x32(ballotARB(_31)).xy)))] = _25; _74.inputDataArray[mbcntAMD(packUint2x32(uvec2(unpackUint2x32(ballotARB(_31)).xy)))] = _25;
} }
} }

View File

@ -1,7 +1,14 @@
#version 450 #version 450
#extension GL_ARB_shader_group_vote : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) buffer inputData
{
float inputDataArray[];
} _12;
void main() void main()
{ {
bool _31 = _12.inputDataArray[gl_LocalInvocationID.x] > 0.0;
} }

View File

@ -1,4 +1,5 @@
#version 450 #version 450
#extension GL_AMD_shader_trinary_minmax : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
void main() void main()

View File

@ -1,5 +1,5 @@
#version 310 es #version 310 es
layout(local_size_x = 9, local_size_y = 20, local_size_z = 4) in; layout(local_size_x = 1, local_size_y = 20, local_size_z = 1) in;
layout(binding = 0, std430) buffer SSBO layout(binding = 0, std430) buffer SSBO
{ {

View File

@ -11,6 +11,8 @@ layout(binding = 1, std430) buffer _6_9
float _m0[]; float _m0[];
} _9; } _9;
uvec3 _22 = gl_WorkGroupSize;
void main() void main()
{ {
_8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x]; _8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x];

View File

@ -2,12 +2,6 @@
precision mediump float; precision mediump float;
precision highp int; precision highp int;
struct SwizzleTest
{
float a;
float b;
};
layout(location = 0) in vec2 foo; layout(location = 0) in vec2 foo;
layout(location = 0) out float FooOut; layout(location = 0) out float FooOut;

View File

@ -1,33 +1,11 @@
#version 450 #version 450
struct _9
{
float _m0;
};
struct _10
{
float _m0;
float _m1;
float _m2;
float _m3;
float _m4;
float _m5;
float _m6;
float _m7;
float _m8;
float _m9;
float _m10;
float _m11;
_9 _m12;
};
layout(location = 0) out vec4 _3; layout(location = 0) out vec4 _3;
_10 _51; float _57;
void main() void main()
{ {
_3 = vec4(_51._m0, _51._m1, _51._m2, _51._m3); _3 = vec4(_57);
} }

View File

@ -6,6 +6,6 @@ layout(location = 0) out vec4 FragColor;
void main() void main()
{ {
FragColor = (((vec4(1.0) + vec4(1.0)) + (vec3(1.0).xyzz + vec4(1.0))) + (vec4(1.0) + vec4(2.0))) + (vec2(1.0).xyxy + vec4(2.0)); FragColor = vec4(10.0);
} }

View File

@ -7,7 +7,7 @@ layout(location = 0) out vec4 _entryPointOutput;
void main() void main()
{ {
ivec3 _122 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0); ivec2 _152 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy;
_entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _122.xy, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _122.xy, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy); _entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _152, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _152, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy);
} }

View File

@ -2,13 +2,13 @@
layout(set = 0, binding = 0) uniform sampler Sampler; layout(set = 0, binding = 0) uniform sampler Sampler;
layout(set = 0, binding = 0) uniform texture2D SampledImage; layout(set = 0, binding = 0) uniform texture2D SampledImage;
uniform sampler SPIRV_Cross_DummySampler; layout(set = 0, binding = 0) uniform sampler SPIRV_Cross_DummySampler;
layout(location = 0) out vec4 _entryPointOutput; layout(location = 0) out vec4 _entryPointOutput;
void main() void main()
{ {
ivec3 _122 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0); ivec2 _152 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy;
_entryPointOutput = ((texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _122.xy, 0) + texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _122.xy, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy); _entryPointOutput = ((texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _152, 0) + texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _152, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy);
} }

View File

@ -10,36 +10,34 @@ layout(binding = 0, std140) uniform Foo
layout(location = 0) in vec3 fragWorld; layout(location = 0) in vec3 fragWorld;
layout(location = 0) out int _entryPointOutput; layout(location = 0) out int _entryPointOutput;
mat4 _152;
uint _155;
int GetCascade(vec3 fragWorldPosition) int GetCascade(vec3 fragWorldPosition)
{ {
mat4 _153; for (uint _151 = 0u; _151 < _11.shadowCascadesNum; _151++)
_153 = _152;
uint _156;
mat4 _157;
for (uint _151 = 0u; _151 < _11.shadowCascadesNum; _151 = _156 + uint(1), _153 = _157)
{ {
mat4 _154; mat4 _157;
_154 = _153;
for (;;) for (;;)
{ {
if (_11.test == 0) if (_11.test == 0)
{ {
_156 = _151;
_157 = mat4(vec4(0.5, 0.0, 0.0, 0.0), vec4(0.0, 0.5, 0.0, 0.0), vec4(0.0, 0.0, 0.5, 0.0), vec4(0.0, 0.0, 0.0, 1.0)); _157 = mat4(vec4(0.5, 0.0, 0.0, 0.0), vec4(0.0, 0.5, 0.0, 0.0), vec4(0.0, 0.0, 0.5, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
break; break;
} }
_156 = _151;
_157 = mat4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0)); _157 = mat4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
break; break;
} }
vec4 _92 = (_157 * _11.lightVP[_156]) * vec4(fragWorldPosition, 1.0); vec4 _92 = (_157 * _11.lightVP[_151]) * vec4(fragWorldPosition, 1.0);
if ((((_92.z >= 0.0) && (_92.z <= 1.0)) && (max(_92.x, _92.y) <= 1.0)) && (min(_92.x, _92.y) >= 0.0)) float _140 = _92.z;
float _144 = _92.x;
float _146 = _92.y;
if ((((_140 >= 0.0) && (_140 <= 1.0)) && (max(_144, _146) <= 1.0)) && (min(_144, _146) >= 0.0))
{ {
return int(_156); return int(_151);
} }
else
{
continue;
}
continue;
} }
return -1; return -1;
} }

View File

@ -32,7 +32,7 @@ void main()
{ {
float _64 = float(_60); float _64 = float(_60);
vec4 _72 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv + (vec2(0.0, _8.CB1.TextureSize.w) * _64)); vec4 _72 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv + (vec2(0.0, _8.CB1.TextureSize.w) * _64));
float _78 = exp(((-_64) * _64) * 0.2222220003604888916015625) * float(abs(_72.y - _50) < clamp((_50 * 80.0) * 0.0007999999797903001308441162109375, 7.999999797903001308441162109375e-05, 0.008000000379979610443115234375)); float _78 = exp(((-_64) * _64) * 0.2222220003604888916015625) * float(abs(_72.y - _50) < clamp(_50 * 0.06399999558925628662109375, 7.999999797903001308441162109375e-05, 0.008000000379979610443115234375));
_55 += (_72.x * _78); _55 += (_72.x * _78);
_58 += _78; _58 += _78;
_60++; _60++;

View File

@ -3,19 +3,18 @@
layout(location = 0) out vec4 FragColor; layout(location = 0) out vec4 FragColor;
layout(location = 0) in vec4 v0; layout(location = 0) in vec4 v0;
int _51;
void main() void main()
{ {
FragColor = vec4(1.0); FragColor = vec4(1.0);
int _53; int _50;
int _52; _50 = 0;
for (int _50 = 0; _50 < 4; _50++, _52 = _53) for (; _50 < 4; _50++)
{ {
_53 = 0; for (int _53 = 0; _53 < 4; )
for (; _53 < 4; _53++)
{ {
FragColor += vec4(v0[(_50 + _53) & 3]); FragColor += vec4(v0[(_50 + _53) & 3]);
_53++;
continue;
} }
} }
} }

View File

@ -10,10 +10,13 @@ void main()
FragColor = vec4(0.0); FragColor = vec4(0.0);
int _53 = 0; int _53 = 0;
uint _54 = 1u; uint _54 = 1u;
for (; (_53 < 10) && (int(_54) < int(20u)); _53 += counter, _54 += uint(counter)) for (; (_53 < 10) && (int(_54) < int(20u)); )
{ {
FragColor += vec4(float(_53)); FragColor += vec4(float(_53));
FragColor += vec4(float(_54)); FragColor += vec4(float(_54));
_53 += counter;
_54 += uint(counter);
continue;
} }
} }

View File

@ -2,12 +2,6 @@
precision mediump float; precision mediump float;
precision highp int; precision highp int;
struct D
{
vec4 a;
float b;
};
layout(location = 0) out float FragColor; layout(location = 0) out float FragColor;
void main() void main()

View File

@ -2,8 +2,5 @@
void main() void main()
{ {
for (int _22 = 35; _22 >= 0; _22--)
{
}
} }

View File

@ -1,7 +1,7 @@
#version 450 #version 450
layout(rgba32f) uniform writeonly imageBuffer RWTex; layout(binding = 0, rgba32f) uniform writeonly imageBuffer RWTex;
uniform samplerBuffer Tex; layout(binding = 1) uniform samplerBuffer Tex;
layout(location = 0) out vec4 _entryPointOutput; layout(location = 0) out vec4 _entryPointOutput;

View File

@ -18,6 +18,7 @@ void main()
FragColor += vec4(v0[_54 & 1]); FragColor += vec4(v0[_54 & 1]);
continue; continue;
} }
continue;
} }
} }

View File

@ -25,6 +25,7 @@ void main()
break; break;
} }
} }
continue;
} }
} }

View File

@ -16,10 +16,11 @@ void main()
{ {
vec3 _28; vec3 _28;
_28 = vec3(0.0); _28 = vec3(0.0);
vec3 _29; for (int _31 = 0; _31 < 4; )
for (int _31 = 0; _31 < 4; _28 = _29, _31++)
{ {
_29 = _28 + _6.g_MyStruct[_31].color.xyz; _28 += _6.g_MyStruct[_31].color.xyz;
_31++;
continue;
} }
_entryPointOutput = vec4(_28, 1.0); _entryPointOutput = vec4(_28, 1.0);
} }

View File

@ -2,29 +2,8 @@
layout(location = 0) out vec4 _entryPointOutput; layout(location = 0) out vec4 _entryPointOutput;
vec4 _38;
vec4 _50;
void main() void main()
{ {
vec4 _51; _entryPointOutput = vec4(1.0, 1.0, 0.0, 1.0);
_51 = _50;
vec4 _52;
for (;;)
{
if (0.0 != 0.0)
{
_52 = vec4(1.0, 0.0, 0.0, 1.0);
break;
}
else
{
_52 = vec4(1.0, 1.0, 0.0, 1.0);
break;
}
_52 = _38;
break;
}
_entryPointOutput = _52;
} }

View File

@ -3,24 +3,21 @@
layout(location = 0) flat in int counter; layout(location = 0) flat in int counter;
layout(location = 0) out vec4 FragColor; layout(location = 0) out vec4 FragColor;
vec4 _21;
void main() void main()
{ {
vec4 _33; bool _29;
do for (;;)
{ {
if (counter == 10) _29 = counter == 10;
if (_29)
{ {
_33 = vec4(10.0);
break; break;
} }
else else
{ {
_33 = vec4(30.0);
break; break;
} }
} while (false); }
FragColor = _33; FragColor = mix(vec4(30.0), vec4(10.0), bvec4(_29));
} }

View File

@ -94,34 +94,33 @@ _28 _74;
void main() void main()
{ {
_28 _77 = _74;
_77._m0 = vec4(0.0);
vec2 _82 = gl_FragCoord.xy * _19._m23.xy; vec2 _82 = gl_FragCoord.xy * _19._m23.xy;
vec4 _88 = _7._m2 * _7._m0.xyxy; vec4 _88 = _7._m2 * _7._m0.xyxy;
vec2 _97 = clamp(_82 + (vec3(0.0, -2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); vec2 _95 = _88.xy;
vec2 _96 = _88.zw;
vec2 _97 = clamp(_82 + (vec2(0.0, -2.0) * _7._m0.xy), _95, _96);
vec3 _109 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _97, 0.0).w * _7._m1, 0.0, 1.0); vec3 _109 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _97, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0); vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0);
float _114 = _113.y;
vec3 _129; vec3 _129;
if (_113.y > 0.0) if (_114 > 0.0)
{ {
_129 = _109 + (textureLod(SPIRV_Cross_Combined_2, _97, 0.0).xyz * clamp(_113.y * _113.z, 0.0, 1.0)); _129 = _109 + (textureLod(SPIRV_Cross_Combined_2, _97, 0.0).xyz * clamp(_114 * _113.z, 0.0, 1.0));
} }
else else
{ {
_129 = _109; _129 = _109;
} }
vec3 _130 = _129 * 0.5; vec3 _130 = _129 * 0.5;
vec3 _133 = vec4(0.0).xyz + _130; vec4 _134 = vec4(_130.x, _130.y, _130.z, vec4(0.0).w);
vec4 _134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w); vec2 _144 = clamp(_82 + (vec2(-1.0) * _7._m0.xy), _95, _96);
_28 _135 = _77;
_135._m0 = _134;
vec2 _144 = clamp(_82 + (vec3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _156 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _144, 0.0).w * _7._m1, 0.0, 1.0); vec3 _156 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _144, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _160 = textureLod(SPIRV_Cross_Combined_1, _144, 0.0); vec4 _160 = textureLod(SPIRV_Cross_Combined_1, _144, 0.0);
float _161 = _160.y;
vec3 _176; vec3 _176;
if (_160.y > 0.0) if (_161 > 0.0)
{ {
_176 = _156 + (textureLod(SPIRV_Cross_Combined_2, _144, 0.0).xyz * clamp(_160.y * _160.z, 0.0, 1.0)); _176 = _156 + (textureLod(SPIRV_Cross_Combined_2, _144, 0.0).xyz * clamp(_161 * _160.z, 0.0, 1.0));
} }
else else
{ {
@ -130,15 +129,14 @@ void main()
vec3 _177 = _176 * 0.5; vec3 _177 = _176 * 0.5;
vec3 _180 = _134.xyz + _177; vec3 _180 = _134.xyz + _177;
vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w); vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w);
_28 _182 = _135; vec2 _191 = clamp(_82 + (vec2(0.0, -1.0) * _7._m0.xy), _95, _96);
_182._m0 = _181;
vec2 _191 = clamp(_82 + (vec3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _203 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _191, 0.0).w * _7._m1, 0.0, 1.0); vec3 _203 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _191, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _207 = textureLod(SPIRV_Cross_Combined_1, _191, 0.0); vec4 _207 = textureLod(SPIRV_Cross_Combined_1, _191, 0.0);
float _208 = _207.y;
vec3 _223; vec3 _223;
if (_207.y > 0.0) if (_208 > 0.0)
{ {
_223 = _203 + (textureLod(SPIRV_Cross_Combined_2, _191, 0.0).xyz * clamp(_207.y * _207.z, 0.0, 1.0)); _223 = _203 + (textureLod(SPIRV_Cross_Combined_2, _191, 0.0).xyz * clamp(_208 * _207.z, 0.0, 1.0));
} }
else else
{ {
@ -147,15 +145,14 @@ void main()
vec3 _224 = _223 * 0.75; vec3 _224 = _223 * 0.75;
vec3 _227 = _181.xyz + _224; vec3 _227 = _181.xyz + _224;
vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w); vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w);
_28 _229 = _182; vec2 _238 = clamp(_82 + (vec2(1.0, -1.0) * _7._m0.xy), _95, _96);
_229._m0 = _228;
vec2 _238 = clamp(_82 + (vec3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _250 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _238, 0.0).w * _7._m1, 0.0, 1.0); vec3 _250 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _238, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _254 = textureLod(SPIRV_Cross_Combined_1, _238, 0.0); vec4 _254 = textureLod(SPIRV_Cross_Combined_1, _238, 0.0);
float _255 = _254.y;
vec3 _270; vec3 _270;
if (_254.y > 0.0) if (_255 > 0.0)
{ {
_270 = _250 + (textureLod(SPIRV_Cross_Combined_2, _238, 0.0).xyz * clamp(_254.y * _254.z, 0.0, 1.0)); _270 = _250 + (textureLod(SPIRV_Cross_Combined_2, _238, 0.0).xyz * clamp(_255 * _254.z, 0.0, 1.0));
} }
else else
{ {
@ -164,15 +161,14 @@ void main()
vec3 _271 = _270 * 0.5; vec3 _271 = _270 * 0.5;
vec3 _274 = _228.xyz + _271; vec3 _274 = _228.xyz + _271;
vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w); vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w);
_28 _276 = _229; vec2 _285 = clamp(_82 + (vec2(-2.0, 0.0) * _7._m0.xy), _95, _96);
_276._m0 = _275;
vec2 _285 = clamp(_82 + (vec3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _297 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _285, 0.0).w * _7._m1, 0.0, 1.0); vec3 _297 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _285, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _301 = textureLod(SPIRV_Cross_Combined_1, _285, 0.0); vec4 _301 = textureLod(SPIRV_Cross_Combined_1, _285, 0.0);
float _302 = _301.y;
vec3 _317; vec3 _317;
if (_301.y > 0.0) if (_302 > 0.0)
{ {
_317 = _297 + (textureLod(SPIRV_Cross_Combined_2, _285, 0.0).xyz * clamp(_301.y * _301.z, 0.0, 1.0)); _317 = _297 + (textureLod(SPIRV_Cross_Combined_2, _285, 0.0).xyz * clamp(_302 * _301.z, 0.0, 1.0));
} }
else else
{ {
@ -181,15 +177,14 @@ void main()
vec3 _318 = _317 * 0.5; vec3 _318 = _317 * 0.5;
vec3 _321 = _275.xyz + _318; vec3 _321 = _275.xyz + _318;
vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w); vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w);
_28 _323 = _276; vec2 _332 = clamp(_82 + (vec2(-1.0, 0.0) * _7._m0.xy), _95, _96);
_323._m0 = _322;
vec2 _332 = clamp(_82 + (vec3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _344 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _332, 0.0).w * _7._m1, 0.0, 1.0); vec3 _344 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _332, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _348 = textureLod(SPIRV_Cross_Combined_1, _332, 0.0); vec4 _348 = textureLod(SPIRV_Cross_Combined_1, _332, 0.0);
float _349 = _348.y;
vec3 _364; vec3 _364;
if (_348.y > 0.0) if (_349 > 0.0)
{ {
_364 = _344 + (textureLod(SPIRV_Cross_Combined_2, _332, 0.0).xyz * clamp(_348.y * _348.z, 0.0, 1.0)); _364 = _344 + (textureLod(SPIRV_Cross_Combined_2, _332, 0.0).xyz * clamp(_349 * _348.z, 0.0, 1.0));
} }
else else
{ {
@ -198,15 +193,14 @@ void main()
vec3 _365 = _364 * 0.75; vec3 _365 = _364 * 0.75;
vec3 _368 = _322.xyz + _365; vec3 _368 = _322.xyz + _365;
vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w); vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w);
_28 _370 = _323; vec2 _379 = clamp(_82, _95, _96);
_370._m0 = _369;
vec2 _379 = clamp(_82 + (vec3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _391 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _379, 0.0).w * _7._m1, 0.0, 1.0); vec3 _391 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _379, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _395 = textureLod(SPIRV_Cross_Combined_1, _379, 0.0); vec4 _395 = textureLod(SPIRV_Cross_Combined_1, _379, 0.0);
float _396 = _395.y;
vec3 _411; vec3 _411;
if (_395.y > 0.0) if (_396 > 0.0)
{ {
_411 = _391 + (textureLod(SPIRV_Cross_Combined_2, _379, 0.0).xyz * clamp(_395.y * _395.z, 0.0, 1.0)); _411 = _391 + (textureLod(SPIRV_Cross_Combined_2, _379, 0.0).xyz * clamp(_396 * _395.z, 0.0, 1.0));
} }
else else
{ {
@ -215,15 +209,14 @@ void main()
vec3 _412 = _411 * 1.0; vec3 _412 = _411 * 1.0;
vec3 _415 = _369.xyz + _412; vec3 _415 = _369.xyz + _412;
vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w); vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w);
_28 _417 = _370; vec2 _426 = clamp(_82 + (vec2(1.0, 0.0) * _7._m0.xy), _95, _96);
_417._m0 = _416;
vec2 _426 = clamp(_82 + (vec3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _438 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _426, 0.0).w * _7._m1, 0.0, 1.0); vec3 _438 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _426, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _442 = textureLod(SPIRV_Cross_Combined_1, _426, 0.0); vec4 _442 = textureLod(SPIRV_Cross_Combined_1, _426, 0.0);
float _443 = _442.y;
vec3 _458; vec3 _458;
if (_442.y > 0.0) if (_443 > 0.0)
{ {
_458 = _438 + (textureLod(SPIRV_Cross_Combined_2, _426, 0.0).xyz * clamp(_442.y * _442.z, 0.0, 1.0)); _458 = _438 + (textureLod(SPIRV_Cross_Combined_2, _426, 0.0).xyz * clamp(_443 * _442.z, 0.0, 1.0));
} }
else else
{ {
@ -232,15 +225,14 @@ void main()
vec3 _459 = _458 * 0.75; vec3 _459 = _458 * 0.75;
vec3 _462 = _416.xyz + _459; vec3 _462 = _416.xyz + _459;
vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w); vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w);
_28 _464 = _417; vec2 _473 = clamp(_82 + (vec2(2.0, 0.0) * _7._m0.xy), _95, _96);
_464._m0 = _463;
vec2 _473 = clamp(_82 + (vec3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _485 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _473, 0.0).w * _7._m1, 0.0, 1.0); vec3 _485 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _473, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _489 = textureLod(SPIRV_Cross_Combined_1, _473, 0.0); vec4 _489 = textureLod(SPIRV_Cross_Combined_1, _473, 0.0);
float _490 = _489.y;
vec3 _505; vec3 _505;
if (_489.y > 0.0) if (_490 > 0.0)
{ {
_505 = _485 + (textureLod(SPIRV_Cross_Combined_2, _473, 0.0).xyz * clamp(_489.y * _489.z, 0.0, 1.0)); _505 = _485 + (textureLod(SPIRV_Cross_Combined_2, _473, 0.0).xyz * clamp(_490 * _489.z, 0.0, 1.0));
} }
else else
{ {
@ -249,15 +241,14 @@ void main()
vec3 _506 = _505 * 0.5; vec3 _506 = _505 * 0.5;
vec3 _509 = _463.xyz + _506; vec3 _509 = _463.xyz + _506;
vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w); vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w);
_28 _511 = _464; vec2 _520 = clamp(_82 + (vec2(-1.0, 1.0) * _7._m0.xy), _95, _96);
_511._m0 = _510;
vec2 _520 = clamp(_82 + (vec3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _532 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _520, 0.0).w * _7._m1, 0.0, 1.0); vec3 _532 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _520, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _536 = textureLod(SPIRV_Cross_Combined_1, _520, 0.0); vec4 _536 = textureLod(SPIRV_Cross_Combined_1, _520, 0.0);
float _537 = _536.y;
vec3 _552; vec3 _552;
if (_536.y > 0.0) if (_537 > 0.0)
{ {
_552 = _532 + (textureLod(SPIRV_Cross_Combined_2, _520, 0.0).xyz * clamp(_536.y * _536.z, 0.0, 1.0)); _552 = _532 + (textureLod(SPIRV_Cross_Combined_2, _520, 0.0).xyz * clamp(_537 * _536.z, 0.0, 1.0));
} }
else else
{ {
@ -266,15 +257,14 @@ void main()
vec3 _553 = _552 * 0.5; vec3 _553 = _552 * 0.5;
vec3 _556 = _510.xyz + _553; vec3 _556 = _510.xyz + _553;
vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w); vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w);
_28 _558 = _511; vec2 _567 = clamp(_82 + (vec2(0.0, 1.0) * _7._m0.xy), _95, _96);
_558._m0 = _557;
vec2 _567 = clamp(_82 + (vec3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _579 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _567, 0.0).w * _7._m1, 0.0, 1.0); vec3 _579 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _567, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _583 = textureLod(SPIRV_Cross_Combined_1, _567, 0.0); vec4 _583 = textureLod(SPIRV_Cross_Combined_1, _567, 0.0);
float _584 = _583.y;
vec3 _599; vec3 _599;
if (_583.y > 0.0) if (_584 > 0.0)
{ {
_599 = _579 + (textureLod(SPIRV_Cross_Combined_2, _567, 0.0).xyz * clamp(_583.y * _583.z, 0.0, 1.0)); _599 = _579 + (textureLod(SPIRV_Cross_Combined_2, _567, 0.0).xyz * clamp(_584 * _583.z, 0.0, 1.0));
} }
else else
{ {
@ -283,15 +273,14 @@ void main()
vec3 _600 = _599 * 0.75; vec3 _600 = _599 * 0.75;
vec3 _603 = _557.xyz + _600; vec3 _603 = _557.xyz + _600;
vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w); vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w);
_28 _605 = _558; vec2 _614 = clamp(_82 + _7._m0.xy, _95, _96);
_605._m0 = _604;
vec2 _614 = clamp(_82 + (vec3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _626 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _614, 0.0).w * _7._m1, 0.0, 1.0); vec3 _626 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _614, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _630 = textureLod(SPIRV_Cross_Combined_1, _614, 0.0); vec4 _630 = textureLod(SPIRV_Cross_Combined_1, _614, 0.0);
float _631 = _630.y;
vec3 _646; vec3 _646;
if (_630.y > 0.0) if (_631 > 0.0)
{ {
_646 = _626 + (textureLod(SPIRV_Cross_Combined_2, _614, 0.0).xyz * clamp(_630.y * _630.z, 0.0, 1.0)); _646 = _626 + (textureLod(SPIRV_Cross_Combined_2, _614, 0.0).xyz * clamp(_631 * _630.z, 0.0, 1.0));
} }
else else
{ {
@ -300,15 +289,14 @@ void main()
vec3 _647 = _646 * 0.5; vec3 _647 = _646 * 0.5;
vec3 _650 = _604.xyz + _647; vec3 _650 = _604.xyz + _647;
vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w); vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w);
_28 _652 = _605; vec2 _661 = clamp(_82 + (vec2(0.0, 2.0) * _7._m0.xy), _95, _96);
_652._m0 = _651;
vec2 _661 = clamp(_82 + (vec3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
vec3 _673 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _661, 0.0).w * _7._m1, 0.0, 1.0); vec3 _673 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _661, 0.0).w * _7._m1, 0.0, 1.0);
vec4 _677 = textureLod(SPIRV_Cross_Combined_1, _661, 0.0); vec4 _677 = textureLod(SPIRV_Cross_Combined_1, _661, 0.0);
float _678 = _677.y;
vec3 _693; vec3 _693;
if (_677.y > 0.0) if (_678 > 0.0)
{ {
_693 = _673 + (textureLod(SPIRV_Cross_Combined_2, _661, 0.0).xyz * clamp(_677.y * _677.z, 0.0, 1.0)); _693 = _673 + (textureLod(SPIRV_Cross_Combined_2, _661, 0.0).xyz * clamp(_678 * _677.z, 0.0, 1.0));
} }
else else
{ {
@ -316,10 +304,8 @@ void main()
} }
vec3 _697 = _651.xyz + (_693 * 0.5); vec3 _697 = _651.xyz + (_693 * 0.5);
vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w); vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w);
_28 _699 = _652; vec3 _702 = _698.xyz * vec3(0.125);
_699._m0 = _698; _28 _704 = _74;
vec3 _702 = _698.xyz / vec3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5);
_28 _704 = _699;
_704._m0 = vec4(_702.x, _702.y, _702.z, _698.w); _704._m0 = vec4(_702.x, _702.y, _702.z, _698.w);
_28 _705 = _704; _28 _705 = _704;
_705._m0.w = 1.0; _705._m0.w = 1.0;

View File

@ -7,75 +7,28 @@ struct VertexOutput
vec2 uv; vec2 uv;
}; };
struct HSOut
{
vec4 pos;
vec2 uv;
};
struct HSConstantOut
{
float EdgeTess[3];
float InsideTess;
};
struct VertexOutput_1 struct VertexOutput_1
{ {
vec2 uv; vec2 uv;
}; };
struct HSOut_1
{
vec2 uv;
};
layout(location = 0) in VertexOutput_1 p[]; layout(location = 0) in VertexOutput_1 p[];
layout(location = 0) out HSOut_1 _entryPointOutput[3]; layout(location = 0) out VertexOutput_1 _entryPointOutput[3];
void main() void main()
{ {
VertexOutput p_1[3]; VertexOutput param[3] = VertexOutput[](VertexOutput(gl_in[0].gl_Position, p[0].uv), VertexOutput(gl_in[1].gl_Position, p[1].uv), VertexOutput(gl_in[2].gl_Position, p[2].uv));
p_1[0].pos = gl_in[0].gl_Position;
p_1[0].uv = p[0].uv;
p_1[1].pos = gl_in[1].gl_Position;
p_1[1].uv = p[1].uv;
p_1[2].pos = gl_in[2].gl_Position;
p_1[2].uv = p[2].uv;
VertexOutput param[3] = p_1;
HSOut _158;
HSOut _197 = _158;
_197.pos = param[gl_InvocationID].pos;
HSOut _199 = _197;
_199.uv = param[gl_InvocationID].uv;
_158 = _199;
gl_out[gl_InvocationID].gl_Position = param[gl_InvocationID].pos; gl_out[gl_InvocationID].gl_Position = param[gl_InvocationID].pos;
_entryPointOutput[gl_InvocationID].uv = param[gl_InvocationID].uv; _entryPointOutput[gl_InvocationID].uv = param[gl_InvocationID].uv;
barrier(); barrier();
if (int(gl_InvocationID) == 0) if (int(gl_InvocationID) == 0)
{ {
VertexOutput param_1[3] = p_1; vec2 _174 = vec2(1.0) + p[0].uv;
vec2 _174 = vec2(1.0) + param_1[0].uv;
float _175 = _174.x; float _175 = _174.x;
HSConstantOut _169;
HSConstantOut _205 = _169;
_205.EdgeTess[0] = _175;
vec2 _180 = vec2(1.0) + param_1[0].uv;
float _181 = _180.x;
HSConstantOut _207 = _205;
_207.EdgeTess[1] = _181;
vec2 _186 = vec2(1.0) + param_1[0].uv;
float _187 = _186.x;
HSConstantOut _209 = _207;
_209.EdgeTess[2] = _187;
vec2 _192 = vec2(1.0) + param_1[0].uv;
float _193 = _192.x;
HSConstantOut _211 = _209;
_211.InsideTess = _193;
_169 = _211;
gl_TessLevelOuter[0] = _175; gl_TessLevelOuter[0] = _175;
gl_TessLevelOuter[1] = _181; gl_TessLevelOuter[1] = _175;
gl_TessLevelOuter[2] = _187; gl_TessLevelOuter[2] = _175;
gl_TessLevelInner[0] = _193; gl_TessLevelInner[0] = _175;
} }
} }

View File

@ -1,15 +1,5 @@
#version 450 #version 450
struct VSInput
{
vec4 position;
};
struct VSOutput
{
vec4 position;
};
layout(location = 0) in vec4 position; layout(location = 0) in vec4 position;
void main() void main()

View File

@ -8,15 +8,9 @@ out gl_PerVertex
struct VSOut struct VSOut
{ {
float a; float a;
vec4 pos;
}; };
struct VSOut_1 layout(location = 0) out VSOut _entryPointOutput;
{
float a;
};
layout(location = 0) out VSOut_1 _entryPointOutput;
void main() void main()
{ {

View File

@ -15,9 +15,12 @@ layout(binding = 3, rgba16f) uniform writeonly mediump image2D iGradJacobian;
void main() void main()
{ {
vec4 _59 = (vec2(gl_GlobalInvocationID.xy) * _46.uInvSize.xy).xyxy + (_46.uInvSize * 0.5); vec4 _59 = (vec2(gl_GlobalInvocationID.xy) * _46.uInvSize.xy).xyxy + (_46.uInvSize * 0.5);
vec2 _157 = ((textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(1, 0)).xy - textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(-1, 0)).xy) * 0.60000002384185791015625) * _46.uScale.z; vec2 _67 = _59.xy;
vec2 _161 = ((textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(0, 1)).xy - textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(0, -1)).xy) * 0.60000002384185791015625) * _46.uScale.z; vec2 _128 = _59.zw;
imageStore(iHeightDisplacement, ivec2(gl_GlobalInvocationID.xy), vec4(textureLod(uHeight, _59.xy, 0.0).x, 0.0, 0.0, 0.0)); vec2 _157 = ((textureLodOffset(uDisplacement, _128, 0.0, ivec2(1, 0)).xy - textureLodOffset(uDisplacement, _128, 0.0, ivec2(-1, 0)).xy) * 0.60000002384185791015625) * _46.uScale.z;
imageStore(iGradJacobian, ivec2(gl_GlobalInvocationID.xy), vec4((_46.uScale.xy * 0.5) * vec2(textureLodOffset(uHeight, _59.xy, 0.0, ivec2(1, 0)).x - textureLodOffset(uHeight, _59.xy, 0.0, ivec2(-1, 0)).x, textureLodOffset(uHeight, _59.xy, 0.0, ivec2(0, 1)).x - textureLodOffset(uHeight, _59.xy, 0.0, ivec2(0, -1)).x), ((1.0 + _157.x) * (1.0 + _161.y)) - (_157.y * _161.x), 0.0)); vec2 _161 = ((textureLodOffset(uDisplacement, _128, 0.0, ivec2(0, 1)).xy - textureLodOffset(uDisplacement, _128, 0.0, ivec2(0, -1)).xy) * 0.60000002384185791015625) * _46.uScale.z;
ivec2 _172 = ivec2(gl_GlobalInvocationID.xy);
imageStore(iHeightDisplacement, _172, vec4(textureLod(uHeight, _67, 0.0).x, 0.0, 0.0, 0.0));
imageStore(iGradJacobian, _172, vec4((_46.uScale.xy * 0.5) * vec2(textureLodOffset(uHeight, _67, 0.0, ivec2(1, 0)).x - textureLodOffset(uHeight, _67, 0.0, ivec2(-1, 0)).x, textureLodOffset(uHeight, _67, 0.0, ivec2(0, 1)).x - textureLodOffset(uHeight, _67, 0.0, ivec2(0, -1)).x), ((1.0 + _157.x) * (1.0 + _161.y)) - (_157.y * _161.x), 0.0));
} }

View File

@ -6,13 +6,13 @@ layout(binding = 1, std430) buffer SSBO1
ivec4 outputs[]; ivec4 outputs[];
} _21; } _21;
layout(binding = 0, std430) buffer SSBO0 layout(binding = 0, std430) buffer _19_27
{ {
ivec4 inputs[]; ivec4 outputs[];
} _27; } _27;
void main() void main()
{ {
_21.outputs[gl_GlobalInvocationID.x] = mix(ivec4(0), ivec4(1), notEqual((_27.inputs[gl_GlobalInvocationID.x] & ivec4(3)), ivec4(uvec4(0u)))); _21.outputs[gl_GlobalInvocationID.x] = mix(ivec4(0), ivec4(1), notEqual((_27.outputs[gl_GlobalInvocationID.x] & ivec4(3)), ivec4(uvec4(0u))));
} }

View File

@ -31,26 +31,15 @@ void main()
break; break;
} }
} }
switch (int(_11.data))
{
case 0:
{
break;
}
case 1:
{
break;
}
}
float _181; float _181;
_181 = _180; _181 = _180;
for (int _179 = 0; _179 < 20; _179++, _181 += 10.0) for (int _179 = 0; _179 < 20; )
{ {
_179++;
_181 += 10.0;
continue;
} }
_11.data = _181; _11.data = _181;
do
{
} while (_180 != 20.0);
_11.data = _180; _11.data = _180;
} }

View File

@ -1,26 +1,18 @@
#version 310 es #version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
struct Composite
{
vec4 a[2];
vec4 b[2];
};
layout(binding = 0, std430) buffer SSBO0 layout(binding = 0, std430) buffer SSBO0
{ {
vec4 as[]; vec4 as[];
} _41; } _41;
layout(binding = 1, std430) buffer SSBO1 layout(binding = 1, std430) buffer _39_55
{ {
vec4 bs[]; vec4 as[];
} _55; } _55;
void main() void main()
{ {
vec4 _60[2] = vec4[](_41.as[gl_GlobalInvocationID.x], _55.bs[gl_GlobalInvocationID.x]); _41.as[gl_GlobalInvocationID.x] = ((_41.as[gl_GlobalInvocationID.x] + _55.as[gl_GlobalInvocationID.x]) + _55.as[gl_GlobalInvocationID.x]) + vec4(10.0);
vec4 param[3][2] = vec4[][](_60, vec4[](vec4(10.0), vec4(30.0)), _60);
_41.as[gl_GlobalInvocationID.x] = ((param[0][0] + param[2][1]) + param[0][1]) + param[1][0];
} }

View File

@ -10,10 +10,11 @@ layout(binding = 0, std430) buffer SSBO
void main() void main()
{ {
vec4 _17 = _13.data; vec4 _17 = _13.data;
_13.data = vec4(_17.x, _17.yz + vec2(10.0), _17.w); vec2 _28 = _17.yz + vec2(10.0);
_13.data = vec4(_17.x, _28, _17.w);
_13.data = (_17 + _17) + _17; _13.data = (_17 + _17) + _17;
_13.data = (_17.yz + vec2(10.0)).xxyy; _13.data = _28.xxyy;
_13.data = vec4((_17.yz + vec2(10.0)).y); _13.data = vec4(_28.y);
_13.data = vec4((_17.zw + vec2(10.0))[_13.index]); _13.data = vec4((_17.zw + vec2(10.0))[_13.index]);
} }

View File

@ -27,7 +27,6 @@ void main()
if (i < 16) if (i < 16)
{ {
_56 = _42; _56 = _42;
continue;
} }
else else
{ {

View File

@ -4,51 +4,52 @@ layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
layout(binding = 0, std430) readonly buffer Distribution layout(binding = 0, std430) readonly buffer Distribution
{ {
vec2 distribution[]; vec2 distribution[];
} _136; } _137;
layout(binding = 2, std140) uniform UBO layout(binding = 2, std140) uniform UBO
{ {
vec4 uModTime; vec4 uModTime;
} _165; } _166;
layout(binding = 1, std430) writeonly buffer HeightmapFFT layout(binding = 1, std430) writeonly buffer HeightmapFFT
{ {
uint heights[]; uint heights[];
} _224; } _225;
void main() void main()
{ {
uvec2 _263 = uvec2(64u, 1u) * gl_NumWorkGroups.xy; uvec2 _264 = uvec2(64u, 1u) * gl_NumWorkGroups.xy;
uvec2 _268 = _263 - gl_GlobalInvocationID.xy; uvec2 _269 = _264 - gl_GlobalInvocationID.xy;
bvec2 _270 = equal(gl_GlobalInvocationID.xy, uvec2(0u)); bvec2 _271 = equal(gl_GlobalInvocationID.xy, uvec2(0u));
uint _470; uint _475;
if (_270.x) if (_271.x)
{ {
_470 = 0u; _475 = 0u;
} }
else else
{ {
_470 = _268.x; _475 = _269.x;
} }
uint _471; uint _476;
if (_270.y) if (_271.y)
{ {
_471 = 0u; _476 = 0u;
} }
else else
{ {
_471 = _268.y; _476 = _269.y;
} }
vec2 _296 = vec2(gl_GlobalInvocationID.xy); uint _448 = _264.x;
vec2 _298 = vec2(_263); uint _280 = (gl_GlobalInvocationID.y * _448) + gl_GlobalInvocationID.x;
float _308 = sqrt(9.81000041961669921875 * length(_165.uModTime.xy * mix(_296, _296 - _298, greaterThan(_296, _298 * 0.5)))) * _165.uModTime.z; vec2 _297 = vec2(gl_GlobalInvocationID.xy);
float _310 = cos(_308); vec2 _299 = vec2(_264);
float _312 = sin(_308); float _309 = sqrt(9.81000041961669921875 * length(_166.uModTime.xy * mix(_297, _297 - _299, greaterThan(_297, _299 * 0.5)))) * _166.uModTime.z;
vec2 _315 = vec2(_310, _312); vec2 _316 = vec2(cos(_309), sin(_309));
vec2 _394 = _315.yy * (_136.distribution[(gl_GlobalInvocationID.xy.y * _263.x) + gl_GlobalInvocationID.xy.x]).yx; vec2 _387 = _316.xx;
vec2 _320 = vec2(_310, _312); vec2 _392 = _316.yy;
vec2 _420 = _320.yy * (_136.distribution[(_471 * _263.x) + _470]).yx; vec2 _395 = _392 * _137.distribution[_280].yx;
vec2 _428 = ((_136.distribution[(_471 * _263.x) + _470]) * _320.xx) + vec2(-_420.x, _420.y); vec2 _421 = _392 * (_137.distribution[(_476 * _448) + _475]).yx;
_224.heights[(gl_GlobalInvocationID.xy.y * _263.x) + gl_GlobalInvocationID.xy.x] = packHalf2x16((((_136.distribution[(gl_GlobalInvocationID.xy.y * _263.x) + gl_GlobalInvocationID.xy.x]) * _315.xx) + vec2(-_394.x, _394.y)) + vec2(_428.x, -_428.y)); vec2 _429 = ((_137.distribution[(_476 * _448) + _475]) * _387) + vec2(-_421.x, _421.y);
_225.heights[_280] = packHalf2x16(((_137.distribution[_280] * _387) + vec2(-_395.x, _395.y)) + vec2(_429.x, -_429.y));
} }

View File

@ -6,6 +6,7 @@ layout(binding = 1, rgba8) uniform writeonly mediump image2D uImageOut;
void main() void main()
{ {
imageStore(uImageOut, ivec2(gl_GlobalInvocationID.xy), imageLoad(uImageIn, ivec2(gl_GlobalInvocationID.xy) + imageSize(uImageIn))); ivec2 _23 = ivec2(gl_GlobalInvocationID.xy);
imageStore(uImageOut, _23, imageLoad(uImageIn, _23 + imageSize(uImageIn)));
} }

View File

@ -1,31 +0,0 @@
#version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(binding = 1, std430) writeonly buffer SSBO2
{
vec4 out_data[];
} _27;
int _69;
void main()
{
if (gl_GlobalInvocationID.x == 2u)
{
_27.out_data[gl_GlobalInvocationID.x] = vec4(20.0);
}
else
{
if (gl_GlobalInvocationID.x == 4u)
{
_27.out_data[gl_GlobalInvocationID.x] = vec4(10.0);
return;
}
}
for (int _68 = 0; _68 < 20; _68 = _69 + 1)
{
return;
}
_27.out_data[gl_GlobalInvocationID.x] = vec4(10.0);
}

View File

@ -18,7 +18,6 @@ void main()
_9.a ^= 10; _9.a ^= 10;
_9.a %= 40; _9.a %= 40;
_9.a |= 1; _9.a |= 1;
bool _65 = false && true; _9.a = 0;
_9.a = int(_65 && (true || _65));
} }

Some files were not shown because too many files have changed in this diff Show More