Update glslang and SPIRV-Tools.
A lot of changes in spirv-opt output. Some new invalid SPIR-V was found but most of them were not significant for SPIRV-Cross, so just marked them as invalid.
This commit is contained in:
parent
69b034f26e
commit
af75ef005f
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
GLSLANG_REV=461ea09943e0e88ea854ab9e3b42d17d728af2ad
|
||||
SPIRV_TOOLS_REV=53bc1623ecd3cc304d0d6feed8385e70c7ab30d3
|
||||
GLSLANG_REV=91ac4290bcf2cb930b4fb0981f09c00c0b6797e1
|
||||
SPIRV_TOOLS_REV=9bfe0eb25e3dfdf4f3fd86ab6c0cda009c9bd661
|
||||
|
||||
if [ -d external/glslang ]; then
|
||||
echo "Updating glslang to revision $GLSLANG_REV."
|
||||
|
@ -11,7 +11,7 @@ void comp_main()
|
||||
{
|
||||
uint _29;
|
||||
u0_counter.InterlockedAdd(0, -1, _29);
|
||||
u0[uint(asint(asfloat(_29))) + 0u] = uint(int(gl_GlobalInvocationID.x)).x;
|
||||
u0[asint(asfloat(_29))] = uint(int(gl_GlobalInvocationID.x)).x;
|
||||
}
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
|
@ -11,7 +11,7 @@ void comp_main()
|
||||
{
|
||||
uint _29;
|
||||
u0_counter.InterlockedAdd(0, 1, _29);
|
||||
u0[uint(asint(asfloat(_29))) + 0u] = uint(int(gl_GlobalInvocationID.x)).x;
|
||||
u0[asint(asfloat(_29))] = uint(int(gl_GlobalInvocationID.x)).x;
|
||||
}
|
||||
|
||||
[numthreads(4, 1, 1)]
|
||||
|
@ -17,11 +17,11 @@ struct SPIRV_Cross_Output
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
float4 _64 = 0.0f.xxxx;
|
||||
_64.y = float(_20);
|
||||
float4 _68 = _64;
|
||||
_68.z = float(_25);
|
||||
float4 _52 = _68 + float4(_30);
|
||||
float4 _63 = 0.0f.xxxx;
|
||||
_63.y = float(_20);
|
||||
float4 _66 = _63;
|
||||
_66.z = float(_25);
|
||||
float4 _52 = _66 + float4(_30);
|
||||
float2 _56 = _52.xy + float2(_32);
|
||||
gl_Position = float4(_56.x, _56.y, _52.z, _52.w);
|
||||
_4 = _33;
|
||||
|
@ -24,15 +24,12 @@ struct SPIRV_Cross_Input
|
||||
uint gl_LocalInvocationIndex : SV_GroupIndex;
|
||||
};
|
||||
|
||||
static Data data[2];
|
||||
static Data data2[2];
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
data = _25;
|
||||
Data data[2] = _25;
|
||||
Data _28 = { X, 2.0f };
|
||||
Data _31[2] = { _28, _30 };
|
||||
data2 = _31;
|
||||
Data data2[2] = _31;
|
||||
if (gl_LocalInvocationIndex == 0u)
|
||||
{
|
||||
_61.Store(gl_WorkGroupID.x * 8 + 0, asuint(data[gl_LocalInvocationID.x].a + data2[gl_LocalInvocationID.x].a));
|
||||
|
@ -11,9 +11,11 @@ struct SPIRV_Cross_Output
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
bool _47;
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
bool2 _25 = bool2(value.x == 0.0f, value.y == 0.0f);
|
||||
bool2 _25 = bool2(value.x == 0.0f, _47);
|
||||
FragColor = float4(1.0f, 0.0f, float(bool2(!_25.x, !_25.y).x), float(bool2(value.x <= float2(1.5f, 0.5f).x, value.y <= float2(1.5f, 0.5f).y).x));
|
||||
}
|
||||
|
||||
|
@ -22,14 +22,10 @@ struct SPIRV_Cross_Output
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
static float lut[4];
|
||||
static Foo foos[2];
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
lut = _16;
|
||||
foos = _28;
|
||||
FragColor = lut[_line].xxxx;
|
||||
Foo foos[2] = _28;
|
||||
FragColor = _16[_line].xxxx;
|
||||
FragColor += (foos[_line].a * foos[1 - _line].a).xxxx;
|
||||
}
|
||||
|
||||
|
@ -1,127 +1,5 @@
|
||||
Texture1D<uint4> uSampler1DUint : register(t0);
|
||||
SamplerState _uSampler1DUint_sampler : register(s0);
|
||||
Texture1D<int4> uSampler1DInt : register(t0);
|
||||
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 ret;
|
||||
Tex.GetDimensions(Level, ret.x, Param);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint SPIRV_Cross_textureSize(Texture1D<uint4> 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<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()
|
||||
{
|
||||
uint _17_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()
|
||||
|
@ -1,112 +1,5 @@
|
||||
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()
|
||||
{
|
||||
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()
|
||||
|
@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = float3(asfloat(0x7f800000u), asfloat(0xff800000u), asfloat(0xffc00000u));
|
||||
FragColor = float3(asfloat(0x7f800000u), asfloat(0xff800000u), asfloat(0x7fc00000u));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
|
@ -42,9 +42,7 @@ void frag_main()
|
||||
}
|
||||
int _91 = index & 3;
|
||||
FragColor += foobar[_91].z;
|
||||
float4 baz[4] = _60;
|
||||
baz = _104;
|
||||
FragColor += baz[_91].z;
|
||||
FragColor += _104[_91].z;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
@ -4,7 +4,7 @@ cbuffer cbuf : register(b3)
|
||||
};
|
||||
cbuffer registers
|
||||
{
|
||||
float4 registers_a : packoffset(c0);
|
||||
float4 registers_d : packoffset(c0);
|
||||
};
|
||||
Texture2D<float4> uSampledImage : register(t4);
|
||||
SamplerState _uSampledImage_sampler : register(s4);
|
||||
@ -26,7 +26,7 @@ struct SPIRV_Cross_Output
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_a);
|
||||
FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_d);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
@ -60,12 +60,12 @@ float3 SPIRV_Cross_projectTextureCoordinate(float4 coord)
|
||||
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 _335 = _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);
|
||||
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;
|
||||
_339.w = _308.w + separateTex2dDepth.SampleCmp(samplerDepth, texCoord3d.xy, texCoord3d.z);
|
||||
FragColor = _339;
|
||||
float4 _333 = _162;
|
||||
_333.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);
|
||||
float4 _308 = ((((((((((((((_333 + 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 _336 = _308;
|
||||
_336.w = _308.w + separateTex2dDepth.SampleCmp(samplerDepth, texCoord3d.xy, texCoord3d.z);
|
||||
FragColor = _336;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
@ -21,6 +21,6 @@ uint2 spvTexelBufferCoord(uint tc)
|
||||
kernel void main0(device u0_counters& u0_counter [[buffer(0)]], texture2d<uint, access::write> u0 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
|
||||
{
|
||||
uint _29 = atomic_fetch_sub_explicit((volatile device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed);
|
||||
u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord((uint(as_type<int>(as_type<float>(_29))) + 0u)));
|
||||
u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(as_type<int>(as_type<float>(_29))));
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,6 @@ uint2 spvTexelBufferCoord(uint tc)
|
||||
kernel void main0(device u0_counters& u0_counter [[buffer(0)]], texture2d<uint, access::write> u0 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
|
||||
{
|
||||
uint _29 = atomic_fetch_add_explicit((volatile device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed);
|
||||
u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord((uint(as_type<int>(as_type<float>(_29))) + 0u)));
|
||||
u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(as_type<int>(as_type<float>(_29))));
|
||||
}
|
||||
|
||||
|
@ -13,14 +13,14 @@ struct cb1_struct
|
||||
kernel void main0(constant cb1_struct& cb0_1 [[buffer(0)]], texture2d<float, access::write> u0 [[texture(1)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]])
|
||||
{
|
||||
int2 _46 = int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u));
|
||||
int _99;
|
||||
_99 = 0;
|
||||
for (; _99 < _46.y; _99++)
|
||||
int _97;
|
||||
_97 = 0;
|
||||
for (; _97 < _46.y; _97++)
|
||||
{
|
||||
for (int _100 = 0; _100 < _46.x; )
|
||||
for (int _98 = 0; _98 < _46.x; )
|
||||
{
|
||||
u0.write(cb0_1._m0[0].xxxx, uint2(((_46 * int3(gl_LocalInvocationID).xy) + int2(_99, _100))));
|
||||
_100++;
|
||||
u0.write(cb0_1._m0[0].xxxx, uint2(((_46 * int3(gl_LocalInvocationID).xy) + int2(_97, _98))));
|
||||
_98++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -13,14 +13,14 @@ struct cb1_struct
|
||||
kernel void main0(constant cb1_struct& cb0_1 [[buffer(0)]], texture2d<float, access::write> u0 [[texture(1)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]])
|
||||
{
|
||||
int2 _40 = int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u));
|
||||
int _82;
|
||||
_82 = 0;
|
||||
for (; _82 < _40.y; _82++)
|
||||
int _80;
|
||||
_80 = 0;
|
||||
for (; _80 < _40.y; _80++)
|
||||
{
|
||||
for (int _83 = 0; _83 < _40.x; )
|
||||
for (int _81 = 0; _81 < _40.x; )
|
||||
{
|
||||
u0.write(cb0_1._m0[0].xxxx, uint2(((_40 * int3(gl_LocalInvocationID).xy) + int2(_82, _83))));
|
||||
_83++;
|
||||
u0.write(cb0_1._m0[0].xxxx, uint2(((_40 * int3(gl_LocalInvocationID).xy) + int2(_80, _81))));
|
||||
_81++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
constant float _57 = {};
|
||||
constant float _49 = {};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
@ -13,7 +13,7 @@ struct main0_out
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.m_3 = float4(_57);
|
||||
out.m_3 = float4(_49);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_129 = _109;
|
||||
}
|
||||
float3 _130 = _129 * 0.5;
|
||||
float4 _134 = float4(_130.x, _130.y, _130.z, float4(0.0).w);
|
||||
float2 _144 = fast::clamp(_82 + (float2(-1.0) * _7._m0.xy), _95, _96);
|
||||
float3 _156 = float3(_11._m5) * fast::clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _160 = _12.sample(_13, _144, level(0.0));
|
||||
@ -131,8 +130,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_176 = _156;
|
||||
}
|
||||
float3 _177 = _176 * 0.5;
|
||||
float3 _180 = _134.xyz + _177;
|
||||
float4 _181 = float4(_180.x, _180.y, _180.z, _134.w);
|
||||
float2 _191 = fast::clamp(_82 + (float2(0.0, -1.0) * _7._m0.xy), _95, _96);
|
||||
float3 _203 = float3(_11._m5) * fast::clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _207 = _12.sample(_13, _191, level(0.0));
|
||||
@ -147,8 +144,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_223 = _203;
|
||||
}
|
||||
float3 _224 = _223 * 0.75;
|
||||
float3 _227 = _181.xyz + _224;
|
||||
float4 _228 = float4(_227.x, _227.y, _227.z, _181.w);
|
||||
float2 _238 = fast::clamp(_82 + (float2(1.0, -1.0) * _7._m0.xy), _95, _96);
|
||||
float3 _250 = float3(_11._m5) * fast::clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _254 = _12.sample(_13, _238, level(0.0));
|
||||
@ -163,8 +158,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_270 = _250;
|
||||
}
|
||||
float3 _271 = _270 * 0.5;
|
||||
float3 _274 = _228.xyz + _271;
|
||||
float4 _275 = float4(_274.x, _274.y, _274.z, _228.w);
|
||||
float2 _285 = fast::clamp(_82 + (float2(-2.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
float3 _297 = float3(_11._m5) * fast::clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _301 = _12.sample(_13, _285, level(0.0));
|
||||
@ -179,8 +172,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_317 = _297;
|
||||
}
|
||||
float3 _318 = _317 * 0.5;
|
||||
float3 _321 = _275.xyz + _318;
|
||||
float4 _322 = float4(_321.x, _321.y, _321.z, _275.w);
|
||||
float2 _332 = fast::clamp(_82 + (float2(-1.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
float3 _344 = float3(_11._m5) * fast::clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _348 = _12.sample(_13, _332, level(0.0));
|
||||
@ -195,8 +186,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_364 = _344;
|
||||
}
|
||||
float3 _365 = _364 * 0.75;
|
||||
float3 _368 = _322.xyz + _365;
|
||||
float4 _369 = float4(_368.x, _368.y, _368.z, _322.w);
|
||||
float2 _379 = fast::clamp(_82, _95, _96);
|
||||
float3 _391 = float3(_11._m5) * fast::clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _395 = _12.sample(_13, _379, level(0.0));
|
||||
@ -211,8 +200,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_411 = _391;
|
||||
}
|
||||
float3 _412 = _411 * 1.0;
|
||||
float3 _415 = _369.xyz + _412;
|
||||
float4 _416 = float4(_415.x, _415.y, _415.z, _369.w);
|
||||
float2 _426 = fast::clamp(_82 + (float2(1.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
float3 _438 = float3(_11._m5) * fast::clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _442 = _12.sample(_13, _426, level(0.0));
|
||||
@ -227,8 +214,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_458 = _438;
|
||||
}
|
||||
float3 _459 = _458 * 0.75;
|
||||
float3 _462 = _416.xyz + _459;
|
||||
float4 _463 = float4(_462.x, _462.y, _462.z, _416.w);
|
||||
float2 _473 = fast::clamp(_82 + (float2(2.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
float3 _485 = float3(_11._m5) * fast::clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _489 = _12.sample(_13, _473, level(0.0));
|
||||
@ -243,8 +228,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_505 = _485;
|
||||
}
|
||||
float3 _506 = _505 * 0.5;
|
||||
float3 _509 = _463.xyz + _506;
|
||||
float4 _510 = float4(_509.x, _509.y, _509.z, _463.w);
|
||||
float2 _520 = fast::clamp(_82 + (float2(-1.0, 1.0) * _7._m0.xy), _95, _96);
|
||||
float3 _532 = float3(_11._m5) * fast::clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _536 = _12.sample(_13, _520, level(0.0));
|
||||
@ -259,8 +242,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_552 = _532;
|
||||
}
|
||||
float3 _553 = _552 * 0.5;
|
||||
float3 _556 = _510.xyz + _553;
|
||||
float4 _557 = float4(_556.x, _556.y, _556.z, _510.w);
|
||||
float2 _567 = fast::clamp(_82 + (float2(0.0, 1.0) * _7._m0.xy), _95, _96);
|
||||
float3 _579 = float3(_11._m5) * fast::clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _583 = _12.sample(_13, _567, level(0.0));
|
||||
@ -275,8 +256,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_599 = _579;
|
||||
}
|
||||
float3 _600 = _599 * 0.75;
|
||||
float3 _603 = _557.xyz + _600;
|
||||
float4 _604 = float4(_603.x, _603.y, _603.z, _557.w);
|
||||
float2 _614 = fast::clamp(_82 + _7._m0.xy, _95, _96);
|
||||
float3 _626 = float3(_11._m5) * fast::clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _630 = _12.sample(_13, _614, level(0.0));
|
||||
@ -291,8 +270,6 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
_646 = _626;
|
||||
}
|
||||
float3 _647 = _646 * 0.5;
|
||||
float3 _650 = _604.xyz + _647;
|
||||
float4 _651 = float4(_650.x, _650.y, _650.z, _604.w);
|
||||
float2 _661 = fast::clamp(_82 + (float2(0.0, 2.0) * _7._m0.xy), _95, _96);
|
||||
float3 _673 = float3(_11._m5) * fast::clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0);
|
||||
float4 _677 = _12.sample(_13, _661, level(0.0));
|
||||
@ -306,11 +283,9 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _18& _19 [[buff
|
||||
{
|
||||
_693 = _673;
|
||||
}
|
||||
float3 _697 = _651.xyz + (_693 * 0.5);
|
||||
float4 _698 = float4(_697.x, _697.y, _697.z, _651.w);
|
||||
float3 _702 = _698.xyz * float3(0.125);
|
||||
float3 _702 = ((((((((((((_130.xyz + _177).xyz + _224).xyz + _271).xyz + _318).xyz + _365).xyz + _412).xyz + _459).xyz + _506).xyz + _553).xyz + _600).xyz + _647).xyz + (_693 * 0.5)).xyz * float3(0.125);
|
||||
_28 _704 = _74;
|
||||
_704._m0 = float4(_702.x, _702.y, _702.z, _698.w);
|
||||
_704._m0 = float4(_702.x, _702.y, _702.z, float4(0.0).w);
|
||||
_28 _705 = _704;
|
||||
_705._m0.w = 1.0;
|
||||
out.m_5 = _705._m0;
|
||||
|
@ -22,11 +22,11 @@ struct main0_out
|
||||
vertex main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
float4 _64 = float4(0.0);
|
||||
_64.y = float(_20);
|
||||
float4 _68 = _64;
|
||||
_68.z = float(_25);
|
||||
float4 _52 = _68 + float4(_30);
|
||||
float4 _63 = float4(0.0);
|
||||
_63.y = float(_20);
|
||||
float4 _66 = _63;
|
||||
_66.z = float(_25);
|
||||
float4 _52 = _66 + float4(_30);
|
||||
float2 _56 = _52.xy + float2(_32);
|
||||
out.gl_Position = float4(_56.x, _56.y, _52.z, _52.w);
|
||||
out.m_4 = _33;
|
||||
|
@ -5,14 +5,5 @@ using namespace metal;
|
||||
|
||||
kernel void main0(uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]])
|
||||
{
|
||||
threadgroup int u;
|
||||
u = 50;
|
||||
if (gl_LocalInvocationIndex == 0u)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
u = 20;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,8 +40,6 @@ kernel void main0(device SSBO& ssbo [[buffer(2)]])
|
||||
{
|
||||
_52 = 10;
|
||||
} while (!atomic_compare_exchange_weak_explicit((volatile device atomic_int*)&ssbo.i32, &_52, 2, memory_order_relaxed, memory_order_relaxed));
|
||||
shared_u32 = 10u;
|
||||
shared_i32 = 10;
|
||||
uint _57 = atomic_fetch_add_explicit((volatile threadgroup atomic_uint*)&shared_u32, 1u, memory_order_relaxed);
|
||||
uint _58 = atomic_fetch_or_explicit((volatile threadgroup atomic_uint*)&shared_u32, 1u, memory_order_relaxed);
|
||||
uint _59 = atomic_fetch_xor_explicit((volatile threadgroup atomic_uint*)&shared_u32, 1u, memory_order_relaxed);
|
||||
|
@ -10,6 +10,11 @@ struct SSBO0
|
||||
float4 as[1];
|
||||
};
|
||||
|
||||
struct SSBO1
|
||||
{
|
||||
float4 bs[1];
|
||||
};
|
||||
|
||||
// Implementation of an array copy function to cover GLSL's ability to copy an array via assignment.
|
||||
template<typename T, uint N>
|
||||
void spvArrayCopyFromStack1(thread T (&dst)[N], thread const T (&src)[N])
|
||||
@ -23,12 +28,12 @@ void spvArrayCopyFromConstant1(thread T (&dst)[N], constant T (&src)[N])
|
||||
for (uint i = 0; i < N; dst[i] = src[i], i++);
|
||||
}
|
||||
|
||||
kernel void main0(device SSBO0& _16 [[buffer(0)]], device SSBO0& _32 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]])
|
||||
kernel void main0(device SSBO0& _16 [[buffer(0)]], device SSBO1& _32 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]])
|
||||
{
|
||||
float4 _37[2] = { _16.as[gl_GlobalInvocationID.x], _32.as[gl_GlobalInvocationID.x] };
|
||||
float4 _37[2] = { _16.as[gl_GlobalInvocationID.x], _32.bs[gl_GlobalInvocationID.x] };
|
||||
float4 values[2];
|
||||
spvArrayCopyFromStack1(values, _37);
|
||||
_16.as[0] = values[gl_LocalInvocationIndex];
|
||||
_32.as[1] = float4(40.0);
|
||||
_32.bs[1] = float4(40.0);
|
||||
}
|
||||
|
||||
|
@ -16,17 +16,19 @@ struct SSBO2
|
||||
|
||||
kernel void main0(const device SSBO& _28 [[buffer(0)]], device SSBO2& _52 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
|
||||
{
|
||||
int i = 0;
|
||||
float4 _56;
|
||||
_56 = _28.in_data[gl_GlobalInvocationID.x];
|
||||
float4 _57;
|
||||
int _58;
|
||||
_58 = 0;
|
||||
_57 = _28.in_data[gl_GlobalInvocationID.x];
|
||||
float4 _42;
|
||||
for (;;)
|
||||
{
|
||||
_42 = _28.mvp * _56;
|
||||
i++;
|
||||
if (i < 16)
|
||||
_42 = _28.mvp * _57;
|
||||
int _44 = _58 + 1;
|
||||
if (_44 < 16)
|
||||
{
|
||||
_56 = _42;
|
||||
_58 = _44;
|
||||
_57 = _42;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5,7 +5,5 @@ using namespace metal;
|
||||
|
||||
kernel void main0()
|
||||
{
|
||||
threadgroup int foo[1337];
|
||||
foo[0] = 13;
|
||||
}
|
||||
|
||||
|
@ -73,18 +73,41 @@ struct S0_1
|
||||
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
|
||||
{
|
||||
S0_1 m0s[1];
|
||||
S1 m1s[1];
|
||||
S2 m2s[1];
|
||||
S1_1 m1s[1];
|
||||
S2_1 m2s[1];
|
||||
S0_1 m0;
|
||||
S1 m1;
|
||||
S2 m2;
|
||||
S3 m3;
|
||||
S1_1 m1;
|
||||
S2_1 m2;
|
||||
S3_1 m3;
|
||||
char pad7[4];
|
||||
float m4;
|
||||
S4 m3s[8];
|
||||
S4_1 m3s[8];
|
||||
};
|
||||
|
||||
struct SSBO0
|
||||
|
@ -13,13 +13,23 @@ struct SSBO0
|
||||
S0 s0s[1];
|
||||
};
|
||||
|
||||
struct S1
|
||||
{
|
||||
float4 a;
|
||||
};
|
||||
|
||||
struct SSBO1
|
||||
{
|
||||
S1 s1s[1];
|
||||
};
|
||||
|
||||
struct SSBO2
|
||||
{
|
||||
float4 outputs[1];
|
||||
};
|
||||
|
||||
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]])
|
||||
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]])
|
||||
{
|
||||
_66.outputs[gl_GlobalInvocationID.x] = _36.s0s[gl_GlobalInvocationID.x].a + _55.s0s[gl_GlobalInvocationID.x].a;
|
||||
_66.outputs[gl_GlobalInvocationID.x] = _36.s0s[gl_GlobalInvocationID.x].a + _55.s1s[gl_GlobalInvocationID.x].a;
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,13 @@ struct SSBO2
|
||||
uint outputs[1];
|
||||
};
|
||||
|
||||
kernel void main0(device SSBO2& _23 [[buffer(0)]], device SSBO2& _10 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
|
||||
struct SSBO
|
||||
{
|
||||
_10.outputs[gl_GlobalInvocationID.x] = _23.outputs[gl_GlobalInvocationID.x] / 29u;
|
||||
uint inputs[1];
|
||||
};
|
||||
|
||||
kernel void main0(device SSBO& _23 [[buffer(0)]], device SSBO2& _10 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
|
||||
{
|
||||
_10.outputs[gl_GlobalInvocationID.x] = _23.inputs[gl_GlobalInvocationID.x] / 29u;
|
||||
}
|
||||
|
||||
|
@ -40,9 +40,8 @@ void spvArrayCopyFromConstant1(thread T (&dst)[N], constant T (&src)[N])
|
||||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
float lut[4] = { 1.0, 4.0, 3.0, 2.0 };
|
||||
Foo foos[2] = { Foo{ 10.0, 20.0 }, Foo{ 30.0, 40.0 } };
|
||||
out.FragColor = float4(lut[in.line]);
|
||||
out.FragColor = float4(_16[in.line]);
|
||||
out.FragColor += float4(foos[in.line].a * foos[1 - in.line].a);
|
||||
return out;
|
||||
}
|
||||
|
@ -3,9 +3,6 @@
|
||||
|
||||
using namespace metal;
|
||||
|
||||
constant int2 _184 = {};
|
||||
constant int _199 = {};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
int FragColor [[color(0)]];
|
||||
@ -14,70 +11,62 @@ struct main0_out
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = 16;
|
||||
for (int _168 = 0; _168 < 25; )
|
||||
int _145;
|
||||
for (;;)
|
||||
{
|
||||
out.FragColor += 10;
|
||||
_168++;
|
||||
continue;
|
||||
}
|
||||
for (int _169 = 1; _169 < 30; )
|
||||
{
|
||||
out.FragColor += 11;
|
||||
_169++;
|
||||
continue;
|
||||
}
|
||||
int _170;
|
||||
_170 = 0;
|
||||
for (; _170 < 20; )
|
||||
{
|
||||
out.FragColor += 12;
|
||||
_170++;
|
||||
continue;
|
||||
}
|
||||
int _62 = _170 + 3;
|
||||
out.FragColor += _62;
|
||||
bool _68 = _62 == 40;
|
||||
if (_68)
|
||||
{
|
||||
for (int _171 = 0; _171 < 40; )
|
||||
out.FragColor = 16;
|
||||
_145 = 0;
|
||||
for (; _145 < 25; )
|
||||
{
|
||||
out.FragColor += 13;
|
||||
_171++;
|
||||
out.FragColor += 10;
|
||||
_145++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int _146 = 1; _146 < 30; )
|
||||
{
|
||||
out.FragColor += 11;
|
||||
_146++;
|
||||
continue;
|
||||
}
|
||||
int _147;
|
||||
_147 = 0;
|
||||
for (; _147 < 20; )
|
||||
{
|
||||
out.FragColor += 12;
|
||||
_147++;
|
||||
continue;
|
||||
}
|
||||
int _62 = _147 + 3;
|
||||
out.FragColor += _62;
|
||||
}
|
||||
bool2 _211 = bool2(_68);
|
||||
int2 _212 = int2(_211.x ? _184.x : _184.x, _211.y ? _184.y : _184.y);
|
||||
bool _213 = _68 ? true : false;
|
||||
bool2 _214 = bool2(_213);
|
||||
if (!_213)
|
||||
{
|
||||
int2 _177;
|
||||
_177 = int2(_214.x ? _212.x : int2(0).x, _214.y ? _212.y : int2(0).y);
|
||||
for (; _177.x < 10; )
|
||||
if (_62 == 40)
|
||||
{
|
||||
out.FragColor += _177.y;
|
||||
int2 _167 = _177;
|
||||
_167.x = _177.x + 4;
|
||||
_177 = _167;
|
||||
for (int _151 = 0; _151 < 40; )
|
||||
{
|
||||
out.FragColor += 13;
|
||||
_151++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
out.FragColor += _62;
|
||||
int2 _148;
|
||||
_148 = int2(0);
|
||||
for (; _148.x < 10; )
|
||||
{
|
||||
out.FragColor += _148.y;
|
||||
int2 _144 = _148;
|
||||
_144.x = _148.x + 4;
|
||||
_148 = _144;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
int _216 = _213 ? (_68 ? _199 : _199) : _62;
|
||||
if (!_213)
|
||||
{
|
||||
for (int _191 = _216; _191 < 40; )
|
||||
for (int _150 = _62; _150 < 40; )
|
||||
{
|
||||
out.FragColor += _191;
|
||||
_191++;
|
||||
out.FragColor += _150;
|
||||
_150++;
|
||||
continue;
|
||||
}
|
||||
out.FragColor += _216;
|
||||
out.FragColor += _62;
|
||||
break;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
@ -29,9 +29,9 @@ fragment main0_out main0(main0_in in [[stage_in]], texturecube<float> samplerCol
|
||||
inInvModelView[3] = in.inInvModelView_3;
|
||||
float4 _31 = inInvModelView * float4(reflect(normalize(in.inPos), normalize(in.inNormal)), 0.0);
|
||||
float _33 = _31.x;
|
||||
float3 _60 = float3(_33, _31.yz);
|
||||
_60.x = _33 * (-1.0);
|
||||
out.outFragColor = samplerColor.sample(samplerColorSmplr, _60, bias(in.inLodBias));
|
||||
float3 _59 = float3(_33, _31.yz);
|
||||
_59.x = _33 * (-1.0);
|
||||
out.outFragColor = samplerColor.sample(samplerColorSmplr, _59, bias(in.inLodBias));
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ struct main0_out
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = float3(as_type<float>(0x7f800000u), as_type<float>(0xff800000u), as_type<float>(0xffc00000u));
|
||||
out.FragColor = float3(as_type<float>(0x7f800000u), as_type<float>(0xff800000u), as_type<float>(0x7fc00000u));
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -60,9 +60,7 @@ fragment main0_out main0(main0_in in [[stage_in]])
|
||||
}
|
||||
int _91 = in.index & 3;
|
||||
out.FragColor += foobar[_91].z;
|
||||
float4 baz[4] = { float4(0.0), float4(1.0), float4(8.0), float4(5.0) };
|
||||
spvArrayCopyFromConstant1(baz, _104);
|
||||
out.FragColor += baz[_91].z;
|
||||
out.FragColor += _104[_91].z;
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _21 [[buffer(0)]]
|
||||
out.vColor = float4(0.0);
|
||||
for (int _96 = 0; _96 < 4; )
|
||||
{
|
||||
float3 _68 = in.aVertex.xyz - _21.lights[_96].Position;
|
||||
float3 _68 = in.aVertex.xyz - float3(_21.lights[_96].Position);
|
||||
out.vColor += ((_21.lights[_96].Color * fast::clamp(1.0 - (length(_68) / _21.lights[_96].Radius), 0.0, 1.0)) * dot(in.aNormal, normalize(_68)));
|
||||
_96++;
|
||||
continue;
|
||||
|
@ -42,9 +42,9 @@ vertex main0_out main0(main0_in in [[stage_in]], constant _42& _44 [[buffer(12)]
|
||||
main0_out out = {};
|
||||
float4 _70 = _44._m0 * float4(float3(_44._m3) + (in.m_25.xyz * (_44._m6 + _44._m7)), 1.0);
|
||||
out.m_72 = normalize(float4(in.m_25.xyz, 0.0) * _17._m1);
|
||||
float4 _95 = _70;
|
||||
_95.y = -_70.y;
|
||||
out.gl_Position = _95;
|
||||
float4 _94 = _70;
|
||||
_94.y = -_70.y;
|
||||
out.gl_Position = _94;
|
||||
return out;
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,9 @@ layout(binding = 0, std430) buffer inputData
|
||||
float inputDataArray[];
|
||||
} _12;
|
||||
|
||||
layout(binding = 1, std430) buffer _10_74
|
||||
layout(binding = 1, std430) buffer outputData
|
||||
{
|
||||
float inputDataArray[];
|
||||
float outputDataArray[];
|
||||
} _74;
|
||||
|
||||
void main()
|
||||
@ -22,7 +22,7 @@ void main()
|
||||
uint _44 = mbcntAMD(packUint2x32(uvec2(_37.xy)));
|
||||
if (_31)
|
||||
{
|
||||
_74.inputDataArray[_44] = _25;
|
||||
_74.outputDataArray[_44] = _25;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,6 @@ layout(binding = 0, r32ui) uniform writeonly uimageBuffer u0;
|
||||
void main()
|
||||
{
|
||||
uint _29 = atomicAdd(u0_counter.c, uint(-1));
|
||||
imageStore(u0, int(uint(floatBitsToInt(uintBitsToFloat(_29))) + 0u), uvec4(uint(int(gl_GlobalInvocationID.x))));
|
||||
imageStore(u0, floatBitsToInt(uintBitsToFloat(_29)), uvec4(uint(int(gl_GlobalInvocationID.x))));
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,6 @@ layout(binding = 0, r32ui) uniform writeonly uimageBuffer u0;
|
||||
void main()
|
||||
{
|
||||
uint _29 = atomicAdd(u0_counter.c, 1u);
|
||||
imageStore(u0, int(uint(floatBitsToInt(uintBitsToFloat(_29))) + 0u), uvec4(uint(int(gl_GlobalInvocationID.x))));
|
||||
imageStore(u0, floatBitsToInt(uintBitsToFloat(_29)), uvec4(uint(int(gl_GlobalInvocationID.x))));
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
layout(location = 0) out vec4 _3;
|
||||
|
||||
float _57;
|
||||
float _49;
|
||||
|
||||
void main()
|
||||
{
|
||||
_3 = vec4(_57);
|
||||
_3 = vec4(_49);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,5 @@
|
||||
#version 450
|
||||
|
||||
uniform sampler2D SPIRV_Cross_CombineduSampler2DSPIRV_Cross_DummySampler;
|
||||
uniform sampler2DMS SPIRV_Cross_CombineduSampler2DMSSPIRV_Cross_DummySampler;
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
|
@ -1,9 +1,5 @@
|
||||
#version 450
|
||||
|
||||
layout(set = 0, binding = 0) uniform texture2D uSampler2D;
|
||||
layout(set = 0, binding = 0) uniform texture2DMS uSampler2DMS;
|
||||
layout(set = 0, binding = 0) uniform sampler SPIRV_Cross_DummySampler;
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
|
@ -10,73 +10,63 @@ layout(binding = 0, std140) uniform Foo
|
||||
layout(location = 0) in vec3 fragWorld;
|
||||
layout(location = 0) out int _entryPointOutput;
|
||||
|
||||
mat4 _235;
|
||||
int _245;
|
||||
int _240;
|
||||
|
||||
void main()
|
||||
{
|
||||
uint _229;
|
||||
bool _231;
|
||||
mat4 _234;
|
||||
_234 = _235;
|
||||
_231 = false;
|
||||
_229 = 0u;
|
||||
bool _251;
|
||||
mat4 _232;
|
||||
int _243;
|
||||
bool _158;
|
||||
bool _246;
|
||||
uint _227;
|
||||
int _237;
|
||||
for (;;)
|
||||
{
|
||||
_158 = _229 < _11.shadowCascadesNum;
|
||||
if (_158)
|
||||
_227 = 0u;
|
||||
bool _164;
|
||||
for (;;)
|
||||
{
|
||||
bool _209 = _11.test == 0;
|
||||
mat4 _233;
|
||||
if (_209)
|
||||
_164 = _227 < _11.shadowCascadesNum;
|
||||
if (_164)
|
||||
{
|
||||
_233 = 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));
|
||||
}
|
||||
else
|
||||
{
|
||||
_233 = _234;
|
||||
}
|
||||
bool _250 = _209 ? true : _231;
|
||||
if (!_250)
|
||||
{
|
||||
_232 = 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));
|
||||
}
|
||||
else
|
||||
{
|
||||
_232 = _233;
|
||||
}
|
||||
_251 = _250 ? _250 : true;
|
||||
vec4 _171 = (_232 * _11.lightVP[_229]) * vec4(fragWorld, 1.0);
|
||||
float _218 = _171.z;
|
||||
float _222 = _171.x;
|
||||
float _224 = _171.y;
|
||||
if ((((_218 >= 0.0) && (_218 <= 1.0)) && (max(_222, _224) <= 1.0)) && (min(_222, _224) >= 0.0))
|
||||
{
|
||||
_243 = int(_229);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_234 = _232;
|
||||
_231 = _251;
|
||||
_229++;
|
||||
mat4 _228;
|
||||
for (;;)
|
||||
{
|
||||
if (_11.test == 0)
|
||||
{
|
||||
_228 = 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;
|
||||
}
|
||||
_228 = 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;
|
||||
}
|
||||
vec4 _177 = (_228 * _11.lightVP[_227]) * vec4(fragWorld, 1.0);
|
||||
float _179 = _177.z;
|
||||
float _186 = _177.x;
|
||||
float _188 = _177.y;
|
||||
if ((((_179 >= 0.0) && (_179 <= 1.0)) && (max(_186, _188) <= 1.0)) && (min(_186, _188) >= 0.0))
|
||||
{
|
||||
_237 = int(_227);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_227++;
|
||||
continue;
|
||||
}
|
||||
_227++;
|
||||
continue;
|
||||
}
|
||||
_234 = _232;
|
||||
_231 = _251;
|
||||
_229++;
|
||||
continue;
|
||||
else
|
||||
{
|
||||
_237 = _240;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
_246 = _164 ? true : false;
|
||||
if (_246)
|
||||
{
|
||||
_243 = _245;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
_entryPointOutput = (_158 ? true : false) ? _243 : (-1);
|
||||
_entryPointOutput = _246 ? _237 : (-1);
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,8 @@ layout(location = 0) flat in mediump int counter;
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(0.0);
|
||||
int _53 = 0;
|
||||
uint _54 = 1u;
|
||||
mediump int _53 = 0;
|
||||
mediump uint _54 = 1u;
|
||||
for (; (_53 < 10) && (int(_54) < int(20u)); )
|
||||
{
|
||||
FragColor += vec4(float(_53));
|
||||
|
@ -112,7 +112,6 @@ void main()
|
||||
_129 = _109;
|
||||
}
|
||||
vec3 _130 = _129 * 0.5;
|
||||
vec4 _134 = vec4(_130.x, _130.y, _130.z, vec4(0.0).w);
|
||||
vec2 _144 = clamp(_82 + (vec2(-1.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -127,8 +126,6 @@ void main()
|
||||
_176 = _156;
|
||||
}
|
||||
vec3 _177 = _176 * 0.5;
|
||||
vec3 _180 = _134.xyz + _177;
|
||||
vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w);
|
||||
vec2 _191 = clamp(_82 + (vec2(0.0, -1.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -143,8 +140,6 @@ void main()
|
||||
_223 = _203;
|
||||
}
|
||||
vec3 _224 = _223 * 0.75;
|
||||
vec3 _227 = _181.xyz + _224;
|
||||
vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w);
|
||||
vec2 _238 = clamp(_82 + (vec2(1.0, -1.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -159,8 +154,6 @@ void main()
|
||||
_270 = _250;
|
||||
}
|
||||
vec3 _271 = _270 * 0.5;
|
||||
vec3 _274 = _228.xyz + _271;
|
||||
vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w);
|
||||
vec2 _285 = clamp(_82 + (vec2(-2.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -175,8 +168,6 @@ void main()
|
||||
_317 = _297;
|
||||
}
|
||||
vec3 _318 = _317 * 0.5;
|
||||
vec3 _321 = _275.xyz + _318;
|
||||
vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w);
|
||||
vec2 _332 = clamp(_82 + (vec2(-1.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -191,8 +182,6 @@ void main()
|
||||
_364 = _344;
|
||||
}
|
||||
vec3 _365 = _364 * 0.75;
|
||||
vec3 _368 = _322.xyz + _365;
|
||||
vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w);
|
||||
vec2 _379 = clamp(_82, _95, _96);
|
||||
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);
|
||||
@ -207,8 +196,6 @@ void main()
|
||||
_411 = _391;
|
||||
}
|
||||
vec3 _412 = _411 * 1.0;
|
||||
vec3 _415 = _369.xyz + _412;
|
||||
vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w);
|
||||
vec2 _426 = clamp(_82 + (vec2(1.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -223,8 +210,6 @@ void main()
|
||||
_458 = _438;
|
||||
}
|
||||
vec3 _459 = _458 * 0.75;
|
||||
vec3 _462 = _416.xyz + _459;
|
||||
vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w);
|
||||
vec2 _473 = clamp(_82 + (vec2(2.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -239,8 +224,6 @@ void main()
|
||||
_505 = _485;
|
||||
}
|
||||
vec3 _506 = _505 * 0.5;
|
||||
vec3 _509 = _463.xyz + _506;
|
||||
vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w);
|
||||
vec2 _520 = clamp(_82 + (vec2(-1.0, 1.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -255,8 +238,6 @@ void main()
|
||||
_552 = _532;
|
||||
}
|
||||
vec3 _553 = _552 * 0.5;
|
||||
vec3 _556 = _510.xyz + _553;
|
||||
vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w);
|
||||
vec2 _567 = clamp(_82 + (vec2(0.0, 1.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -271,8 +252,6 @@ void main()
|
||||
_599 = _579;
|
||||
}
|
||||
vec3 _600 = _599 * 0.75;
|
||||
vec3 _603 = _557.xyz + _600;
|
||||
vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w);
|
||||
vec2 _614 = clamp(_82 + _7._m0.xy, _95, _96);
|
||||
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);
|
||||
@ -287,8 +266,6 @@ void main()
|
||||
_646 = _626;
|
||||
}
|
||||
vec3 _647 = _646 * 0.5;
|
||||
vec3 _650 = _604.xyz + _647;
|
||||
vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w);
|
||||
vec2 _661 = clamp(_82 + (vec2(0.0, 2.0) * _7._m0.xy), _95, _96);
|
||||
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);
|
||||
@ -302,11 +279,9 @@ void main()
|
||||
{
|
||||
_693 = _673;
|
||||
}
|
||||
vec3 _697 = _651.xyz + (_693 * 0.5);
|
||||
vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w);
|
||||
vec3 _702 = _698.xyz * vec3(0.125);
|
||||
vec3 _702 = ((((((((((((_130.xyz + _177).xyz + _224).xyz + _271).xyz + _318).xyz + _365).xyz + _412).xyz + _459).xyz + _506).xyz + _553).xyz + _600).xyz + _647).xyz + (_693 * 0.5)).xyz * vec3(0.125);
|
||||
_28 _704 = _74;
|
||||
_704._m0 = vec4(_702.x, _702.y, _702.z, _698.w);
|
||||
_704._m0 = vec4(_702.x, _702.y, _702.z, vec4(0.0).w);
|
||||
_28 _705 = _704;
|
||||
_705._m0.w = 1.0;
|
||||
_5 = _705._m0;
|
||||
|
@ -4,11 +4,11 @@ layout(location = 0) flat out int _4;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 _64 = vec4(0.0);
|
||||
_64.y = float(((-10) + 2));
|
||||
vec4 _68 = _64;
|
||||
_68.z = float((100u % 5u));
|
||||
vec4 _52 = _68 + vec4(ivec4(20, 30, 0, 0));
|
||||
vec4 _63 = vec4(0.0);
|
||||
_63.y = float(((-10) + 2));
|
||||
vec4 _66 = _63;
|
||||
_66.z = float((100u % 5u));
|
||||
vec4 _52 = _66 + vec4(ivec4(20, 30, 0, 0));
|
||||
vec2 _56 = _52.xy + vec2(ivec2(ivec4(20, 30, 0, 0).y, ivec4(20, 30, 0, 0).x));
|
||||
gl_Position = vec4(_56.x, _56.y, _52.z, _52.w);
|
||||
_4 = ivec4(20, 30, 0, 0).y;
|
||||
|
@ -12,11 +12,11 @@ layout(location = 0) flat out int _4;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 _64 = vec4(0.0);
|
||||
_64.y = float(_20);
|
||||
vec4 _68 = _64;
|
||||
_68.z = float(_25);
|
||||
vec4 _52 = _68 + vec4(_30);
|
||||
vec4 _63 = vec4(0.0);
|
||||
_63.y = float(_20);
|
||||
vec4 _66 = _63;
|
||||
_66.z = float(_25);
|
||||
vec4 _52 = _66 + vec4(_30);
|
||||
vec2 _56 = _52.xy + vec2(_32);
|
||||
gl_Position = vec4(_56.x, _56.y, _52.z, _52.w);
|
||||
_4 = _33;
|
||||
|
@ -6,13 +6,13 @@ layout(binding = 1, std430) buffer SSBO1
|
||||
ivec4 outputs[];
|
||||
} _21;
|
||||
|
||||
layout(binding = 0, std430) buffer _19_27
|
||||
layout(binding = 0, std430) buffer SSBO0
|
||||
{
|
||||
ivec4 outputs[];
|
||||
ivec4 inputs[];
|
||||
} _27;
|
||||
|
||||
void main()
|
||||
{
|
||||
_21.outputs[gl_GlobalInvocationID.x] = mix(ivec4(0), ivec4(1), notEqual((_27.outputs[gl_GlobalInvocationID.x] & ivec4(3)), ivec4(uvec4(0u))));
|
||||
_21.outputs[gl_GlobalInvocationID.x] = mix(ivec4(0), ivec4(1), notEqual((_27.inputs[gl_GlobalInvocationID.x] & ivec4(3)), ivec4(uvec4(0u))));
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,5 @@ void main()
|
||||
continue;
|
||||
}
|
||||
_11.data = _180;
|
||||
_11.data = _183;
|
||||
}
|
||||
|
||||
|
@ -12,13 +12,10 @@ layout(binding = 0, std430) buffer SSBO
|
||||
Data outdata[];
|
||||
} _53;
|
||||
|
||||
Data data[2];
|
||||
Data data2[2];
|
||||
|
||||
void main()
|
||||
{
|
||||
data = Data[](Data(1.0, 2.0), Data(3.0, 4.0));
|
||||
data2 = Data[](Data(4.0, 2.0), Data(3.0, 5.0));
|
||||
Data data[2] = Data[](Data(1.0, 2.0), Data(3.0, 4.0));
|
||||
Data data2[2] = Data[](Data(4.0, 2.0), Data(3.0, 5.0));
|
||||
_53.outdata[gl_WorkGroupID.x].a = data[gl_LocalInvocationID.x].a + data2[gl_LocalInvocationID.x].a;
|
||||
_53.outdata[gl_WorkGroupID.x].b = data[gl_LocalInvocationID.x].b + data2[gl_LocalInvocationID.x].b;
|
||||
}
|
||||
|
@ -6,13 +6,13 @@ layout(binding = 0, std430) buffer SSBO0
|
||||
vec4 as[];
|
||||
} _41;
|
||||
|
||||
layout(binding = 1, std430) buffer _39_55
|
||||
layout(binding = 1, std430) buffer SSBO1
|
||||
{
|
||||
vec4 as[];
|
||||
vec4 bs[];
|
||||
} _55;
|
||||
|
||||
void main()
|
||||
{
|
||||
_41.as[gl_GlobalInvocationID.x] = ((_41.as[gl_GlobalInvocationID.x] + _55.as[gl_GlobalInvocationID.x]) + _55.as[gl_GlobalInvocationID.x]) + vec4(10.0);
|
||||
_41.as[gl_GlobalInvocationID.x] = ((_41.as[gl_GlobalInvocationID.x] + _55.bs[gl_GlobalInvocationID.x]) + _55.bs[gl_GlobalInvocationID.x]) + vec4(10.0);
|
||||
}
|
||||
|
||||
|
@ -12,21 +12,21 @@ layout(binding = 1, std430) writeonly buffer SSBO2
|
||||
vec4 out_data[];
|
||||
} _52;
|
||||
|
||||
int i;
|
||||
|
||||
void main()
|
||||
{
|
||||
i = 0;
|
||||
vec4 _56;
|
||||
_56 = _28.in_data[gl_GlobalInvocationID.x];
|
||||
vec4 _57;
|
||||
int _58;
|
||||
_58 = 0;
|
||||
_57 = _28.in_data[gl_GlobalInvocationID.x];
|
||||
vec4 _42;
|
||||
for (;;)
|
||||
{
|
||||
_42 = _28.mvp * _56;
|
||||
i++;
|
||||
if (i < 16)
|
||||
_42 = _28.mvp * _57;
|
||||
int _44 = _58 + 1;
|
||||
if (_44 < 16)
|
||||
{
|
||||
_56 = _42;
|
||||
_58 = _44;
|
||||
_57 = _42;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -21,26 +21,26 @@ void main()
|
||||
uvec2 _264 = uvec2(64u, 1u) * gl_NumWorkGroups.xy;
|
||||
uvec2 _269 = _264 - gl_GlobalInvocationID.xy;
|
||||
bvec2 _271 = equal(gl_GlobalInvocationID.xy, uvec2(0u));
|
||||
uint _475;
|
||||
uint _454;
|
||||
if (_271.x)
|
||||
{
|
||||
_475 = 0u;
|
||||
_454 = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
_475 = _269.x;
|
||||
_454 = _269.x;
|
||||
}
|
||||
uint _476;
|
||||
uint _455;
|
||||
if (_271.y)
|
||||
{
|
||||
_476 = 0u;
|
||||
_455 = 0u;
|
||||
}
|
||||
else
|
||||
{
|
||||
_476 = _269.y;
|
||||
_455 = _269.y;
|
||||
}
|
||||
uint _448 = _264.x;
|
||||
uint _280 = (gl_GlobalInvocationID.y * _448) + gl_GlobalInvocationID.x;
|
||||
uint _276 = _264.x;
|
||||
uint _280 = (gl_GlobalInvocationID.y * _276) + gl_GlobalInvocationID.x;
|
||||
vec2 _297 = vec2(gl_GlobalInvocationID.xy);
|
||||
vec2 _299 = vec2(_264);
|
||||
float _309 = sqrt(9.81000041961669921875 * length(_166.uModTime.xy * mix(_297, _297 - _299, greaterThan(_297, _299 * 0.5)))) * _166.uModTime.z;
|
||||
@ -48,8 +48,8 @@ void main()
|
||||
vec2 _387 = _316.xx;
|
||||
vec2 _392 = _316.yy;
|
||||
vec2 _395 = _392 * _137.distribution[_280].yx;
|
||||
vec2 _421 = _392 * _137.distribution[(_476 * _448) + _475].yx;
|
||||
vec2 _429 = (_137.distribution[(_476 * _448) + _475] * _387) + vec2(-_421.x, _421.y);
|
||||
vec2 _421 = _392 * _137.distribution[(_455 * _276) + _454].yx;
|
||||
vec2 _429 = (_137.distribution[(_455 * _276) + _454] * _387) + vec2(-_421.x, _421.y);
|
||||
_225.heights[_280] = packHalf2x16(((_137.distribution[_280] * _387) + vec2(-_395.x, _395.y)) + vec2(_429.x, -_429.y));
|
||||
}
|
||||
|
||||
|
@ -49,17 +49,40 @@ struct S0_1
|
||||
float b;
|
||||
};
|
||||
|
||||
struct S1_1
|
||||
{
|
||||
vec3 a;
|
||||
float b;
|
||||
};
|
||||
|
||||
struct S2_1
|
||||
{
|
||||
vec3 a[1];
|
||||
float b;
|
||||
};
|
||||
|
||||
struct S3_1
|
||||
{
|
||||
vec2 a;
|
||||
float b;
|
||||
};
|
||||
|
||||
struct S4_1
|
||||
{
|
||||
vec2 c;
|
||||
};
|
||||
|
||||
struct Content_1
|
||||
{
|
||||
S0_1 m0s[1];
|
||||
S1 m1s[1];
|
||||
S2 m2s[1];
|
||||
S1_1 m1s[1];
|
||||
S2_1 m2s[1];
|
||||
S0_1 m0;
|
||||
S1 m1;
|
||||
S2 m2;
|
||||
S3 m3;
|
||||
S1_1 m1;
|
||||
S2_1 m2;
|
||||
S3_1 m3;
|
||||
float m4;
|
||||
S4 m3s[8];
|
||||
S4_1 m3s[8];
|
||||
};
|
||||
|
||||
layout(binding = 1, std430) restrict buffer SSBO1
|
||||
|
@ -6,14 +6,19 @@ struct S0
|
||||
vec4 a;
|
||||
};
|
||||
|
||||
struct S1
|
||||
{
|
||||
vec4 a;
|
||||
};
|
||||
|
||||
layout(binding = 0, std430) buffer SSBO0
|
||||
{
|
||||
S0 s0s[];
|
||||
} _36;
|
||||
|
||||
layout(binding = 1, std430) buffer _34_55
|
||||
layout(binding = 1, std430) buffer SSBO1
|
||||
{
|
||||
S0 s0s[];
|
||||
S1 s1s[];
|
||||
} _55;
|
||||
|
||||
layout(binding = 2, std430) buffer SSBO2
|
||||
@ -23,6 +28,6 @@ layout(binding = 2, std430) buffer SSBO2
|
||||
|
||||
void main()
|
||||
{
|
||||
_66.outputs[gl_GlobalInvocationID.x] = _36.s0s[gl_GlobalInvocationID.x].a + _55.s0s[gl_GlobalInvocationID.x].a;
|
||||
_66.outputs[gl_GlobalInvocationID.x] = _36.s0s[gl_GlobalInvocationID.x].a + _55.s1s[gl_GlobalInvocationID.x].a;
|
||||
}
|
||||
|
||||
|
@ -6,13 +6,13 @@ layout(binding = 0, std430) buffer SSBO2
|
||||
uint outputs[];
|
||||
} _10;
|
||||
|
||||
layout(binding = 0, std430) buffer _8_23
|
||||
layout(binding = 0, std430) buffer SSBO
|
||||
{
|
||||
uint outputs[];
|
||||
uint inputs[];
|
||||
} _23;
|
||||
|
||||
void main()
|
||||
{
|
||||
_10.outputs[gl_GlobalInvocationID.x] = _23.outputs[gl_GlobalInvocationID.x] / 29u;
|
||||
_10.outputs[gl_GlobalInvocationID.x] = _23.inputs[gl_GlobalInvocationID.x] / 29u;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,13 @@ struct Foo
|
||||
int c;
|
||||
};
|
||||
|
||||
struct Foo_1
|
||||
{
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
};
|
||||
|
||||
layout(binding = 1, std140) buffer SSBO1
|
||||
{
|
||||
layout(offset = 4) int a;
|
||||
@ -20,7 +27,7 @@ layout(binding = 2, std430) buffer SSBO2
|
||||
{
|
||||
layout(offset = 4) int a;
|
||||
layout(offset = 8) int b;
|
||||
layout(offset = 16) Foo foo;
|
||||
layout(offset = 16) Foo_1 foo;
|
||||
layout(offset = 48) int c[8];
|
||||
} ssbo2;
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
#version 450
|
||||
#if defined(GL_AMD_gpu_shader_half_float)
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
#elif defined(GL_NV_gpu_shader5)
|
||||
#extension GL_NV_gpu_shader5 : require
|
||||
#else
|
||||
#error No extension available for FP16.
|
||||
#endif
|
||||
|
||||
layout(location = 3) in f16vec4 v4;
|
||||
|
||||
void main()
|
||||
{
|
||||
f16vec4 _505;
|
||||
f16vec4 _577 = modf(v4, _505);
|
||||
}
|
||||
|
@ -1,24 +1,5 @@
|
||||
#version 450
|
||||
|
||||
layout(binding = 0) uniform sampler1D uSampler1D;
|
||||
layout(binding = 1) uniform sampler2D uSampler2D;
|
||||
layout(binding = 2) uniform sampler2DArray uSampler2DArray;
|
||||
layout(binding = 3) uniform sampler3D uSampler3D;
|
||||
layout(binding = 4) uniform samplerCube uSamplerCube;
|
||||
layout(binding = 5) uniform samplerCubeArray uSamplerCubeArray;
|
||||
layout(binding = 6) uniform samplerBuffer uSamplerBuffer;
|
||||
layout(binding = 7) uniform sampler2DMS uSamplerMS;
|
||||
layout(binding = 8) uniform sampler2DMSArray uSamplerMSArray;
|
||||
layout(binding = 9, r32f) uniform readonly writeonly image1D uImage1D;
|
||||
layout(binding = 10, r32f) uniform readonly writeonly image2D uImage2D;
|
||||
layout(binding = 11, r32f) uniform readonly writeonly image2DArray uImage2DArray;
|
||||
layout(binding = 12, r32f) uniform readonly writeonly image3D uImage3D;
|
||||
layout(binding = 13, r32f) uniform readonly writeonly imageCube uImageCube;
|
||||
layout(binding = 14, r32f) uniform readonly writeonly imageCubeArray uImageCubeArray;
|
||||
layout(binding = 15, r32f) uniform readonly writeonly imageBuffer uImageBuffer;
|
||||
layout(binding = 16, r32f) uniform readonly writeonly image2DMS uImageMS;
|
||||
layout(binding = 17, r32f) uniform readonly writeonly image2DMSArray uImageMSArray;
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ layout(location = 0) flat in double vTmp;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec3(dvec3(uint64BitsToDouble(0x7ff0000000000000ul), uint64BitsToDouble(0xfff0000000000000ul), uint64BitsToDouble(0xfff8000000000000ul)) + dvec3(vTmp));
|
||||
FragColor = vec3(dvec3(uint64BitsToDouble(0x7ff0000000000000ul), uint64BitsToDouble(0xfff0000000000000ul), uint64BitsToDouble(0x7ff8000000000000ul)) + dvec3(vTmp));
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,8 @@ void main()
|
||||
vColor = vec4(0.0);
|
||||
for (int _96 = 0; _96 < 4; )
|
||||
{
|
||||
Light _52 = Light(UBO[_96 * 2 + 4].xyz, UBO[_96 * 2 + 4].w, UBO[_96 * 2 + 5]);
|
||||
vec3 _68 = aVertex.xyz - _52.Position;
|
||||
vColor += ((UBO[_96 * 2 + 5] * clamp(1.0 - (length(_68) / _52.Radius), 0.0, 1.0)) * dot(aNormal, normalize(_68)));
|
||||
vec3 _68 = aVertex.xyz - Light(UBO[_96 * 2 + 4].xyz, UBO[_96 * 2 + 4].w, UBO[_96 * 2 + 5]).Position;
|
||||
vColor += ((UBO[_96 * 2 + 5] * clamp(1.0 - (length(_68) / Light(UBO[_96 * 2 + 4].xyz, UBO[_96 * 2 + 4].w, UBO[_96 * 2 + 5]).Radius), 0.0, 1.0)) * dot(aNormal, normalize(_68)));
|
||||
_96++;
|
||||
continue;
|
||||
}
|
||||
|
@ -9,6 +9,6 @@ layout(location = 0) flat in vec3 vNormal;
|
||||
void main()
|
||||
{
|
||||
mat4 _19 = mat4(UBO[0], UBO[1], UBO[2], UBO[3]);
|
||||
FragColor = mat3(vec3(_19[0].x, _19[0].y, _19[0].z), vec3(_19[1].x, _19[1].y, _19[1].z), vec3(_19[2].x, _19[2].y, _19[2].z)) * vNormal;
|
||||
FragColor = mat3(_19[0].xyz, _19[1].xyz, _19[2].xyz) * vNormal;
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ layout(location = 0) out vec4 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
for (int _46 = 0; _46 < 4; )
|
||||
for (mediump int _46 = 0; _46 < 4; )
|
||||
{
|
||||
mediump int _33 = _46 + 1;
|
||||
FragColor += vec4(_17[_33]);
|
||||
|
@ -2,6 +2,8 @@
|
||||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
const float _16[4] = float[](1.0, 4.0, 3.0, 2.0);
|
||||
|
||||
struct Foo
|
||||
{
|
||||
float a;
|
||||
@ -10,14 +12,11 @@ struct Foo
|
||||
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) flat in mediump int line;
|
||||
float lut[4];
|
||||
Foo foos[2];
|
||||
|
||||
void main()
|
||||
{
|
||||
lut = float[](1.0, 4.0, 3.0, 2.0);
|
||||
foos = Foo[](Foo(10.0, 20.0), Foo(30.0, 40.0));
|
||||
FragColor = vec4(lut[line]);
|
||||
Foo foos[2] = Foo[](Foo(10.0, 20.0), Foo(30.0, 40.0));
|
||||
FragColor = vec4(_16[line]);
|
||||
FragColor += vec4(foos[line].a * foos[1 - line].a);
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ layout(location = 0) in vec4 accum;
|
||||
void main()
|
||||
{
|
||||
result = vec4(0.0);
|
||||
for (int _48 = 0; _48 < 4; )
|
||||
for (mediump int _48 = 0; _48 < 4; )
|
||||
{
|
||||
result += accum;
|
||||
_48 += int((accum.y > 10.0) ? 40u : 30u);
|
||||
|
@ -4,72 +4,64 @@ precision highp int;
|
||||
|
||||
layout(location = 0) out mediump int FragColor;
|
||||
|
||||
ivec2 _184;
|
||||
int _199;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = 16;
|
||||
for (int _168 = 0; _168 < 25; )
|
||||
mediump int _145;
|
||||
for (;;)
|
||||
{
|
||||
FragColor += 10;
|
||||
_168++;
|
||||
continue;
|
||||
}
|
||||
for (int _169 = 1; _169 < 30; )
|
||||
{
|
||||
FragColor += 11;
|
||||
_169++;
|
||||
continue;
|
||||
}
|
||||
int _170;
|
||||
_170 = 0;
|
||||
for (; _170 < 20; )
|
||||
{
|
||||
FragColor += 12;
|
||||
_170++;
|
||||
continue;
|
||||
}
|
||||
mediump int _62 = _170 + 3;
|
||||
FragColor += _62;
|
||||
bool _68 = _62 == 40;
|
||||
if (_68)
|
||||
{
|
||||
for (int _171 = 0; _171 < 40; )
|
||||
FragColor = 16;
|
||||
_145 = 0;
|
||||
for (; _145 < 25; )
|
||||
{
|
||||
FragColor += 13;
|
||||
_171++;
|
||||
FragColor += 10;
|
||||
_145++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (mediump int _146 = 1; _146 < 30; )
|
||||
{
|
||||
FragColor += 11;
|
||||
_146++;
|
||||
continue;
|
||||
}
|
||||
mediump int _147;
|
||||
_147 = 0;
|
||||
for (; _147 < 20; )
|
||||
{
|
||||
FragColor += 12;
|
||||
_147++;
|
||||
continue;
|
||||
}
|
||||
mediump int _62 = _147 + 3;
|
||||
FragColor += _62;
|
||||
}
|
||||
bool _213 = _68 ? true : false;
|
||||
if (!_213)
|
||||
{
|
||||
ivec2 _177;
|
||||
_177 = mix(ivec2(0), mix(_184, _184, bvec2(_68)), bvec2(_213));
|
||||
for (; _177.x < 10; )
|
||||
if (_62 == 40)
|
||||
{
|
||||
FragColor += _177.y;
|
||||
ivec2 _167 = _177;
|
||||
_167.x = _177.x + 4;
|
||||
_177 = _167;
|
||||
for (mediump int _151 = 0; _151 < 40; )
|
||||
{
|
||||
FragColor += 13;
|
||||
_151++;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
FragColor += _62;
|
||||
mediump ivec2 _148;
|
||||
_148 = ivec2(0);
|
||||
for (; _148.x < 10; )
|
||||
{
|
||||
FragColor += _148.y;
|
||||
mediump ivec2 _144 = _148;
|
||||
_144.x = _148.x + 4;
|
||||
_148 = _144;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
int _216 = _213 ? (_68 ? _199 : _199) : _62;
|
||||
if (!_213)
|
||||
{
|
||||
for (int _191 = _216; _191 < 40; )
|
||||
for (mediump int _150 = _62; _150 < 40; )
|
||||
{
|
||||
FragColor += _191;
|
||||
_191++;
|
||||
FragColor += _150;
|
||||
_150++;
|
||||
continue;
|
||||
}
|
||||
FragColor += _216;
|
||||
FragColor += _62;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,8 @@ layout(location = 1) flat in mediump int vB;
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(0.0);
|
||||
int _58;
|
||||
for (int _57 = 0, _60 = 0; _57 < vA; FragColor += vec4(1.0), _60 = _58, _57 += (_58 + 10))
|
||||
mediump int _58;
|
||||
for (mediump int _57 = 0, _60 = 0; _57 < vA; FragColor += vec4(1.0), _60 = _58, _57 += (_58 + 10))
|
||||
{
|
||||
if ((vA + _57) == 20)
|
||||
{
|
||||
|
@ -6,6 +6,6 @@ layout(location = 0) out highp vec3 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec3(uintBitsToFloat(0x7f800000u), uintBitsToFloat(0xff800000u), uintBitsToFloat(0xffc00000u));
|
||||
FragColor = vec3(uintBitsToFloat(0x7f800000u), uintBitsToFloat(0xff800000u), uintBitsToFloat(0x7fc00000u));
|
||||
}
|
||||
|
||||
|
@ -4,49 +4,49 @@ precision highp int;
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
vec4 _83;
|
||||
vec4 _80;
|
||||
|
||||
void main()
|
||||
{
|
||||
mediump int _18 = int(_83.x);
|
||||
highp vec4 _85;
|
||||
_85 = _83;
|
||||
highp vec4 _92;
|
||||
for (int _84 = 0; _84 < _18; _85 = _92, _84++)
|
||||
mediump int _18 = int(_80.x);
|
||||
vec4 _82;
|
||||
_82 = _80;
|
||||
vec4 _89;
|
||||
for (mediump int _81 = 0; _81 < _18; _82 = _89, _81++)
|
||||
{
|
||||
highp vec4 _86;
|
||||
vec4 _83;
|
||||
switch (_18)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
highp vec4 _76 = _85;
|
||||
_76.y = 0.0;
|
||||
_86 = _76;
|
||||
vec4 _74 = _82;
|
||||
_74.y = 0.0;
|
||||
_83 = _74;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
highp vec4 _78 = _85;
|
||||
_78.y = 1.0;
|
||||
_86 = _78;
|
||||
vec4 _76 = _82;
|
||||
_76.y = 1.0;
|
||||
_83 = _76;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
int _87;
|
||||
highp vec4 _91;
|
||||
_91 = _85;
|
||||
_87 = 0;
|
||||
mediump int _84;
|
||||
vec4 _88;
|
||||
_88 = _82;
|
||||
_84 = 0;
|
||||
mediump int _50;
|
||||
for (;;)
|
||||
{
|
||||
_50 = _87 + 1;
|
||||
if (_87 < _18)
|
||||
_50 = _84 + 1;
|
||||
if (_84 < _18)
|
||||
{
|
||||
highp vec4 _74 = _91;
|
||||
_74.y = _91.y + 0.5;
|
||||
_91 = _74;
|
||||
_87 = _50;
|
||||
vec4 _72 = _88;
|
||||
_72.y = _88.y + 0.5;
|
||||
_88 = _72;
|
||||
_84 = _50;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@ -54,15 +54,15 @@ void main()
|
||||
break;
|
||||
}
|
||||
}
|
||||
_92 = _91;
|
||||
_89 = _88;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
highp vec4 _82 = _86;
|
||||
_82.y = _86.y + 0.5;
|
||||
_92 = _82;
|
||||
vec4 _79 = _83;
|
||||
_79.y = _83.y + 0.5;
|
||||
_89 = _79;
|
||||
continue;
|
||||
}
|
||||
fragColor = _85;
|
||||
fragColor = _82;
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ precision highp int;
|
||||
|
||||
const float _16[16] = float[](1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0);
|
||||
const vec4 _60[4] = vec4[](vec4(0.0), vec4(1.0), vec4(8.0), vec4(5.0));
|
||||
const vec4 _104[4] = vec4[](vec4(20.0), vec4(30.0), vec4(50.0), vec4(60.0));
|
||||
|
||||
layout(location = 0) out float FragColor;
|
||||
layout(location = 0) flat in mediump int index;
|
||||
@ -35,8 +36,6 @@ void main()
|
||||
}
|
||||
mediump int _91 = index & 3;
|
||||
FragColor += foobar[_91].z;
|
||||
vec4 baz[4] = _60;
|
||||
baz = vec4[](vec4(20.0), vec4(30.0), vec4(50.0), vec4(60.0));
|
||||
FragColor += baz[_91].z;
|
||||
FragColor += _104[_91].z;
|
||||
}
|
||||
|
||||
|
@ -56,25 +56,25 @@ void main()
|
||||
uint _307 = uint(_302);
|
||||
uvec2 _309 = uvec2(Position);
|
||||
uvec2 _316 = (uvec2(1u) << uvec2(_307, _307 + 1u)) - uvec2(1u);
|
||||
uint _395;
|
||||
uint _382;
|
||||
if (_309.x < 32u)
|
||||
{
|
||||
_395 = _316.x;
|
||||
_382 = _316.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
_395 = 0u;
|
||||
_382 = 0u;
|
||||
}
|
||||
uint _396;
|
||||
uint _383;
|
||||
if (_309.y < 32u)
|
||||
{
|
||||
_396 = _316.y;
|
||||
_383 = _316.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
_396 = 0u;
|
||||
_383 = 0u;
|
||||
}
|
||||
vec4 _344 = vec4((_309 + uvec2(_395, _396)).xyxy & (~_316).xxyy);
|
||||
vec4 _344 = vec4((_309 + uvec2(_382, _383)).xyxy & (~_316).xxyy);
|
||||
vec2 _173 = ((_53.Patches[(gl_InstanceID + SPIRV_Cross_BaseInstance)].Position.xz * _156.InvGroundSize_PatchScale.zw) + mix(_344.xy, _344.zw, vec2(_300 - _302))) * _156.InvGroundSize_PatchScale.xy;
|
||||
mediump float _360 = textureLod(TexLOD, _173, 0.0).x * 7.96875;
|
||||
float _362 = floor(_360);
|
||||
|
@ -50,7 +50,7 @@ layout(location = 0) in vec4 Position;
|
||||
layout(location = 0) out vec3 EyeVec;
|
||||
layout(location = 1) out vec4 TexCoord;
|
||||
|
||||
uvec4 _484;
|
||||
uvec4 _474;
|
||||
|
||||
void main()
|
||||
{
|
||||
@ -60,52 +60,52 @@ void main()
|
||||
uvec4 _359 = uvec4(Position);
|
||||
uvec2 _366 = (uvec2(1u) << uvec2(_357, _357 + 1u)) - uvec2(1u);
|
||||
bool _369 = _359.x < 32u;
|
||||
uint _482;
|
||||
uint _465;
|
||||
if (_369)
|
||||
{
|
||||
_482 = _366.x;
|
||||
_465 = _366.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
_482 = 0u;
|
||||
_465 = 0u;
|
||||
}
|
||||
uvec4 _445 = _484;
|
||||
_445.x = _482;
|
||||
uvec4 _443 = _474;
|
||||
_443.x = _465;
|
||||
bool _379 = _359.y < 32u;
|
||||
uint _485;
|
||||
uint _468;
|
||||
if (_379)
|
||||
{
|
||||
_485 = _366.x;
|
||||
_468 = _366.x;
|
||||
}
|
||||
else
|
||||
{
|
||||
_485 = 0u;
|
||||
_468 = 0u;
|
||||
}
|
||||
uvec4 _451 = _445;
|
||||
_451.y = _485;
|
||||
uint _487;
|
||||
uvec4 _447 = _443;
|
||||
_447.y = _468;
|
||||
uint _470;
|
||||
if (_369)
|
||||
{
|
||||
_487 = _366.y;
|
||||
_470 = _366.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
_487 = 0u;
|
||||
_470 = 0u;
|
||||
}
|
||||
uvec4 _457 = _451;
|
||||
_457.z = _487;
|
||||
uint _489;
|
||||
uvec4 _451 = _447;
|
||||
_451.z = _470;
|
||||
uint _472;
|
||||
if (_379)
|
||||
{
|
||||
_489 = _366.y;
|
||||
_472 = _366.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
_489 = 0u;
|
||||
_472 = 0u;
|
||||
}
|
||||
uvec4 _463 = _457;
|
||||
_463.w = _489;
|
||||
vec4 _415 = vec4((_359.xyxy + _463) & (~_366).xxyy);
|
||||
uvec4 _455 = _451;
|
||||
_455.w = _472;
|
||||
vec4 _415 = vec4((_359.xyxy + _455) & (~_366).xxyy);
|
||||
vec2 _197 = ((_53.Patches[(gl_InstanceID + SPIRV_Cross_BaseInstance)].Position.xz * _180.InvOceanSize_PatchScale.zw) + mix(_415.xy, _415.zw, vec2(_350 - _352))) * _180.InvOceanSize_PatchScale.xy;
|
||||
vec2 _204 = _197 * _180.NormalTexCoordScale.zw;
|
||||
mediump float _431 = textureLod(TexLOD, _197, 0.0).x * 7.96875;
|
||||
|
@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = float3(asfloat(0x7f800000u), asfloat(0xff800000u), asfloat(0xffc00000u));
|
||||
FragColor = float3(asfloat(0x7f800000u), asfloat(0xff800000u), asfloat(0x7fc00000u));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
|
@ -11,7 +11,7 @@ struct main0_out
|
||||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = float3(as_type<float>(0x7f800000u), as_type<float>(0xff800000u), as_type<float>(0xffc00000u));
|
||||
out.FragColor = float3(as_type<float>(0x7f800000u), as_type<float>(0xff800000u), as_type<float>(0x7fc00000u));
|
||||
return out;
|
||||
}
|
||||
|
||||
|
159
reference/shaders/desktop-only/frag/fp16.invalid.desktop.frag
Normal file
159
reference/shaders/desktop-only/frag/fp16.invalid.desktop.frag
Normal file
@ -0,0 +1,159 @@
|
||||
#version 450
|
||||
#if defined(GL_AMD_gpu_shader_half_float)
|
||||
#extension GL_AMD_gpu_shader_half_float : require
|
||||
#elif defined(GL_NV_gpu_shader5)
|
||||
#extension GL_NV_gpu_shader5 : require
|
||||
#else
|
||||
#error No extension available for FP16.
|
||||
#endif
|
||||
|
||||
struct ResType
|
||||
{
|
||||
f16vec4 _m0;
|
||||
ivec4 _m1;
|
||||
};
|
||||
|
||||
layout(location = 3) in f16vec4 v4;
|
||||
layout(location = 2) in f16vec3 v3;
|
||||
layout(location = 0) in float16_t v1;
|
||||
layout(location = 1) in f16vec2 v2;
|
||||
|
||||
f16mat2 test_mat2(f16vec2 a, f16vec2 b, f16vec2 c, f16vec2 d)
|
||||
{
|
||||
return f16mat2(f16vec2(a), f16vec2(b)) * f16mat2(f16vec2(c), f16vec2(d));
|
||||
}
|
||||
|
||||
f16mat3 test_mat3(f16vec3 a, f16vec3 b, f16vec3 c, f16vec3 d, f16vec3 e, f16vec3 f)
|
||||
{
|
||||
return f16mat3(f16vec3(a), f16vec3(b), f16vec3(c)) * f16mat3(f16vec3(d), f16vec3(e), f16vec3(f));
|
||||
}
|
||||
|
||||
void test_constants()
|
||||
{
|
||||
float16_t a = 1.0hf;
|
||||
float16_t b = 1.5hf;
|
||||
float16_t c = -1.5hf;
|
||||
float16_t d = (0.0hf / 0.0hf);
|
||||
float16_t e = (1.0hf / 0.0hf);
|
||||
float16_t f = (-1.0hf / 0.0hf);
|
||||
float16_t g = 1014.0hf;
|
||||
float16_t h = 9.5367431640625e-07hf;
|
||||
}
|
||||
|
||||
float16_t test_result()
|
||||
{
|
||||
return 1.0hf;
|
||||
}
|
||||
|
||||
void test_conversions()
|
||||
{
|
||||
float16_t one = test_result();
|
||||
int a = int(one);
|
||||
uint b = uint(one);
|
||||
bool c = one != 0.0hf;
|
||||
float d = float(one);
|
||||
double e = double(one);
|
||||
float16_t a2 = float16_t(a);
|
||||
float16_t b2 = float16_t(b);
|
||||
float16_t c2 = float16_t(c);
|
||||
float16_t d2 = float16_t(d);
|
||||
float16_t e2 = float16_t(e);
|
||||
}
|
||||
|
||||
void test_builtins()
|
||||
{
|
||||
f16vec4 res = radians(v4);
|
||||
res = degrees(v4);
|
||||
res = sin(v4);
|
||||
res = cos(v4);
|
||||
res = tan(v4);
|
||||
res = asin(v4);
|
||||
res = atan(v4, v3.xyzz);
|
||||
res = atan(v4);
|
||||
res = sinh(v4);
|
||||
res = cosh(v4);
|
||||
res = tanh(v4);
|
||||
res = asinh(v4);
|
||||
res = acosh(v4);
|
||||
res = atanh(v4);
|
||||
res = pow(v4, v4);
|
||||
res = exp(v4);
|
||||
res = log(v4);
|
||||
res = exp2(v4);
|
||||
res = log2(v4);
|
||||
res = sqrt(v4);
|
||||
res = inversesqrt(v4);
|
||||
res = abs(v4);
|
||||
res = sign(v4);
|
||||
res = floor(v4);
|
||||
res = trunc(v4);
|
||||
res = round(v4);
|
||||
res = roundEven(v4);
|
||||
res = ceil(v4);
|
||||
res = fract(v4);
|
||||
res = mod(v4, v4);
|
||||
f16vec4 tmp;
|
||||
f16vec4 _231 = modf(v4, tmp);
|
||||
res = _231;
|
||||
res = min(v4, v4);
|
||||
res = max(v4, v4);
|
||||
res = clamp(v4, v4, v4);
|
||||
res = mix(v4, v4, v4);
|
||||
res = mix(v4, v4, lessThan(v4, v4));
|
||||
res = step(v4, v4);
|
||||
res = smoothstep(v4, v4, v4);
|
||||
bvec4 btmp = isnan(v4);
|
||||
btmp = isinf(v4);
|
||||
res = fma(v4, v4, v4);
|
||||
ResType _275;
|
||||
_275._m0 = frexp(v4, _275._m1);
|
||||
ivec4 itmp = _275._m1;
|
||||
res = _275._m0;
|
||||
res = ldexp(res, itmp);
|
||||
uint pack0 = packFloat2x16(v4.xy);
|
||||
uint pack1 = packFloat2x16(v4.zw);
|
||||
res = f16vec4(unpackFloat2x16(pack0), unpackFloat2x16(pack1));
|
||||
float16_t t0 = length(v4);
|
||||
t0 = distance(v4, v4);
|
||||
t0 = dot(v4, v4);
|
||||
f16vec3 res3 = cross(v3, v3);
|
||||
res = normalize(v4);
|
||||
res = faceforward(v4, v4, v4);
|
||||
res = reflect(v4, v4);
|
||||
res = refract(v4, v4, v1);
|
||||
btmp = lessThan(v4, v4);
|
||||
btmp = lessThanEqual(v4, v4);
|
||||
btmp = greaterThan(v4, v4);
|
||||
btmp = greaterThanEqual(v4, v4);
|
||||
btmp = equal(v4, v4);
|
||||
btmp = notEqual(v4, v4);
|
||||
res = dFdx(v4);
|
||||
res = dFdy(v4);
|
||||
res = dFdxFine(v4);
|
||||
res = dFdyFine(v4);
|
||||
res = dFdxCoarse(v4);
|
||||
res = dFdyCoarse(v4);
|
||||
res = fwidth(v4);
|
||||
res = fwidthFine(v4);
|
||||
res = fwidthCoarse(v4);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
f16vec2 param = v2;
|
||||
f16vec2 param_1 = v2;
|
||||
f16vec2 param_2 = v3.xy;
|
||||
f16vec2 param_3 = v3.xy;
|
||||
f16mat2 m0 = test_mat2(param, param_1, param_2, param_3);
|
||||
f16vec3 param_4 = v3;
|
||||
f16vec3 param_5 = v3;
|
||||
f16vec3 param_6 = v3;
|
||||
f16vec3 param_7 = v4.xyz;
|
||||
f16vec3 param_8 = v4.xyz;
|
||||
f16vec3 param_9 = v4.yzw;
|
||||
f16mat3 m1 = test_mat3(param_4, param_5, param_6, param_7, param_8, param_9);
|
||||
test_constants();
|
||||
test_conversions();
|
||||
test_builtins();
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ layout(location = 0) flat in double vTmp;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec3(dvec3(uint64BitsToDouble(0x7ff0000000000000ul), uint64BitsToDouble(0xfff0000000000000ul), uint64BitsToDouble(0xfff8000000000000ul)) + dvec3(vTmp));
|
||||
FragColor = vec3(dvec3(uint64BitsToDouble(0x7ff0000000000000ul), uint64BitsToDouble(0xfff0000000000000ul), uint64BitsToDouble(0x7ff8000000000000ul)) + dvec3(vTmp));
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,6 @@ layout(location = 0) flat in vec3 vNormal;
|
||||
void main()
|
||||
{
|
||||
mat4 _19 = mat4(UBO[0], UBO[1], UBO[2], UBO[3]);
|
||||
FragColor = mat3(vec3(_19[0].x, _19[0].y, _19[0].z), vec3(_19[1].x, _19[1].y, _19[1].z), vec3(_19[2].x, _19[2].y, _19[2].z)) * vNormal;
|
||||
FragColor = mat3(_19[0].xyz, _19[1].xyz, _19[2].xyz) * vNormal;
|
||||
}
|
||||
|
||||
|
@ -8,20 +8,14 @@ layout(location = 0) flat in int vIndex;
|
||||
|
||||
void main()
|
||||
{
|
||||
int _92;
|
||||
_92 = 0;
|
||||
vec4 values3[2 * 3 * 1];
|
||||
for (; _92 < 2; _92++)
|
||||
for (int z = 0; z < 2; z++)
|
||||
{
|
||||
int _93;
|
||||
_93 = 0;
|
||||
for (; _93 < 3; _93++)
|
||||
for (int y = 0; y < 3; y++)
|
||||
{
|
||||
for (int _95 = 0; _95 < 1; )
|
||||
for (int x = 0; x < 1; x++)
|
||||
{
|
||||
values3[_92 * 3 * 1 + _93 * 1 + _95] = texture(uTextures[_92 * 3 * 1 + _93 * 1 + _95], vUV);
|
||||
_95++;
|
||||
continue;
|
||||
values3[z * 3 * 1 + y * 1 + x] = texture(uTextures[z * 3 * 1 + y * 1 + x], vUV);
|
||||
}
|
||||
}
|
||||
}
|
@ -6,6 +6,6 @@ layout(location = 0) out highp vec3 FragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec3(uintBitsToFloat(0x7f800000u), uintBitsToFloat(0xff800000u), uintBitsToFloat(0xffc00000u));
|
||||
FragColor = vec3(uintBitsToFloat(0x7f800000u), uintBitsToFloat(0xff800000u), uintBitsToFloat(0x7fc00000u));
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
; Generator: Khronos; 0
|
||||
; Bound: 43
|
||||
; Schema: 0
|
||||
OpCapability Linkage
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %EntryPoint_Main "main"
|
||||
|
@ -3,7 +3,6 @@
|
||||
; Generator: Khronos; 0
|
||||
; Bound: 43
|
||||
; Schema: 0
|
||||
OpCapability Linkage
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %EntryPoint_Main "main"
|
||||
|
@ -3,7 +3,6 @@
|
||||
; Generator: Khronos; 0
|
||||
; Bound: 43
|
||||
; Schema: 0
|
||||
OpCapability Linkage
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %EntryPoint_Main "main"
|
||||
|
@ -3,7 +3,6 @@
|
||||
; Generator: Khronos; 0
|
||||
; Bound: 51
|
||||
; Schema: 0
|
||||
OpCapability Linkage
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %EntryPoint_Main "main"
|
||||
|
@ -6,7 +6,7 @@
|
||||
OpCapability Geometry
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Geometry %main "main" %gl_in
|
||||
OpEntryPoint Geometry %main "main" %gl_in %position
|
||||
OpExecutionMode %main Triangles
|
||||
OpExecutionMode %main Invocations 1
|
||||
OpExecutionMode %main OutputTriangleStrip
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user