Merge pull request #502 from KhronosGroup/update-glslang-spirv-tools
Update glslang and SPIRV-Tools and maintenance fixes
This commit is contained in:
Коммит
fbfe13657a
21
.travis.yml
21
.travis.yml
|
@ -8,26 +8,11 @@ osx_image: xcode8.3
|
|||
sudo: required
|
||||
dist: trusty
|
||||
|
||||
# We check out glslang and SPIRV-Tools at specific revisions to avoid test output mismatches
|
||||
env:
|
||||
- GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92 SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
|
||||
before_script:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade python3; fi
|
||||
- git clone https://github.com/KhronosGroup/glslang.git glslang
|
||||
- git clone https://github.com/KhronosGroup/SPIRV-Tools SPIRV-Tools
|
||||
- git clone https://github.com/KhronosGroup/SPIRV-Headers.git SPIRV-Tools/external/spirv-headers
|
||||
- ./checkout_glslang_spirv_tools.sh
|
||||
|
||||
script:
|
||||
- git -C glslang checkout $GLSLANG_REV
|
||||
- git -C SPIRV-Tools checkout $SPIRV_TOOLS_REV
|
||||
- cd glslang && cmake . && make -j2 && cd ..
|
||||
- cd SPIRV-Tools && cmake . && make -j2 && cd ..
|
||||
- ./build_glslang_spirv_tools.sh Debug 2
|
||||
- make -j2
|
||||
- PATH=./glslang/StandAlone:./SPIRV-Tools/tools:$PATH
|
||||
- ./test_shaders.py shaders
|
||||
- ./test_shaders.py --msl shaders-msl
|
||||
- ./test_shaders.py --hlsl shaders-hlsl
|
||||
- ./test_shaders.py shaders --opt
|
||||
- ./test_shaders.py --msl shaders-msl --opt
|
||||
- ./test_shaders.py --hlsl shaders-hlsl --opt
|
||||
- ./test_shaders.sh
|
||||
|
|
|
@ -279,6 +279,7 @@ although there are a couple of convenience script for doing this:
|
|||
|
||||
```
|
||||
./checkout_glslang_spirv_tools.sh # Checks out glslang and SPIRV-Tools at a fixed revision which matches the reference output.
|
||||
./build_glslang_spirv_tools.sh # Builds glslang and SPIRV-Tools.
|
||||
./test_shaders.sh # Runs over all changes and makes sure that there are no deltas compared to reference files.
|
||||
```
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
PROFILE=Release
|
||||
if [ ! -z $1 ]; then
|
||||
PROFILE=$1
|
||||
fi
|
||||
|
||||
NPROC=$(nproc)
|
||||
if [ ! -z $2 ]; then
|
||||
NPROC=$2
|
||||
fi
|
||||
|
||||
echo "Building glslang."
|
||||
mkdir -p external/glslang-build
|
||||
cd external/glslang-build
|
||||
cmake ../glslang -DCMAKE_BUILD_TYPE=$PROFILE -G"Unix Makefiles"
|
||||
make -j$NPROC
|
||||
cd ../..
|
||||
|
||||
echo "Building SPIRV-Tools."
|
||||
mkdir -p external/spirv-tools-build
|
||||
cd external/spirv-tools-build
|
||||
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=$PROFILE -G"Unix Makefiles"
|
||||
make -j$NPROC
|
||||
cd ../..
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
GLSLANG_REV=9c6f8cc29ba303b43ccf36deea6bb38a304f9b92
|
||||
SPIRV_TOOLS_REV=e28edd458b729da7bbfd51e375feb33103709e6f
|
||||
GLSLANG_REV=845860d56513d95e15fe4820df7272f9687d076e
|
||||
SPIRV_TOOLS_REV=340370eddbb9f0e7d26b6a4f7e22c1b98150e5e1
|
||||
|
||||
if [ -d external/glslang ]; then
|
||||
echo "Updating glslang to revision $GLSLANG_REV."
|
||||
|
@ -18,13 +18,6 @@ else
|
|||
fi
|
||||
cd ../..
|
||||
|
||||
echo "Building glslang."
|
||||
mkdir -p external/glslang-build
|
||||
cd external/glslang-build
|
||||
cmake ../glslang -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"
|
||||
make -j$(nproc)
|
||||
cd ../..
|
||||
|
||||
if [ -d external/spirv-tools ]; then
|
||||
echo "Updating SPIRV-Tools to revision $SPIRV_TOOLS_REV."
|
||||
cd external/spirv-tools
|
||||
|
@ -37,21 +30,15 @@ else
|
|||
git clone git://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
|
||||
cd spirv-tools
|
||||
git checkout $SPIRV_TOOLS_REV
|
||||
|
||||
if [ -d external/spirv-headers ]; then
|
||||
cd external/spirv-headers
|
||||
git pull origin master
|
||||
cd ../..
|
||||
else
|
||||
git clone git://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
|
||||
fi
|
||||
fi
|
||||
cd ../..
|
||||
|
||||
echo "Building SPIRV-Tools."
|
||||
mkdir -p external/spirv-tools-build
|
||||
cd external/spirv-tools-build
|
||||
cmake ../spirv-tools -DCMAKE_BUILD_TYPE=Release -G"Unix Makefiles"
|
||||
make -j$(nproc)
|
||||
|
||||
if [ -d external/spirv-headers ]; then
|
||||
cd external/spirv-headers
|
||||
git pull origin master
|
||||
cd ../..
|
||||
else
|
||||
git clone git://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
|
||||
fi
|
||||
|
||||
cd ../..
|
||||
|
||||
|
|
38
main.cpp
38
main.cpp
|
@ -212,7 +212,7 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
|||
for (auto &res : resources)
|
||||
{
|
||||
auto &type = compiler.get_type(res.type_id);
|
||||
auto mask = compiler.get_decoration_mask(res.id);
|
||||
auto &mask = compiler.get_decoration_bitset(res.id);
|
||||
|
||||
if (print_ssbo && compiler.buffer_is_hlsl_counter_buffer(res.id))
|
||||
continue;
|
||||
|
@ -221,8 +221,8 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
|||
// for SSBOs and UBOs since those are the only meaningful names to use externally.
|
||||
// Push constant blocks are still accessed by name and not block name, even though they are technically Blocks.
|
||||
bool is_push_constant = compiler.get_storage_class(res.id) == StorageClassPushConstant;
|
||||
bool is_block = (compiler.get_decoration_mask(type.self) &
|
||||
((1ull << DecorationBlock) | (1ull << DecorationBufferBlock))) != 0;
|
||||
bool is_block = compiler.get_decoration_bitset(type.self).get(DecorationBlock) ||
|
||||
compiler.get_decoration_bitset(type.self).get(DecorationBufferBlock);
|
||||
bool is_sized_block = is_block && (compiler.get_storage_class(res.id) == StorageClassUniform ||
|
||||
compiler.get_storage_class(res.id) == StorageClassUniformConstant);
|
||||
uint32_t fallback_id = !is_push_constant && is_block ? res.base_type_id : res.id;
|
||||
|
@ -238,17 +238,17 @@ static void print_resources(const Compiler &compiler, const char *tag, const vec
|
|||
fprintf(stderr, " ID %03u : %s%s", res.id,
|
||||
!res.name.empty() ? res.name.c_str() : compiler.get_fallback_name(fallback_id).c_str(), array.c_str());
|
||||
|
||||
if (mask & (1ull << DecorationLocation))
|
||||
if (mask.get(DecorationLocation))
|
||||
fprintf(stderr, " (Location : %u)", compiler.get_decoration(res.id, DecorationLocation));
|
||||
if (mask & (1ull << DecorationDescriptorSet))
|
||||
if (mask.get(DecorationDescriptorSet))
|
||||
fprintf(stderr, " (Set : %u)", compiler.get_decoration(res.id, DecorationDescriptorSet));
|
||||
if (mask & (1ull << DecorationBinding))
|
||||
if (mask.get(DecorationBinding))
|
||||
fprintf(stderr, " (Binding : %u)", compiler.get_decoration(res.id, DecorationBinding));
|
||||
if (mask & (1ull << DecorationInputAttachmentIndex))
|
||||
if (mask.get(DecorationInputAttachmentIndex))
|
||||
fprintf(stderr, " (Attachment : %u)", compiler.get_decoration(res.id, DecorationInputAttachmentIndex));
|
||||
if (mask & (1ull << DecorationNonReadable))
|
||||
if (mask.get(DecorationNonReadable))
|
||||
fprintf(stderr, " writeonly");
|
||||
if (mask & (1ull << DecorationNonWritable))
|
||||
if (mask.get(DecorationNonWritable))
|
||||
fprintf(stderr, " readonly");
|
||||
if (is_sized_block)
|
||||
fprintf(stderr, " (BlockSize : %u bytes)", block_size);
|
||||
|
@ -284,7 +284,7 @@ static const char *execution_model_to_str(spv::ExecutionModel model)
|
|||
|
||||
static void print_resources(const Compiler &compiler, const ShaderResources &res)
|
||||
{
|
||||
uint64_t modes = compiler.get_execution_mode_mask();
|
||||
auto &modes = compiler.get_execution_mode_bitset();
|
||||
|
||||
fprintf(stderr, "Entry points:\n");
|
||||
auto entry_points = compiler.get_entry_points_and_stages();
|
||||
|
@ -293,11 +293,7 @@ static void print_resources(const Compiler &compiler, const ShaderResources &res
|
|||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Execution modes:\n");
|
||||
for (unsigned i = 0; i < 64; i++)
|
||||
{
|
||||
if (!(modes & (1ull << i)))
|
||||
continue;
|
||||
|
||||
modes.for_each_bit([&](uint32_t i) {
|
||||
auto mode = static_cast<ExecutionMode>(i);
|
||||
uint32_t arg0 = compiler.get_execution_mode_argument(mode, 0);
|
||||
uint32_t arg1 = compiler.get_execution_mode_argument(mode, 1);
|
||||
|
@ -353,7 +349,7 @@ static void print_resources(const Compiler &compiler, const ShaderResources &res
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
print_resources(compiler, "subpass inputs", res.subpass_inputs);
|
||||
|
@ -898,7 +894,15 @@ static int main_inner(int argc, char *argv[])
|
|||
}
|
||||
|
||||
if (build_dummy_sampler)
|
||||
compiler->build_dummy_sampler_for_combined_images();
|
||||
{
|
||||
uint32_t sampler = compiler->build_dummy_sampler_for_combined_images();
|
||||
if (sampler != 0)
|
||||
{
|
||||
// Set some defaults to make validation happy.
|
||||
compiler->set_decoration(sampler, DecorationDescriptorSet, 0);
|
||||
compiler->set_decoration(sampler, DecorationBinding, 0);
|
||||
}
|
||||
}
|
||||
|
||||
ShaderResources res;
|
||||
if (args.remove_unused)
|
||||
|
|
|
@ -11,6 +11,8 @@ struct SPIRV_Cross_Input
|
|||
uint3 gl_WorkGroupID : SV_GroupID;
|
||||
};
|
||||
|
||||
static uint3 _22 = gl_WorkGroupSize;
|
||||
|
||||
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))));
|
||||
|
|
|
@ -7,7 +7,7 @@ struct SPIRV_Cross_Output
|
|||
|
||||
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()
|
||||
|
|
|
@ -11,25 +11,23 @@ struct SPIRV_Cross_Output
|
|||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
float4 _21;
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float4 _33;
|
||||
do
|
||||
bool _29;
|
||||
for (;;)
|
||||
{
|
||||
if (counter == 10)
|
||||
_29 = counter == 10;
|
||||
if (_29)
|
||||
{
|
||||
_33 = 10.0f.xxxx;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_33 = 30.0f.xxxx;
|
||||
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)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
void comp_main()
|
||||
{
|
||||
GroupMemoryBarrier();
|
||||
|
|
|
@ -34,24 +34,26 @@ struct SPIRV_Cross_Input
|
|||
|
||||
void comp_main()
|
||||
{
|
||||
uImageOutF[int2(gl_GlobalInvocationID.xy)] = uImageInF[int2(gl_GlobalInvocationID.xy)].x;
|
||||
uImageOutI[int2(gl_GlobalInvocationID.xy)] = uImageInI[int2(gl_GlobalInvocationID.xy)].x;
|
||||
uImageOutU[int2(gl_GlobalInvocationID.xy)] = uImageInU[int2(gl_GlobalInvocationID.xy)].x;
|
||||
uImageOutBuffer[int(gl_GlobalInvocationID.x)] = uImageInBuffer[int(gl_GlobalInvocationID.x)].x;
|
||||
uImageOutF2[int2(gl_GlobalInvocationID.xy)] = uImageInF2[int2(gl_GlobalInvocationID.xy)].xy;
|
||||
uImageOutI2[int2(gl_GlobalInvocationID.xy)] = uImageInI2[int2(gl_GlobalInvocationID.xy)].xy;
|
||||
uImageOutU2[int2(gl_GlobalInvocationID.xy)] = uImageInU2[int2(gl_GlobalInvocationID.xy)].xy;
|
||||
float4 _135 = uImageInBuffer2[int(gl_GlobalInvocationID.x)].xyyy;
|
||||
uImageOutBuffer2[int(gl_GlobalInvocationID.x)] = _135.xy;
|
||||
uImageOutF4[int2(gl_GlobalInvocationID.xy)] = uImageInF4[int2(gl_GlobalInvocationID.xy)];
|
||||
int4 _165 = uImageInI4[int2(gl_GlobalInvocationID.xy)];
|
||||
uImageOutI4[int2(gl_GlobalInvocationID.xy)] = _165;
|
||||
uint4 _180 = uImageInU4[int2(gl_GlobalInvocationID.xy)];
|
||||
uImageOutU4[int2(gl_GlobalInvocationID.xy)] = _180;
|
||||
uImageOutBuffer4[int(gl_GlobalInvocationID.x)] = uImageInBuffer4[int(gl_GlobalInvocationID.x)];
|
||||
uImageNoFmtF[int2(gl_GlobalInvocationID.xy)] = _135;
|
||||
uImageNoFmtU[int2(gl_GlobalInvocationID.xy)] = _180;
|
||||
uImageNoFmtI[int2(gl_GlobalInvocationID.xy)] = _165;
|
||||
int2 _23 = int2(gl_GlobalInvocationID.xy);
|
||||
uImageOutF[_23] = uImageInF[_23].x;
|
||||
uImageOutI[_23] = uImageInI[_23].x;
|
||||
uImageOutU[_23] = uImageInU[_23].x;
|
||||
int _74 = int(gl_GlobalInvocationID.x);
|
||||
uImageOutBuffer[_74] = uImageInBuffer[_74].x;
|
||||
uImageOutF2[_23] = uImageInF2[_23].xy;
|
||||
uImageOutI2[_23] = uImageInI2[_23].xy;
|
||||
uImageOutU2[_23] = uImageInU2[_23].xy;
|
||||
float4 _135 = uImageInBuffer2[_74].xyyy;
|
||||
uImageOutBuffer2[_74] = _135.xy;
|
||||
uImageOutF4[_23] = uImageInF4[_23];
|
||||
int4 _165 = uImageInI4[_23];
|
||||
uImageOutI4[_23] = _165;
|
||||
uint4 _180 = uImageInU4[_23];
|
||||
uImageOutU4[_23] = _180;
|
||||
uImageOutBuffer4[_74] = uImageInBuffer4[_74];
|
||||
uImageNoFmtF[_23] = _135;
|
||||
uImageNoFmtU[_23] = _180;
|
||||
uImageNoFmtI[_23] = _165;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
static const uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
ByteAddressBuffer _22 : register(t0);
|
||||
RWByteAddressBuffer _44 : register(u1);
|
||||
|
||||
|
@ -17,7 +15,7 @@ void comp_main()
|
|||
{
|
||||
sShared[gl_LocalInvocationIndex] = asfloat(_22.Load(gl_GlobalInvocationID.x * 4 + 0));
|
||||
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)]
|
||||
|
|
|
@ -16,9 +16,12 @@ struct SPIRV_Cross_Output
|
|||
void frag_main()
|
||||
{
|
||||
float lut[5] = _17;
|
||||
int _33;
|
||||
for (int _46 = 0; _46 < 4; _33 = _46 + 1, FragColor += lut[_33].xxxx, _46 = _33)
|
||||
for (int _46 = 0; _46 < 4; )
|
||||
{
|
||||
int _33 = _46 + 1;
|
||||
FragColor += lut[_33].xxxx;
|
||||
_46 = _33;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
Texture2D<float4> uSampler : register(t0);
|
||||
SamplerState _uSampler_sampler : register(s0);
|
||||
|
||||
static float4 FragColor;
|
||||
static float4 vInput;
|
||||
|
||||
struct SPIRV_Cross_Input
|
||||
{
|
||||
float4 vInput : TEXCOORD0;
|
||||
};
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = vInput;
|
||||
float4 _23 = uSampler.Sample(_uSampler_sampler, vInput.xy);
|
||||
float4 _26 = ddx(vInput);
|
||||
float4 _29 = ddy(vInput);
|
||||
float4 _32 = fwidth(vInput);
|
||||
float4 _35 = ddx_coarse(vInput);
|
||||
float4 _38 = ddy_coarse(vInput);
|
||||
float4 _41 = fwidth(vInput);
|
||||
float4 _44 = ddx_fine(vInput);
|
||||
float4 _47 = ddy_fine(vInput);
|
||||
float4 _50 = fwidth(vInput);
|
||||
float _56_tmp = uSampler.CalculateLevelOfDetail(_uSampler_sampler, vInput.zw);
|
||||
if (vInput.y > 10.0f)
|
||||
{
|
||||
FragColor += _23;
|
||||
FragColor += _26;
|
||||
FragColor += _29;
|
||||
FragColor += _32;
|
||||
FragColor += _35;
|
||||
FragColor += _38;
|
||||
FragColor += _41;
|
||||
FragColor += _44;
|
||||
FragColor += _47;
|
||||
FragColor += _50;
|
||||
FragColor += float2(_56_tmp, _56_tmp).xyxy;
|
||||
}
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
{
|
||||
vInput = stage_input.vInput;
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
|
@ -2,6 +2,30 @@ 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)
|
||||
{
|
||||
|
@ -17,10 +41,87 @@ uint SPIRV_Cross_textureSize(Texture1D<uint4> Tex, uint Level, out uint 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,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()
|
||||
{
|
||||
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()
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
struct B
|
||||
{
|
||||
float a;
|
||||
float b;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ cbuffer cbuf : register(b3)
|
|||
};
|
||||
cbuffer registers
|
||||
{
|
||||
float4 registers_d : packoffset(c0);
|
||||
float4 registers_a : 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_d);
|
||||
FragColor = (uSampledImage.Sample(_uSampledImage_sampler, vTex) + uTexture.Sample(uSampler, vTex)) + (cbuf_a + registers_a);
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
|
|
@ -41,9 +41,7 @@ void frag_main()
|
|||
{
|
||||
float4 _80 = vDirRef;
|
||||
_80.z = vDirRef.w;
|
||||
float4 _87 = vDirRef;
|
||||
_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));
|
||||
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));
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
|
|
@ -17,7 +17,8 @@ struct SPIRV_Cross_Input
|
|||
|
||||
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)
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
static const float a = 1.0f;
|
||||
static const float b = 2.0f;
|
||||
static const int c = 3;
|
||||
static const int d = 4;
|
||||
|
||||
struct Foo
|
||||
{
|
||||
float elems[(d + 2)];
|
||||
};
|
||||
|
||||
static float4 FragColor;
|
||||
|
||||
struct SPIRV_Cross_Output
|
||||
{
|
||||
float4 FragColor : SV_Target0;
|
||||
};
|
||||
|
||||
void frag_main()
|
||||
{
|
||||
float vec0[(c + 3)][8];
|
||||
vec0[0][0] = 10.0f;
|
||||
Foo foo;
|
||||
foo.elems[c] = 10.0f;
|
||||
FragColor = (((a + b).xxxx + vec0[0][0].xxxx) + 20.0f.xxxx) + foo.elems[c].xxxx;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main()
|
||||
{
|
||||
frag_main();
|
||||
SPIRV_Cross_Output stage_output;
|
||||
stage_output.FragColor = FragColor;
|
||||
return stage_output;
|
||||
}
|
|
@ -1,27 +1,27 @@
|
|||
Texture1D<float4> tex1d;
|
||||
SamplerState _tex1d_sampler;
|
||||
Texture2D<float4> tex2d;
|
||||
SamplerState _tex2d_sampler;
|
||||
Texture3D<float4> tex3d;
|
||||
SamplerState _tex3d_sampler;
|
||||
TextureCube<float4> texCube;
|
||||
SamplerState _texCube_sampler;
|
||||
Texture1D<float4> tex1dShadow;
|
||||
SamplerComparisonState _tex1dShadow_sampler;
|
||||
Texture2D<float4> tex2dShadow;
|
||||
SamplerComparisonState _tex2dShadow_sampler;
|
||||
TextureCube<float4> texCubeShadow;
|
||||
SamplerComparisonState _texCubeShadow_sampler;
|
||||
Texture1DArray<float4> tex1dArray;
|
||||
SamplerState _tex1dArray_sampler;
|
||||
Texture2DArray<float4> tex2dArray;
|
||||
SamplerState _tex2dArray_sampler;
|
||||
TextureCubeArray<float4> texCubeArray;
|
||||
SamplerState _texCubeArray_sampler;
|
||||
Texture2D<float4> separateTex2d;
|
||||
SamplerState samplerNonDepth;
|
||||
Texture2D<float4> separateTex2dDepth;
|
||||
SamplerComparisonState samplerDepth;
|
||||
Texture1D<float4> tex1d : register(t0);
|
||||
SamplerState _tex1d_sampler : register(s0);
|
||||
Texture2D<float4> tex2d : register(t1);
|
||||
SamplerState _tex2d_sampler : register(s1);
|
||||
Texture3D<float4> tex3d : register(t2);
|
||||
SamplerState _tex3d_sampler : register(s2);
|
||||
TextureCube<float4> texCube : register(t3);
|
||||
SamplerState _texCube_sampler : register(s3);
|
||||
Texture1D<float4> tex1dShadow : register(t4);
|
||||
SamplerComparisonState _tex1dShadow_sampler : register(s4);
|
||||
Texture2D<float4> tex2dShadow : register(t5);
|
||||
SamplerComparisonState _tex2dShadow_sampler : register(s5);
|
||||
TextureCube<float4> texCubeShadow : register(t6);
|
||||
SamplerComparisonState _texCubeShadow_sampler : register(s6);
|
||||
Texture1DArray<float4> tex1dArray : register(t7);
|
||||
SamplerState _tex1dArray_sampler : register(s7);
|
||||
Texture2DArray<float4> tex2dArray : register(t8);
|
||||
SamplerState _tex2dArray_sampler : register(s8);
|
||||
TextureCubeArray<float4> texCubeArray : register(t9);
|
||||
SamplerState _texCubeArray_sampler : register(s9);
|
||||
Texture2D<float4> separateTex2d : register(t12);
|
||||
SamplerState samplerNonDepth : register(s11);
|
||||
Texture2D<float4> separateTex2dDepth : register(t13);
|
||||
SamplerComparisonState samplerDepth : register(s10);
|
||||
|
||||
static float texCoord1d;
|
||||
static float2 texCoord2d;
|
||||
|
@ -60,14 +60,8 @@ 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);
|
||||
float _178 = _162.w + tex1dShadow.SampleCmp(_tex1dShadow_sampler, float3(texCoord1d, 0.0f, 0.0f).x, 0.0f);
|
||||
float4 _327 = _162;
|
||||
_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 _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);
|
||||
|
|
|
@ -15,7 +15,7 @@ struct SPIRV_Cross_Output
|
|||
|
||||
void frag_main()
|
||||
{
|
||||
FragColor = -(-vIn);
|
||||
FragColor = vIn;
|
||||
}
|
||||
|
||||
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
||||
|
|
|
@ -5,6 +5,8 @@ struct Foo
|
|||
float3 c;
|
||||
};
|
||||
|
||||
static const Foo _71 = { 1.0f.xxx, 1.0f.xxx, 1.0f.xxx };
|
||||
|
||||
static float4 gl_Position;
|
||||
static float4 Input2;
|
||||
static float4 Input4;
|
||||
|
@ -40,8 +42,6 @@ struct SPIRV_Cross_Output
|
|||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
|
||||
Foo _70;
|
||||
|
||||
void vert_main()
|
||||
{
|
||||
gl_Position = ((1.0f.xxxx + Input2) + Input4) + Input0;
|
||||
|
@ -49,13 +49,7 @@ void vert_main()
|
|||
vLocation1 = 1.0f;
|
||||
vLocation2[0] = 2.0f;
|
||||
vLocation2[1] = 2.0f;
|
||||
Foo _65 = _70;
|
||||
_65.a = 1.0f.xxx;
|
||||
Foo _67 = _65;
|
||||
_67.b = 1.0f.xxx;
|
||||
Foo _69 = _67;
|
||||
_69.c = 1.0f.xxx;
|
||||
vLocation4 = _69;
|
||||
vLocation4 = _71;
|
||||
vLocation9 = 9.0f;
|
||||
vout.color = 2.0f.xxx;
|
||||
vout.foo = 4.0f.xxx;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
static const float4 _20[2] = { 10.0f.xxxx, 20.0f.xxxx };
|
||||
|
||||
static float4 gl_Position;
|
||||
static float4 vInput0;
|
||||
static float4 vInput1;
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
|
||||
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
|
||||
{
|
||||
float a;
|
||||
|
|
|
@ -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]])
|
||||
{
|
||||
uint3 _23 = gl_WorkGroupSize;
|
||||
_8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x];
|
||||
}
|
||||
|
||||
|
|
|
@ -3,29 +3,7 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
constant _10 _51 = {};
|
||||
constant float _57 = {};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
|
@ -35,7 +13,7 @@ struct main0_out
|
|||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
out.m_3 = float4(_51._m0, _51._m1, _51._m2, _51._m3);
|
||||
out.m_3 = float4(_57);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ struct main0_out
|
|||
fragment main0_out main0()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
struct D
|
||||
{
|
||||
float4 a;
|
||||
float b;
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float FragColor [[color(0)]];
|
||||
|
|
|
@ -5,8 +5,5 @@ using namespace metal;
|
|||
|
||||
fragment void main0()
|
||||
{
|
||||
for (int _22 = 35; _22 >= 0; _22--)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant float4 _38 = {};
|
||||
constant float4 _50 = {};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 _entryPointOutput [[color(0)]];
|
||||
|
@ -14,25 +11,7 @@ struct main0_out
|
|||
fragment main0_out main0()
|
||||
{
|
||||
main0_out out = {};
|
||||
float4 _51;
|
||||
_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;
|
||||
out._entryPointOutput = float4(1.0, 1.0, 0.0, 1.0);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant float4 _21 = {};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
int counter [[user(locn0)]];
|
||||
|
@ -18,21 +16,21 @@ struct main0_out
|
|||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
float4 _33;
|
||||
do
|
||||
bool _29;
|
||||
for (;;)
|
||||
{
|
||||
if (in.counter == 10)
|
||||
_29 = in.counter == 10;
|
||||
if (_29)
|
||||
{
|
||||
_33 = float4(10.0);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_33 = float4(30.0);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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]])
|
||||
{
|
||||
main0_out out = {};
|
||||
_28 _77 = _74;
|
||||
_77._m0 = float4(0.0);
|
||||
float2 _82 = gl_FragCoord.xy * _19._m23.xy;
|
||||
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);
|
||||
float4 _113 = _12.sample(_13, _97, level(0.0));
|
||||
float _114 = _113.y;
|
||||
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
|
||||
{
|
||||
_129 = _109;
|
||||
}
|
||||
float3 _130 = _129 * 0.5;
|
||||
float3 _133 = float4(0.0).xyz + _130;
|
||||
float4 _134 = float4(_133.x, _133.y, _133.z, float4(0.0).w);
|
||||
_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);
|
||||
float4 _134 = float4(_130.x, _130.y, _130.z, float4(0.0).w);
|
||||
float2 _144 = clamp(_82 + (float2(-1.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _161 = _160.y;
|
||||
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
|
||||
{
|
||||
|
@ -134,15 +133,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _177 = _176 * 0.5;
|
||||
float3 _180 = _134.xyz + _177;
|
||||
float4 _181 = float4(_180.x, _180.y, _180.z, _134.w);
|
||||
_28 _182 = _135;
|
||||
_182._m0 = _181;
|
||||
float2 _191 = clamp(_82 + (float3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _191 = clamp(_82 + (float2(0.0, -1.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _208 = _207.y;
|
||||
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
|
||||
{
|
||||
|
@ -151,15 +149,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _224 = _223 * 0.75;
|
||||
float3 _227 = _181.xyz + _224;
|
||||
float4 _228 = float4(_227.x, _227.y, _227.z, _181.w);
|
||||
_28 _229 = _182;
|
||||
_229._m0 = _228;
|
||||
float2 _238 = clamp(_82 + (float3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _238 = clamp(_82 + (float2(1.0, -1.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _255 = _254.y;
|
||||
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
|
||||
{
|
||||
|
@ -168,15 +165,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _271 = _270 * 0.5;
|
||||
float3 _274 = _228.xyz + _271;
|
||||
float4 _275 = float4(_274.x, _274.y, _274.z, _228.w);
|
||||
_28 _276 = _229;
|
||||
_276._m0 = _275;
|
||||
float2 _285 = clamp(_82 + (float3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _285 = clamp(_82 + (float2(-2.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _302 = _301.y;
|
||||
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
|
||||
{
|
||||
|
@ -185,15 +181,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _318 = _317 * 0.5;
|
||||
float3 _321 = _275.xyz + _318;
|
||||
float4 _322 = float4(_321.x, _321.y, _321.z, _275.w);
|
||||
_28 _323 = _276;
|
||||
_323._m0 = _322;
|
||||
float2 _332 = clamp(_82 + (float3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _332 = clamp(_82 + (float2(-1.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _349 = _348.y;
|
||||
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
|
||||
{
|
||||
|
@ -202,15 +197,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _365 = _364 * 0.75;
|
||||
float3 _368 = _322.xyz + _365;
|
||||
float4 _369 = float4(_368.x, _368.y, _368.z, _322.w);
|
||||
_28 _370 = _323;
|
||||
_370._m0 = _369;
|
||||
float2 _379 = clamp(_82 + (float3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _379 = clamp(_82, _95, _96);
|
||||
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));
|
||||
float _396 = _395.y;
|
||||
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
|
||||
{
|
||||
|
@ -219,15 +213,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _412 = _411 * 1.0;
|
||||
float3 _415 = _369.xyz + _412;
|
||||
float4 _416 = float4(_415.x, _415.y, _415.z, _369.w);
|
||||
_28 _417 = _370;
|
||||
_417._m0 = _416;
|
||||
float2 _426 = clamp(_82 + (float3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _426 = clamp(_82 + (float2(1.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _443 = _442.y;
|
||||
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
|
||||
{
|
||||
|
@ -236,15 +229,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _459 = _458 * 0.75;
|
||||
float3 _462 = _416.xyz + _459;
|
||||
float4 _463 = float4(_462.x, _462.y, _462.z, _416.w);
|
||||
_28 _464 = _417;
|
||||
_464._m0 = _463;
|
||||
float2 _473 = clamp(_82 + (float3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _473 = clamp(_82 + (float2(2.0, 0.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _490 = _489.y;
|
||||
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
|
||||
{
|
||||
|
@ -253,15 +245,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _506 = _505 * 0.5;
|
||||
float3 _509 = _463.xyz + _506;
|
||||
float4 _510 = float4(_509.x, _509.y, _509.z, _463.w);
|
||||
_28 _511 = _464;
|
||||
_511._m0 = _510;
|
||||
float2 _520 = clamp(_82 + (float3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _520 = clamp(_82 + (float2(-1.0, 1.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _537 = _536.y;
|
||||
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
|
||||
{
|
||||
|
@ -270,15 +261,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _553 = _552 * 0.5;
|
||||
float3 _556 = _510.xyz + _553;
|
||||
float4 _557 = float4(_556.x, _556.y, _556.z, _510.w);
|
||||
_28 _558 = _511;
|
||||
_558._m0 = _557;
|
||||
float2 _567 = clamp(_82 + (float3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _567 = clamp(_82 + (float2(0.0, 1.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _584 = _583.y;
|
||||
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
|
||||
{
|
||||
|
@ -287,15 +277,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _600 = _599 * 0.75;
|
||||
float3 _603 = _557.xyz + _600;
|
||||
float4 _604 = float4(_603.x, _603.y, _603.z, _557.w);
|
||||
_28 _605 = _558;
|
||||
_605._m0 = _604;
|
||||
float2 _614 = clamp(_82 + (float3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _614 = clamp(_82 + _7._m0.xy, _95, _96);
|
||||
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));
|
||||
float _631 = _630.y;
|
||||
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
|
||||
{
|
||||
|
@ -304,15 +293,14 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
float3 _647 = _646 * 0.5;
|
||||
float3 _650 = _604.xyz + _647;
|
||||
float4 _651 = float4(_650.x, _650.y, _650.z, _604.w);
|
||||
_28 _652 = _605;
|
||||
_652._m0 = _651;
|
||||
float2 _661 = clamp(_82 + (float3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
float2 _661 = clamp(_82 + (float2(0.0, 2.0) * _7._m0.xy), _95, _96);
|
||||
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));
|
||||
float _678 = _677.y;
|
||||
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
|
||||
{
|
||||
|
@ -320,10 +308,8 @@ fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buff
|
|||
}
|
||||
float3 _697 = _651.xyz + (_693 * 0.5);
|
||||
float4 _698 = float4(_697.x, _697.y, _697.z, _651.w);
|
||||
_28 _699 = _652;
|
||||
_699._m0 = _698;
|
||||
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;
|
||||
float3 _702 = _698.xyz * float3(0.125);
|
||||
_28 _704 = _74;
|
||||
_704._m0 = float4(_702.x, _702.y, _702.z, _698.w);
|
||||
_28 _705 = _704;
|
||||
_705._m0.w = 1.0;
|
||||
|
|
|
@ -3,16 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
struct TestStruct
|
||||
{
|
||||
float4x4 transforms[6];
|
||||
};
|
||||
|
||||
struct CB0
|
||||
{
|
||||
TestStruct CB0[16];
|
||||
};
|
||||
|
||||
vertex void main0()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
kernel void main0()
|
||||
{
|
||||
threadgroup_barrier(mem_flags::mem_threadgroup);
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
struct SSBO
|
||||
{
|
||||
float in_data[1];
|
||||
|
|
|
@ -12,10 +12,11 @@ struct SSBO
|
|||
kernel void main0(device SSBO& _13 [[buffer(0)]])
|
||||
{
|
||||
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.yz + float2(10.0)).xxyy;
|
||||
_13.data = float4((_17.yz + float2(10.0)).y);
|
||||
_13.data = _28.xxyy;
|
||||
_13.data = float4(_28.y);
|
||||
_13.data = float4((_17.zw + float2(10.0))[_13.index]);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@ kernel void main0(device SSBO& _28 [[buffer(0)]], device SSBO2& _52 [[buffer(1)]
|
|||
if (i < 16)
|
||||
{
|
||||
_56 = _42;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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]])
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
|
@ -3,15 +3,7 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize = uint3(32u, 1u, 1u);
|
||||
|
||||
struct T1
|
||||
{
|
||||
float3 a;
|
||||
float b;
|
||||
};
|
||||
|
||||
struct T1_1
|
||||
{
|
||||
packed_float3 a;
|
||||
float b;
|
||||
|
@ -19,7 +11,7 @@ struct T1_1
|
|||
|
||||
struct Buffer0
|
||||
{
|
||||
T1_1 buf0[1];
|
||||
T1 buf0[1];
|
||||
};
|
||||
|
||||
struct Buffer1
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize = uint3(32u, 1u, 1u);
|
||||
|
||||
struct T1
|
||||
{
|
||||
packed_float3 a;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -20,7 +20,6 @@ kernel void main0(device SSBO& _9 [[buffer(0)]])
|
|||
_9.a ^= 10;
|
||||
_9.a %= 40;
|
||||
_9.a |= 1;
|
||||
bool _65 = false && true;
|
||||
_9.a = int(_65 && (true || _65));
|
||||
_9.a = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize = uint3(4u, 4u, 1u);
|
||||
|
||||
struct SSBO
|
||||
{
|
||||
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];
|
||||
foo[gl_LocalInvocationID.x][gl_LocalInvocationID.y] = float(gl_LocalInvocationIndex);
|
||||
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];
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint3 gl_WorkGroupSize = uint3(4u, 1u, 1u);
|
||||
|
||||
struct SSBO
|
||||
{
|
||||
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];
|
||||
sShared[gl_LocalInvocationIndex] = _22.in_data[gl_GlobalInvocationID.x];
|
||||
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];
|
||||
}
|
||||
|
||||
|
|
|
@ -13,27 +13,13 @@ struct s2
|
|||
s1 b;
|
||||
};
|
||||
|
||||
struct s1_1
|
||||
{
|
||||
int a;
|
||||
};
|
||||
|
||||
struct s2_1
|
||||
{
|
||||
s1_1 b;
|
||||
};
|
||||
|
||||
struct dstbuffer
|
||||
{
|
||||
s2_1 test[1];
|
||||
s2 test[1];
|
||||
};
|
||||
|
||||
constant s2 _31 = {};
|
||||
|
||||
kernel void main0(device dstbuffer& _19 [[buffer(0)]])
|
||||
{
|
||||
s2 _30 = _31;
|
||||
_30.b.a = 0;
|
||||
_19.test[0].b.a = _30.b.a;
|
||||
_19.test[0].b.a = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,41 +73,18 @@ 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_1 m1s[1];
|
||||
S2_1 m2s[1];
|
||||
S1 m1s[1];
|
||||
S2 m2s[1];
|
||||
S0_1 m0;
|
||||
S1_1 m1;
|
||||
S2_1 m2;
|
||||
S3_1 m3;
|
||||
S1 m1;
|
||||
S2 m2;
|
||||
S3 m3;
|
||||
char pad7[4];
|
||||
float m4;
|
||||
S4_1 m3s[8];
|
||||
S4 m3s[8];
|
||||
};
|
||||
|
||||
struct SSBO0
|
||||
|
|
|
@ -14,65 +14,28 @@ struct SSBO2
|
|||
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]])
|
||||
{
|
||||
float4 _93;
|
||||
int _94;
|
||||
_93 = _24.in_data[gl_GlobalInvocationID.x];
|
||||
_94 = 0;
|
||||
int _40;
|
||||
float4 _46;
|
||||
int _48;
|
||||
for (;;)
|
||||
for (int _94 = 0; (_94 + 1) < 10; )
|
||||
{
|
||||
_40 = _94 + 1;
|
||||
if (_40 < 10)
|
||||
{
|
||||
_46 = _93 * 2.0;
|
||||
_48 = _40 + 1;
|
||||
_93 = _46;
|
||||
_94 = _48;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
_93 *= 2.0;
|
||||
_94 += 2;
|
||||
continue;
|
||||
}
|
||||
float4 _95;
|
||||
int _96;
|
||||
_95 = _93;
|
||||
_96 = _40;
|
||||
float4 _100;
|
||||
uint _101;
|
||||
uint _99;
|
||||
for (uint _97 = 0u; _97 < 16u; _95 = _100, _96++, _97++, _99 = _101)
|
||||
for (uint _97 = 0u; _97 < 16u; _95 = _100, _97++)
|
||||
{
|
||||
_100 = _95;
|
||||
_101 = 0u;
|
||||
float4 _71;
|
||||
for (; _101 < 30u; _100 = _71, _101++)
|
||||
for (uint _101 = 0u; _101 < 30u; )
|
||||
{
|
||||
_71 = _24.mvp * _100;
|
||||
}
|
||||
}
|
||||
int _102;
|
||||
_102 = _96;
|
||||
int _83;
|
||||
for (;;)
|
||||
{
|
||||
_83 = _102 + 1;
|
||||
if (_83 > 10)
|
||||
{
|
||||
_102 = _83;
|
||||
_100 = _24.mvp * _100;
|
||||
_101++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
_89.out_data[gl_GlobalInvocationID.x] = _95;
|
||||
}
|
||||
|
|
|
@ -8,29 +8,9 @@ struct S0
|
|||
float4 a;
|
||||
};
|
||||
|
||||
struct S1
|
||||
{
|
||||
float4 a;
|
||||
};
|
||||
|
||||
struct S0_1
|
||||
{
|
||||
float4 a;
|
||||
};
|
||||
|
||||
struct SSBO0
|
||||
{
|
||||
S0_1 s0s[1];
|
||||
};
|
||||
|
||||
struct S1_1
|
||||
{
|
||||
float4 a;
|
||||
};
|
||||
|
||||
struct SSBO1
|
||||
{
|
||||
S1_1 s1s[1];
|
||||
S0 s0s[1];
|
||||
};
|
||||
|
||||
struct SSBO2
|
||||
|
@ -38,8 +18,8 @@ struct SSBO2
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,13 +8,8 @@ struct SSBO2
|
|||
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];
|
||||
};
|
||||
|
||||
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;
|
||||
_10.outputs[gl_GlobalInvocationID.x] = _23.outputs[gl_GlobalInvocationID.x] / 29u;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ vertex main0_out main0(constant UBO& _22 [[buffer(0)]])
|
|||
out.oA = _22.A;
|
||||
out.oB = float4(_22.B0, _22.B1);
|
||||
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[0], _22.D0[1], _22.D0[2], _22.D1) + float4(_22.D0[0], _22.D0[1], _22.D0[2u], _22.D1);
|
||||
out.oE = float4(_22.E0, _22.E1, _22.E2, _22.E3);
|
||||
out.oF = float4(_22.F0, _22.F1, _22.F2);
|
||||
return out;
|
||||
|
|
|
@ -30,9 +30,12 @@ fragment main0_out main0()
|
|||
{
|
||||
main0_out out = {};
|
||||
float lut[5] = {1.0, 2.0, 3.0, 4.0, 5.0};
|
||||
int _33;
|
||||
for (int _46 = 0; _46 < 4; _33 = _46 + 1, out.FragColor += float4(lut[_33]), _46 = _33)
|
||||
for (int _46 = 0; _46 < 4; )
|
||||
{
|
||||
int _33 = _46 + 1;
|
||||
out.FragColor += float4(lut[_33]);
|
||||
_46 = _33;
|
||||
continue;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -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_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}};
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 vInput [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]], texture2d<float> uSampler [[texture(0)]], sampler uSamplerSmplr [[sampler(0)]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = in.vInput;
|
||||
float4 _23 = uSampler.sample(uSamplerSmplr, in.vInput.xy);
|
||||
float4 _26 = dfdx(in.vInput);
|
||||
float4 _29 = dfdy(in.vInput);
|
||||
float4 _32 = fwidth(in.vInput);
|
||||
float4 _35 = dfdx(in.vInput);
|
||||
float4 _38 = dfdy(in.vInput);
|
||||
float4 _41 = fwidth(in.vInput);
|
||||
float4 _44 = dfdx(in.vInput);
|
||||
float4 _47 = dfdy(in.vInput);
|
||||
float4 _50 = fwidth(in.vInput);
|
||||
if (in.vInput.y > 10.0)
|
||||
{
|
||||
out.FragColor += _23;
|
||||
out.FragColor += _26;
|
||||
out.FragColor += _29;
|
||||
out.FragColor += _32;
|
||||
out.FragColor += _35;
|
||||
out.FragColor += _38;
|
||||
out.FragColor += _41;
|
||||
out.FragColor += _44;
|
||||
out.FragColor += _47;
|
||||
out.FragColor += _50;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant uint _49 = {};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 accum [[user(locn0)]];
|
||||
|
@ -19,19 +17,11 @@ fragment main0_out main0(main0_in in [[stage_in]])
|
|||
{
|
||||
main0_out out = {};
|
||||
out.result = float4(0.0);
|
||||
uint _51;
|
||||
uint _50;
|
||||
for (int _48 = 0; _48 < 4; _48 += int(_51), _50 = _51)
|
||||
for (int _48 = 0; _48 < 4; )
|
||||
{
|
||||
if (in.accum.y > 10.0)
|
||||
{
|
||||
_51 = 40u;
|
||||
}
|
||||
else
|
||||
{
|
||||
_51 = 30u;
|
||||
}
|
||||
out.result += in.accum;
|
||||
_48 += int((in.accum.y > 10.0) ? 40u : 30u);
|
||||
continue;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
struct Structy
|
||||
{
|
||||
float4 c;
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float4 FragColor [[color(0)]];
|
||||
|
|
|
@ -12,44 +12,54 @@ fragment main0_out main0()
|
|||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = 16;
|
||||
for (int _140 = 0; _140 < 25; _140++)
|
||||
for (int _140 = 0; _140 < 25; )
|
||||
{
|
||||
out.FragColor += 10;
|
||||
_140++;
|
||||
continue;
|
||||
}
|
||||
for (int _141 = 1; _141 < 30; _141++)
|
||||
for (int _141 = 1; _141 < 30; )
|
||||
{
|
||||
out.FragColor += 11;
|
||||
_141++;
|
||||
continue;
|
||||
}
|
||||
int _142;
|
||||
_142 = 0;
|
||||
for (; _142 < 20; _142++)
|
||||
for (; _142 < 20; )
|
||||
{
|
||||
out.FragColor += 12;
|
||||
_142++;
|
||||
continue;
|
||||
}
|
||||
int _62 = _142 + 3;
|
||||
out.FragColor += _62;
|
||||
if (_62 == 40)
|
||||
{
|
||||
for (int _143 = 0; _143 < 40; _143++)
|
||||
for (int _143 = 0; _143 < 40; )
|
||||
{
|
||||
out.FragColor += 13;
|
||||
_143++;
|
||||
continue;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
else
|
||||
{
|
||||
out.FragColor += _62;
|
||||
}
|
||||
out.FragColor += _62;
|
||||
int2 _144;
|
||||
_144 = int2(0);
|
||||
int2 _139;
|
||||
for (; _144.x < 10; _139 = _144, _139.x = _144.x + 4, _144 = _139)
|
||||
for (; _144.x < 10; )
|
||||
{
|
||||
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;
|
||||
_145++;
|
||||
continue;
|
||||
}
|
||||
out.FragColor += _62;
|
||||
return out;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#include <metal_stdlib>
|
||||
#include <simd/simd.h>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float2 FP32 [[user(locn1)]];
|
||||
uint FP16 [[user(locn0)]];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
{
|
||||
float2 FP32Out [[color(0)]];
|
||||
uint FP16Out [[color(1)]];
|
||||
};
|
||||
|
||||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FP32Out = float2(as_type<half2>(in.FP16));
|
||||
out.FP16Out = as_type<uint>(half2(in.FP32));
|
||||
return out;
|
||||
}
|
||||
|
|
@ -3,12 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
struct ResType
|
||||
{
|
||||
half4 _m0;
|
||||
int4 _m1;
|
||||
};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
half4 v4 [[user(locn3)]];
|
||||
|
|
|
@ -19,11 +19,10 @@ struct main0_out
|
|||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
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(true ? in.vIn3 : in.vIn2);
|
||||
bool4 _37 = bool4(true);
|
||||
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(true ? in.vIn2 : in.vIn3);
|
||||
out.FragColor = float4(in.vIn0.x, in.vIn1.y, in.vIn0.z, in.vIn0.w);
|
||||
out.FragColor = float4(in.vIn3);
|
||||
out.FragColor = in.vIn0.xyzw;
|
||||
out.FragColor = float4(in.vIn2);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,18 +3,7 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 HPosition;
|
||||
};
|
||||
|
||||
struct TestStruct
|
||||
{
|
||||
float3 position;
|
||||
float radius;
|
||||
};
|
||||
|
||||
struct TestStruct_1
|
||||
{
|
||||
packed_float3 position;
|
||||
float radius;
|
||||
|
@ -22,7 +11,7 @@ struct TestStruct_1
|
|||
|
||||
struct CB0
|
||||
{
|
||||
TestStruct_1 CB0[16];
|
||||
TestStruct CB0[16];
|
||||
};
|
||||
|
||||
struct main0_out
|
||||
|
@ -33,7 +22,7 @@ struct main0_out
|
|||
fragment main0_out main0(constant CB0& _26 [[buffer(0)]], float4 gl_FragCoord [[position]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out._entryPointOutput = float4(_26.CB0[1].position, _26.CB0[1].radius);
|
||||
out._entryPointOutput = float4(_26.CB0[1].position[0], _26.CB0[1].position[1], _26.CB0[1].position[2], _26.CB0[1].radius);
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ struct main0_out
|
|||
fragment main0_out main0(main0_in in [[stage_in]])
|
||||
{
|
||||
main0_out out = {};
|
||||
out.FragColor = -(-in.vIn);
|
||||
out.FragColor = in.vIn;
|
||||
return out;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +16,6 @@ struct UBO
|
|||
Light lights[4];
|
||||
};
|
||||
|
||||
struct Light_1
|
||||
{
|
||||
float3 Position;
|
||||
float Radius;
|
||||
float4 Color;
|
||||
};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
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 = {};
|
||||
out.gl_Position = _21.uMVP * in.aVertex;
|
||||
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;
|
||||
out.vColor += ((_21.lights[_103].Color * clamp(1.0 - (length(_68) / _21.lights[_103].Radius), 0.0, 1.0)) * dot(in.aNormal, normalize(_68)));
|
||||
float3 _68 = in.aVertex.xyz - _21.lights[_96].Position;
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -33,10 +33,12 @@ vertex main0_out main0(main0_in in [[stage_in]], constant UBO& _21 [[buffer(0)]]
|
|||
main0_out out = {};
|
||||
out.gl_Position = _21.uMVP * in.aVertex;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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)]])
|
||||
{
|
||||
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);
|
||||
out.m_72 = _34;
|
||||
out.m_72 = normalize(float4(in.m_25.xyz, 0.0) * _17._m1);
|
||||
float4 _95 = _70;
|
||||
_95.y = -_70.y;
|
||||
out.gl_Position = _95;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
using namespace metal;
|
||||
|
||||
constant float4 _20[2] = {float4(10.0), float4(20.0)};
|
||||
|
||||
struct main0_in
|
||||
{
|
||||
float4 vInput1 [[attribute(1)]];
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#extension GL_AMD_shader_fragment_mask : 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()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#version 450
|
||||
#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;
|
||||
|
||||
void main()
|
||||
|
|
|
@ -9,18 +9,20 @@ layout(binding = 0, std430) buffer inputData
|
|||
float inputDataArray[];
|
||||
} _12;
|
||||
|
||||
layout(binding = 1, std430) buffer outputData
|
||||
layout(binding = 1, std430) buffer _10_74
|
||||
{
|
||||
float outputDataArray[];
|
||||
float inputDataArray[];
|
||||
} _74;
|
||||
|
||||
void main()
|
||||
{
|
||||
float _25 = _12.inputDataArray[gl_LocalInvocationID.x];
|
||||
bool _31 = _25 > 0.0;
|
||||
uvec4 _37 = uvec4(unpackUint2x32(ballotARB(_31)), 0u, 0u);
|
||||
uint _44 = mbcntAMD(packUint2x32(uvec2(_37.xy)));
|
||||
if (_31)
|
||||
{
|
||||
_74.outputDataArray[mbcntAMD(packUint2x32(uvec2(unpackUint2x32(ballotARB(_31)).xy)))] = _25;
|
||||
_74.inputDataArray[_44] = _25;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
#version 450
|
||||
#extension GL_ARB_shader_group_vote : require
|
||||
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()
|
||||
{
|
||||
bool _31 = _12.inputDataArray[gl_LocalInvocationID.x] > 0.0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#version 450
|
||||
#extension GL_AMD_shader_trinary_minmax : require
|
||||
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
|
||||
|
||||
void main()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#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
|
||||
{
|
||||
|
|
|
@ -11,6 +11,8 @@ layout(binding = 1, std430) buffer _6_9
|
|||
float _m0[];
|
||||
} _9;
|
||||
|
||||
uvec3 _22 = gl_WorkGroupSize;
|
||||
|
||||
void main()
|
||||
{
|
||||
_8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x];
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
struct SwizzleTest
|
||||
{
|
||||
float a;
|
||||
float b;
|
||||
};
|
||||
|
||||
layout(location = 0) in vec2 foo;
|
||||
layout(location = 0) out float FooOut;
|
||||
|
||||
|
|
|
@ -1,33 +1,11 @@
|
|||
#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;
|
||||
|
||||
_10 _51;
|
||||
float _57;
|
||||
|
||||
void main()
|
||||
{
|
||||
_3 = vec4(_51._m0, _51._m1, _51._m2, _51._m3);
|
||||
_3 = vec4(_57);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,6 @@ layout(location = 0) out vec4 FragColor;
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ layout(location = 0) out vec4 _entryPointOutput;
|
|||
|
||||
void main()
|
||||
{
|
||||
ivec3 _122 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0);
|
||||
_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);
|
||||
ivec2 _152 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).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);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
layout(set = 0, binding = 0) uniform sampler Sampler;
|
||||
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;
|
||||
|
||||
void main()
|
||||
{
|
||||
ivec3 _122 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0);
|
||||
_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);
|
||||
ivec2 _152 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).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);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,36 +10,34 @@ layout(binding = 0, std140) uniform Foo
|
|||
layout(location = 0) in vec3 fragWorld;
|
||||
layout(location = 0) out int _entryPointOutput;
|
||||
|
||||
mat4 _152;
|
||||
uint _155;
|
||||
|
||||
int GetCascade(vec3 fragWorldPosition)
|
||||
{
|
||||
mat4 _153;
|
||||
_153 = _152;
|
||||
uint _156;
|
||||
mat4 _157;
|
||||
for (uint _151 = 0u; _151 < _11.shadowCascadesNum; _151 = _156 + uint(1), _153 = _157)
|
||||
for (uint _151 = 0u; _151 < _11.shadowCascadesNum; _151++)
|
||||
{
|
||||
mat4 _154;
|
||||
_154 = _153;
|
||||
mat4 _157;
|
||||
for (;;)
|
||||
{
|
||||
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));
|
||||
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));
|
||||
break;
|
||||
}
|
||||
vec4 _92 = (_157 * _11.lightVP[_156]) * 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))
|
||||
vec4 _92 = (_157 * _11.lightVP[_151]) * vec4(fragWorldPosition, 1.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;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ void main()
|
|||
{
|
||||
float _64 = float(_60);
|
||||
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);
|
||||
_58 += _78;
|
||||
_60++;
|
||||
|
|
|
@ -3,19 +3,18 @@
|
|||
layout(location = 0) out vec4 FragColor;
|
||||
layout(location = 0) in vec4 v0;
|
||||
|
||||
int _51;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = vec4(1.0);
|
||||
int _53;
|
||||
int _52;
|
||||
for (int _50 = 0; _50 < 4; _50++, _52 = _53)
|
||||
int _50;
|
||||
_50 = 0;
|
||||
for (; _50 < 4; _50++)
|
||||
{
|
||||
_53 = 0;
|
||||
for (; _53 < 4; _53++)
|
||||
for (int _53 = 0; _53 < 4; )
|
||||
{
|
||||
FragColor += vec4(v0[(_50 + _53) & 3]);
|
||||
_53++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,13 @@ void main()
|
|||
FragColor = vec4(0.0);
|
||||
int _53 = 0;
|
||||
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(_54));
|
||||
_53 += counter;
|
||||
_54 += uint(counter);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
precision mediump float;
|
||||
precision highp int;
|
||||
|
||||
struct D
|
||||
{
|
||||
vec4 a;
|
||||
float b;
|
||||
};
|
||||
|
||||
layout(location = 0) out float FragColor;
|
||||
|
||||
void main()
|
||||
|
|
|
@ -2,8 +2,5 @@
|
|||
|
||||
void main()
|
||||
{
|
||||
for (int _22 = 35; _22 >= 0; _22--)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#version 450
|
||||
|
||||
layout(rgba32f) uniform writeonly imageBuffer RWTex;
|
||||
uniform samplerBuffer Tex;
|
||||
layout(binding = 0, rgba32f) uniform writeonly imageBuffer RWTex;
|
||||
layout(binding = 1) uniform samplerBuffer Tex;
|
||||
|
||||
layout(location = 0) out vec4 _entryPointOutput;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ void main()
|
|||
FragColor += vec4(v0[_54 & 1]);
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ void main()
|
|||
break;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,11 @@ void main()
|
|||
{
|
||||
vec3 _28;
|
||||
_28 = vec3(0.0);
|
||||
vec3 _29;
|
||||
for (int _31 = 0; _31 < 4; _28 = _29, _31++)
|
||||
for (int _31 = 0; _31 < 4; )
|
||||
{
|
||||
_29 = _28 + _6.g_MyStruct[_31].color.xyz;
|
||||
_28 += _6.g_MyStruct[_31].color.xyz;
|
||||
_31++;
|
||||
continue;
|
||||
}
|
||||
_entryPointOutput = vec4(_28, 1.0);
|
||||
}
|
||||
|
|
|
@ -2,29 +2,8 @@
|
|||
|
||||
layout(location = 0) out vec4 _entryPointOutput;
|
||||
|
||||
vec4 _38;
|
||||
vec4 _50;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 _51;
|
||||
_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;
|
||||
_entryPointOutput = vec4(1.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,24 +3,21 @@
|
|||
layout(location = 0) flat in int counter;
|
||||
layout(location = 0) out vec4 FragColor;
|
||||
|
||||
vec4 _21;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 _33;
|
||||
do
|
||||
bool _29;
|
||||
for (;;)
|
||||
{
|
||||
if (counter == 10)
|
||||
_29 = counter == 10;
|
||||
if (_29)
|
||||
{
|
||||
_33 = vec4(10.0);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
_33 = vec4(30.0);
|
||||
break;
|
||||
}
|
||||
} while (false);
|
||||
FragColor = _33;
|
||||
}
|
||||
FragColor = mix(vec4(30.0), vec4(10.0), bvec4(_29));
|
||||
}
|
||||
|
||||
|
|
|
@ -94,34 +94,33 @@ _28 _74;
|
|||
|
||||
void main()
|
||||
{
|
||||
_28 _77 = _74;
|
||||
_77._m0 = vec4(0.0);
|
||||
vec2 _82 = gl_FragCoord.xy * _19._m23.xy;
|
||||
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);
|
||||
vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0);
|
||||
float _114 = _113.y;
|
||||
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
|
||||
{
|
||||
_129 = _109;
|
||||
}
|
||||
vec3 _130 = _129 * 0.5;
|
||||
vec3 _133 = vec4(0.0).xyz + _130;
|
||||
vec4 _134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w);
|
||||
_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);
|
||||
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);
|
||||
float _161 = _160.y;
|
||||
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
|
||||
{
|
||||
|
@ -130,15 +129,14 @@ void main()
|
|||
vec3 _177 = _176 * 0.5;
|
||||
vec3 _180 = _134.xyz + _177;
|
||||
vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w);
|
||||
_28 _182 = _135;
|
||||
_182._m0 = _181;
|
||||
vec2 _191 = clamp(_82 + (vec3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _208 = _207.y;
|
||||
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
|
||||
{
|
||||
|
@ -147,15 +145,14 @@ void main()
|
|||
vec3 _224 = _223 * 0.75;
|
||||
vec3 _227 = _181.xyz + _224;
|
||||
vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w);
|
||||
_28 _229 = _182;
|
||||
_229._m0 = _228;
|
||||
vec2 _238 = clamp(_82 + (vec3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _255 = _254.y;
|
||||
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
|
||||
{
|
||||
|
@ -164,15 +161,14 @@ void main()
|
|||
vec3 _271 = _270 * 0.5;
|
||||
vec3 _274 = _228.xyz + _271;
|
||||
vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w);
|
||||
_28 _276 = _229;
|
||||
_276._m0 = _275;
|
||||
vec2 _285 = clamp(_82 + (vec3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _302 = _301.y;
|
||||
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
|
||||
{
|
||||
|
@ -181,15 +177,14 @@ void main()
|
|||
vec3 _318 = _317 * 0.5;
|
||||
vec3 _321 = _275.xyz + _318;
|
||||
vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w);
|
||||
_28 _323 = _276;
|
||||
_323._m0 = _322;
|
||||
vec2 _332 = clamp(_82 + (vec3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _349 = _348.y;
|
||||
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
|
||||
{
|
||||
|
@ -198,15 +193,14 @@ void main()
|
|||
vec3 _365 = _364 * 0.75;
|
||||
vec3 _368 = _322.xyz + _365;
|
||||
vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w);
|
||||
_28 _370 = _323;
|
||||
_370._m0 = _369;
|
||||
vec2 _379 = clamp(_82 + (vec3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _396 = _395.y;
|
||||
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
|
||||
{
|
||||
|
@ -215,15 +209,14 @@ void main()
|
|||
vec3 _412 = _411 * 1.0;
|
||||
vec3 _415 = _369.xyz + _412;
|
||||
vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w);
|
||||
_28 _417 = _370;
|
||||
_417._m0 = _416;
|
||||
vec2 _426 = clamp(_82 + (vec3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _443 = _442.y;
|
||||
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
|
||||
{
|
||||
|
@ -232,15 +225,14 @@ void main()
|
|||
vec3 _459 = _458 * 0.75;
|
||||
vec3 _462 = _416.xyz + _459;
|
||||
vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w);
|
||||
_28 _464 = _417;
|
||||
_464._m0 = _463;
|
||||
vec2 _473 = clamp(_82 + (vec3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _490 = _489.y;
|
||||
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
|
||||
{
|
||||
|
@ -249,15 +241,14 @@ void main()
|
|||
vec3 _506 = _505 * 0.5;
|
||||
vec3 _509 = _463.xyz + _506;
|
||||
vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w);
|
||||
_28 _511 = _464;
|
||||
_511._m0 = _510;
|
||||
vec2 _520 = clamp(_82 + (vec3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _537 = _536.y;
|
||||
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
|
||||
{
|
||||
|
@ -266,15 +257,14 @@ void main()
|
|||
vec3 _553 = _552 * 0.5;
|
||||
vec3 _556 = _510.xyz + _553;
|
||||
vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w);
|
||||
_28 _558 = _511;
|
||||
_558._m0 = _557;
|
||||
vec2 _567 = clamp(_82 + (vec3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _584 = _583.y;
|
||||
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
|
||||
{
|
||||
|
@ -283,15 +273,14 @@ void main()
|
|||
vec3 _600 = _599 * 0.75;
|
||||
vec3 _603 = _557.xyz + _600;
|
||||
vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w);
|
||||
_28 _605 = _558;
|
||||
_605._m0 = _604;
|
||||
vec2 _614 = clamp(_82 + (vec3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _631 = _630.y;
|
||||
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
|
||||
{
|
||||
|
@ -300,15 +289,14 @@ void main()
|
|||
vec3 _647 = _646 * 0.5;
|
||||
vec3 _650 = _604.xyz + _647;
|
||||
vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w);
|
||||
_28 _652 = _605;
|
||||
_652._m0 = _651;
|
||||
vec2 _661 = clamp(_82 + (vec3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw);
|
||||
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);
|
||||
float _678 = _677.y;
|
||||
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
|
||||
{
|
||||
|
@ -316,10 +304,8 @@ void main()
|
|||
}
|
||||
vec3 _697 = _651.xyz + (_693 * 0.5);
|
||||
vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w);
|
||||
_28 _699 = _652;
|
||||
_699._m0 = _698;
|
||||
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;
|
||||
vec3 _702 = _698.xyz * vec3(0.125);
|
||||
_28 _704 = _74;
|
||||
_704._m0 = vec4(_702.x, _702.y, _702.z, _698.w);
|
||||
_28 _705 = _704;
|
||||
_705._m0.w = 1.0;
|
||||
|
|
|
@ -7,75 +7,28 @@ struct VertexOutput
|
|||
vec2 uv;
|
||||
};
|
||||
|
||||
struct HSOut
|
||||
{
|
||||
vec4 pos;
|
||||
vec2 uv;
|
||||
};
|
||||
|
||||
struct HSConstantOut
|
||||
{
|
||||
float EdgeTess[3];
|
||||
float InsideTess;
|
||||
};
|
||||
|
||||
struct VertexOutput_1
|
||||
{
|
||||
vec2 uv;
|
||||
};
|
||||
|
||||
struct HSOut_1
|
||||
{
|
||||
vec2 uv;
|
||||
};
|
||||
|
||||
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()
|
||||
{
|
||||
VertexOutput p_1[3];
|
||||
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;
|
||||
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));
|
||||
gl_out[gl_InvocationID].gl_Position = param[gl_InvocationID].pos;
|
||||
_entryPointOutput[gl_InvocationID].uv = param[gl_InvocationID].uv;
|
||||
barrier();
|
||||
if (int(gl_InvocationID) == 0)
|
||||
{
|
||||
VertexOutput param_1[3] = p_1;
|
||||
vec2 _174 = vec2(1.0) + param_1[0].uv;
|
||||
vec2 _174 = vec2(1.0) + p[0].uv;
|
||||
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[1] = _181;
|
||||
gl_TessLevelOuter[2] = _187;
|
||||
gl_TessLevelInner[0] = _193;
|
||||
gl_TessLevelOuter[1] = _175;
|
||||
gl_TessLevelOuter[2] = _175;
|
||||
gl_TessLevelInner[0] = _175;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
#version 450
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
vec4 position;
|
||||
};
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
vec4 position;
|
||||
};
|
||||
|
||||
layout(location = 0) in vec4 position;
|
||||
|
||||
void main()
|
||||
|
|
|
@ -8,15 +8,9 @@ out gl_PerVertex
|
|||
struct VSOut
|
||||
{
|
||||
float a;
|
||||
vec4 pos;
|
||||
};
|
||||
|
||||
struct VSOut_1
|
||||
{
|
||||
float a;
|
||||
};
|
||||
|
||||
layout(location = 0) out VSOut_1 _entryPointOutput;
|
||||
layout(location = 0) out VSOut _entryPointOutput;
|
||||
|
||||
void main()
|
||||
{
|
||||
|
|
|
@ -15,9 +15,12 @@ layout(binding = 3, rgba16f) uniform writeonly mediump image2D iGradJacobian;
|
|||
void main()
|
||||
{
|
||||
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 _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;
|
||||
imageStore(iHeightDisplacement, ivec2(gl_GlobalInvocationID.xy), vec4(textureLod(uHeight, _59.xy, 0.0).x, 0.0, 0.0, 0.0));
|
||||
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 _67 = _59.xy;
|
||||
vec2 _128 = _59.zw;
|
||||
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;
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,13 +6,13 @@ layout(binding = 1, std430) buffer SSBO1
|
|||
ivec4 outputs[];
|
||||
} _21;
|
||||
|
||||
layout(binding = 0, std430) buffer SSBO0
|
||||
layout(binding = 0, std430) buffer _19_27
|
||||
{
|
||||
ivec4 inputs[];
|
||||
ivec4 outputs[];
|
||||
} _27;
|
||||
|
||||
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))));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,26 +31,15 @@ void main()
|
|||
break;
|
||||
}
|
||||
}
|
||||
switch (int(_11.data))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
float _181;
|
||||
_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;
|
||||
do
|
||||
{
|
||||
} while (_180 != 20.0);
|
||||
_11.data = _180;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,26 +1,18 @@
|
|||
#version 310 es
|
||||
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
|
||||
{
|
||||
vec4 as[];
|
||||
} _41;
|
||||
|
||||
layout(binding = 1, std430) buffer SSBO1
|
||||
layout(binding = 1, std430) buffer _39_55
|
||||
{
|
||||
vec4 bs[];
|
||||
vec4 as[];
|
||||
} _55;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 _60[2] = vec4[](_41.as[gl_GlobalInvocationID.x], _55.bs[gl_GlobalInvocationID.x]);
|
||||
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];
|
||||
_41.as[gl_GlobalInvocationID.x] = ((_41.as[gl_GlobalInvocationID.x] + _55.as[gl_GlobalInvocationID.x]) + _55.as[gl_GlobalInvocationID.x]) + vec4(10.0);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,11 @@ layout(binding = 0, std430) buffer SSBO
|
|||
void main()
|
||||
{
|
||||
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.yz + vec2(10.0)).xxyy;
|
||||
_13.data = vec4((_17.yz + vec2(10.0)).y);
|
||||
_13.data = _28.xxyy;
|
||||
_13.data = vec4(_28.y);
|
||||
_13.data = vec4((_17.zw + vec2(10.0))[_13.index]);
|
||||
}
|
||||
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче